@namiml/sdk-core 3.4.1 → 3.4.2-dev.202606022148

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.cjs CHANGED
@@ -96,9 +96,9 @@ exports.Capabilities = void 0;
96
96
 
97
97
  const {
98
98
  // version — stamped by scripts/version.sh
99
- NAMI_SDK_VERSION: exports.NAMI_SDK_VERSION = "3.4.1",
99
+ NAMI_SDK_VERSION: exports.NAMI_SDK_VERSION = "3.4.2",
100
100
  // full package version including dev suffix — stamped by scripts/version.sh
101
- NAMI_SDK_PACKAGE_VERSION: exports.NAMI_SDK_PACKAGE_VERSION = "3.4.1",
101
+ NAMI_SDK_PACKAGE_VERSION: exports.NAMI_SDK_PACKAGE_VERSION = "3.4.2-dev.202606022148",
102
102
  // environments
103
103
  PRODUCTION: exports.PRODUCTION = "production", DEVELOPMENT: exports.DEVELOPMENT = "development",
104
104
  // error messages
@@ -108,7 +108,7 @@ AUTH_DEVICE: exports.AUTH_DEVICE = "nami_auth_device", NAMI_CONFIGURATION: expor
108
108
  // API settings
109
109
  API_VERSION: exports.API_VERSION = "v3", BASE_URL_PATH: exports.BASE_URL_PATH = `sdk/${exports.API_VERSION}/platform`, BASE_URL: exports.BASE_URL = "https://app.namiml.com", BASE_STAGING_URL: exports.BASE_STAGING_URL = "https://app-staging.namiml.com", CUSTOM_HOST_PREFIX: exports.CUSTOM_HOST_PREFIX = "namiAPIHost=", USE_STAGING_API: exports.USE_STAGING_API = "useStagingAPI",
110
110
  // // extended client info
111
- EXTENDED_CLIENT_INFO_PREFIX: exports.EXTENDED_CLIENT_INFO_PREFIX = "extendedClientInfo", EXTENDED_CLIENT_INFO_DELIMITER: exports.EXTENDED_CLIENT_INFO_DELIMITER = ":", VALIDATE_PRODUCT_GROUPS: exports.VALIDATE_PRODUCT_GROUPS = "validateProductGroups", LOG_HTTP_REQUESTS: exports.LOG_HTTP_REQUESTS = "logHTTPRequests", LOG_HTTP_TRAFFIC: exports.LOG_HTTP_TRAFFIC = "logHTTPTraffic", EXTENDED_PLATFORM: exports.EXTENDED_PLATFORM = "extended-platform", EXTENDED_PLATFORM_VERSION: exports.EXTENDED_PLATFORM_VERSION = "extended-platform-version", API_MAX_CALLS_LIMIT: exports.API_MAX_CALLS_LIMIT = 2, API_RETRY_DELAY_SEC: exports.API_RETRY_DELAY_SEC = 2, API_TIMEOUT_LIMIT: exports.API_TIMEOUT_LIMIT = 20000, DEVICE_API_TIMEOUT_LIMIT: exports.DEVICE_API_TIMEOUT_LIMIT = 2000,
111
+ EXTENDED_CLIENT_INFO_PREFIX: exports.EXTENDED_CLIENT_INFO_PREFIX = "extendedClientInfo", EXTENDED_CLIENT_INFO_DELIMITER: exports.EXTENDED_CLIENT_INFO_DELIMITER = ":", VALIDATE_PRODUCT_GROUPS: exports.VALIDATE_PRODUCT_GROUPS = "validateProductGroups", LOG_HTTP_REQUESTS: exports.LOG_HTTP_REQUESTS = "logHTTPRequests", LOG_HTTP_TRAFFIC: exports.LOG_HTTP_TRAFFIC = "logHTTPTraffic", STARTUP_TELEMETRY: exports.STARTUP_TELEMETRY = "startupTelemetry", EXTENDED_PLATFORM: exports.EXTENDED_PLATFORM = "extended-platform", EXTENDED_PLATFORM_VERSION: exports.EXTENDED_PLATFORM_VERSION = "extended-platform-version", API_MAX_CALLS_LIMIT: exports.API_MAX_CALLS_LIMIT = 2, API_RETRY_DELAY_SEC: exports.API_RETRY_DELAY_SEC = 2, API_TIMEOUT_LIMIT: exports.API_TIMEOUT_LIMIT = 20000, DEVICE_API_TIMEOUT_LIMIT: exports.DEVICE_API_TIMEOUT_LIMIT = 2000,
112
112
  // status codes
113
113
  STATUS_SUCCESS: exports.STATUS_SUCCESS = 200, STATUS_BAD_REQUEST: exports.STATUS_BAD_REQUEST = 400, STATUS_NOT_FOUND: exports.STATUS_NOT_FOUND = 404, STATUS_CONFLICT: exports.STATUS_CONFLICT = 409, STATUS_INTERNAL_SERVER_ERROR: exports.STATUS_INTERNAL_SERVER_ERROR = 500,
114
114
  // configuration states
@@ -6803,6 +6803,10 @@ const shouldLogHTTPTraffic = () => {
6803
6803
  const namiCommands = storageService.getNamiConfig()?.namiCommands;
6804
6804
  return namiCommands?.includes(exports.LOG_HTTP_TRAFFIC) ?? false;
6805
6805
  };
6806
+ const shouldLogStartupTelemetry = () => {
6807
+ const namiCommands = storageService.getNamiConfig()?.namiCommands;
6808
+ return namiCommands?.includes(exports.STARTUP_TELEMETRY) ?? false;
6809
+ };
6806
6810
  function tryParseJson(str) {
6807
6811
  const trimmed = str.trim();
6808
6812
  if (!trimmed.startsWith("{") && !trimmed.startsWith("["))
@@ -11929,6 +11933,123 @@ class CustomerJourneyRepository {
11929
11933
  }
11930
11934
  CustomerJourneyRepository.instance = new CustomerJourneyRepository();
11931
11935
 
11936
+ const PREFIX = "[NamiStartup]";
11937
+ /**
11938
+ * Module-level singleton for startup timing instrumentation.
11939
+ *
11940
+ * All methods are cheap no-ops when the `startupTelemetry` namiCommand flag
11941
+ * is absent. The flag is read once at `start()` and cached; subsequent calls
11942
+ * to `mark()` and the span helpers use that cached boolean so the hot path
11943
+ * never hits storage.
11944
+ *
11945
+ * Log format (info level via the shared logger):
11946
+ * [NamiStartup] phase=<name> ms=<n>
11947
+ * [NamiStartup] SUMMARY total_to_ready=<ms> decode=<ms> process=<ms> placements=<n>
11948
+ */
11949
+ class StartupTelemetry {
11950
+ constructor() {
11951
+ this.enabled = false;
11952
+ this.t0 = 0;
11953
+ this.lastMark = 0;
11954
+ // Accumulated segment durations for the SUMMARY line
11955
+ this.decodeDuration = 0;
11956
+ this.processDuration = 0;
11957
+ this.placements = 0;
11958
+ // One-shot guard: only log the very first launch lookup
11959
+ this.firstLaunchLogged = false;
11960
+ }
11961
+ /**
11962
+ * Call at the first line of configure(). Reads the feature flag once and
11963
+ * stores t0 if the flag is on.
11964
+ */
11965
+ start() {
11966
+ this.enabled = shouldLogStartupTelemetry();
11967
+ if (!this.enabled)
11968
+ return;
11969
+ this.t0 = Date.now();
11970
+ this.lastMark = this.t0;
11971
+ this.decodeDuration = 0;
11972
+ this.processDuration = 0;
11973
+ this.placements = 0;
11974
+ this.firstLaunchLogged = false;
11975
+ }
11976
+ /**
11977
+ * Log a named phase checkpoint.
11978
+ *
11979
+ * - Emits `[NamiStartup] phase=<name> ms=<segment> [extras]`
11980
+ * - On phase `ready`: also emits `total_to_ready=<ms>` and a SUMMARY line.
11981
+ * - On phase `initial_config_decoded`: records the decode segment.
11982
+ * - On phase `initial_processed`: records the process segment + placement count.
11983
+ *
11984
+ * @param phase Phase key string (e.g. "initial_config_decoded").
11985
+ * @param extras Optional key/value pairs appended to the log line.
11986
+ */
11987
+ mark(phase, extras) {
11988
+ if (!this.enabled)
11989
+ return;
11990
+ const now = Date.now();
11991
+ const segmentMs = now - this.lastMark;
11992
+ this.lastMark = now;
11993
+ // Accumulate segment durations for SUMMARY
11994
+ if (phase === "initial_config_decoded") {
11995
+ this.decodeDuration = segmentMs;
11996
+ }
11997
+ else if (phase === "initial_processed") {
11998
+ this.processDuration = segmentMs;
11999
+ if (extras?.count !== undefined) {
12000
+ this.placements = extras.count;
12001
+ }
12002
+ }
12003
+ const extrasStr = extras
12004
+ ? " " + Object.entries(extras).map(([k, v]) => `${k}=${v}`).join(" ")
12005
+ : "";
12006
+ if (phase === "ready") {
12007
+ const totalToReady = now - this.t0;
12008
+ logger.info(`${PREFIX} phase=${phase} ms=${segmentMs} total_to_ready=${totalToReady}${extrasStr}`);
12009
+ logger.info(`${PREFIX} SUMMARY total_to_ready=${totalToReady} decode=${this.decodeDuration} process=${this.processDuration} placements=${this.placements}`);
12010
+ }
12011
+ else {
12012
+ logger.info(`${PREFIX} phase=${phase} ms=${segmentMs}${extrasStr}`);
12013
+ }
12014
+ }
12015
+ /**
12016
+ * Wrap the very first launch lookup call. Only the first invocation is
12017
+ * instrumented; subsequent calls return immediately without logging.
12018
+ *
12019
+ * @param label The campaign label being looked up.
12020
+ * @param fn The synchronous lookup function to time.
12021
+ * @returns The return value of `fn`.
12022
+ */
12023
+ firstLaunchLookup(label, fn) {
12024
+ if (!this.enabled || this.firstLaunchLogged) {
12025
+ return fn();
12026
+ }
12027
+ this.firstLaunchLogged = true;
12028
+ const t = Date.now();
12029
+ const result = fn();
12030
+ const ms = Date.now() - t;
12031
+ logger.info(`${PREFIX} phase=first_launch_lookup ms=${ms} label=${label}`);
12032
+ return result;
12033
+ }
12034
+ /**
12035
+ * Wrap the background server fetch. Logs duration and campaign count when
12036
+ * the promise settles.
12037
+ *
12038
+ * @param fn An async function that performs the server fetch.
12039
+ * @returns A promise that resolves/rejects with the same value as `fn`.
12040
+ */
12041
+ async serverFetch(fn) {
12042
+ if (!this.enabled)
12043
+ return fn();
12044
+ const t = Date.now();
12045
+ const result = await fn();
12046
+ const ms = Date.now() - t;
12047
+ logger.info(`${PREFIX} phase=server_fetch ms=${ms} campaigns=${result.length}`);
12048
+ return result;
12049
+ }
12050
+ }
12051
+ const startupTelemetry = new StartupTelemetry();
12052
+
11932
12053
  class NamiRefs {
11933
12054
  constructor() {
11934
12055
  // In-memory flag for device registration failures (not persisted)
@@ -11996,7 +12117,9 @@ class NamiRefs {
11996
12117
  : this.initIdentifiedDevice(config);
11997
12118
  const splitPosition = audienceSplitPosition(deviceId);
11998
12119
  if (initialConfig.campaign_rules) {
11999
- storageService.setCampaignRules(exports.INITIAL_CAMPAIGN_RULES, mapAnonymousCampaigns(initialConfig.campaign_rules, splitPosition, currentFormFactor));
12120
+ const mappedCampaigns = mapAnonymousCampaigns(initialConfig.campaign_rules, splitPosition, currentFormFactor);
12121
+ storageService.setCampaignRules(exports.INITIAL_CAMPAIGN_RULES, mappedCampaigns);
12122
+ startupTelemetry.mark("initial_processed", { count: mappedCampaigns.length });
12000
12123
  }
12001
12124
  if (deviceTask)
12002
12125
  await deviceTask;
@@ -12006,7 +12129,7 @@ class NamiRefs {
12006
12129
  ProductRepository.instance.fetchProducts(),
12007
12130
  CustomerJourneyRepository.instance.fetchCustomerJourneyState(),
12008
12131
  EntitlementRepository.instance.fetchActiveEntitlements(),
12009
- this.fetchCampaignsAndPaywalls(),
12132
+ startupTelemetry.serverFetch(() => this.fetchCampaignsAndPaywalls()),
12010
12133
  ]).catch(async (error) => {
12011
12134
  if (error instanceof ConflictError) {
12012
12135
  storageService.resetDevice();
@@ -12234,10 +12357,12 @@ class Nami {
12234
12357
  * @returns {Promise<NamiConfigurationState>}
12235
12358
  */
12236
12359
  static async configure(options) {
12360
+ startupTelemetry.start();
12237
12361
  if (!options.appPlatformID) {
12238
12362
  throw new PlatformIDRequiredError();
12239
12363
  }
12240
12364
  this.setInitialConfig(options);
12365
+ startupTelemetry.mark("initial_config_decoded");
12241
12366
  return await Nami.instance.initializeSDK(options);
12242
12367
  }
12243
12368
  static setInitialConfig(config) {
@@ -12316,6 +12441,7 @@ class Nami {
12316
12441
  logger.info("SDK successfully initialized!");
12317
12442
  const state = partialReconfig || fullReconfig ? exports.RECONFIG_SUCCESS : exports.INITIAL_SUCCESS;
12318
12443
  getPlatformAdapters().ui.postConfigure?.();
12444
+ startupTelemetry.mark("ready");
12319
12445
  return {
12320
12446
  sdkInitialized: true,
12321
12447
  configureState: state,
@@ -12416,6 +12542,7 @@ exports.NamiFlowActionFunction = void 0;
12416
12542
  NamiFlowActionFunction["SET_TAGS"] = "setTags";
12417
12543
  NamiFlowActionFunction["PAUSE"] = "flowPause";
12418
12544
  NamiFlowActionFunction["RESUME"] = "flowResume";
12545
+ NamiFlowActionFunction["SET_LAUNCH_CONTEXT"] = "setLaunchContext";
12419
12546
  })(exports.NamiFlowActionFunction || (exports.NamiFlowActionFunction = {}));
12420
12547
  const HandoffTag = {
12421
12548
  SEQUENCE: '__handoff_sequence__',
@@ -12999,6 +13126,16 @@ class FlowLiquidResolver {
12999
13126
  const idx = screenState?.getSelectedSlideIndexForCurrentCarousel();
13000
13127
  return idx != null ? `${idx + 1}` : undefined;
13001
13128
  }
13129
+ case "productGroupId":
13130
+ return PaywallState.currentProvider?.state.currentGroupId || undefined;
13131
+ case "productGroupName": {
13132
+ const s = PaywallState.currentProvider?.state;
13133
+ return s?.groups?.find(g => g.id === s.currentGroupId)?.displayName ?? undefined;
13134
+ }
13135
+ case "productGroupRef": {
13136
+ const s = PaywallState.currentProvider?.state;
13137
+ return s?.groups?.find(g => g.id === s.currentGroupId)?.ref ?? undefined;
13138
+ }
13002
13139
  default:
13003
13140
  return undefined;
13004
13141
  }
@@ -13983,6 +14120,16 @@ class NamiFlow extends BasicNamiFlow {
13983
14120
  this.forward(entry.id);
13984
14121
  }
13985
14122
  }
14123
+ applyLaunchContextAttributes(attrs) {
14124
+ if (!this.context) {
14125
+ this.context = { customAttributes: {} };
14126
+ new LaunchContextResolver(this.context);
14127
+ }
14128
+ // Guard against a runtime-supplied context that omits customAttributes
14129
+ // (the field is required by the type but may be absent in untyped JSON).
14130
+ this.context.customAttributes ??= {};
14131
+ Object.assign(this.context.customAttributes, attrs);
14132
+ }
13986
14133
  registerResolvers(context) {
13987
14134
  if (context) {
13988
14135
  new LaunchContextResolver(context);
@@ -14239,6 +14386,9 @@ class NamiFlow extends BasicNamiFlow {
14239
14386
  this.back();
14240
14387
  break;
14241
14388
  case exports.NamiFlowActionFunction.NEXT:
14389
+ if (action.parameters?.customAttributes) {
14390
+ this.applyLaunchContextAttributes(action.parameters.customAttributes);
14391
+ }
14242
14392
  if (action.parameters?.step) {
14243
14393
  this.forward(action.parameters.step);
14244
14394
  }
@@ -14247,6 +14397,9 @@ class NamiFlow extends BasicNamiFlow {
14247
14397
  }
14248
14398
  break;
14249
14399
  case exports.NamiFlowActionFunction.NAVIGATE:
14400
+ if (action.parameters?.customAttributes) {
14401
+ this.applyLaunchContextAttributes(action.parameters.customAttributes);
14402
+ }
14250
14403
  if (action.parameters?.step) {
14251
14404
  if (this.previousFlowStep?.id === action.parameters.step) {
14252
14405
  this.back();
@@ -14372,6 +14525,20 @@ class NamiFlow extends BasicNamiFlow {
14372
14525
  });
14373
14526
  }
14374
14527
  break;
14528
+ case exports.NamiFlowActionFunction.SET_LAUNCH_CONTEXT: {
14529
+ // Two supported shapes (matches the nav-action customAttributes wire shape
14530
+ // and the { key, value } shape used by Apple/Android/Roku). We deliberately
14531
+ // do NOT treat arbitrary top-level parameters as attributes, to avoid writing
14532
+ // reserved keys (step, delay, …) into the launch context.
14533
+ const params = action.parameters;
14534
+ if (params?.customAttributes) {
14535
+ this.applyLaunchContextAttributes(params.customAttributes);
14536
+ }
14537
+ else if (params?.key !== undefined && params?.value !== undefined) {
14538
+ this.applyLaunchContextAttributes({ [params.key]: params.value });
14539
+ }
14540
+ break;
14541
+ }
14375
14542
  default:
14376
14543
  logger.warn(`Missing action handler for ${action.function}`, action);
14377
14544
  break;
@@ -14599,7 +14766,7 @@ let NamiCampaignManager$2 = class NamiCampaignManager {
14599
14766
  resultCallback(false, exports.LaunchCampaignError.SDK_NOT_INITIALIZED);
14600
14767
  throw new SDKNotInitializedError();
14601
14768
  }
14602
- const data = getPaywallDataFromLabel(value, type);
14769
+ const data = startupTelemetry.firstLaunchLookup(value, () => getPaywallDataFromLabel(value, type));
14603
14770
  let paywall = data.paywall;
14604
14771
  const campaign = data.campaign;
14605
14772
  if (!campaign || (!paywall && !campaign.flow)) {
@@ -64295,6 +64462,29 @@ const convertLocale = (locale) => {
64295
64462
  return intlLocale.language + (intlLocale.region ?? intlLocale.script ?? '');
64296
64463
  };
64297
64464
 
64465
+ /**
64466
+ * Coerces the four launch-context wire-format variants of a boolean —
64467
+ * `true`, `false`, `"true"`, `"false"` — into a JS `boolean`.
64468
+ *
64469
+ * Returns `undefined` for everything else (case-variant strings, numbers,
64470
+ * `null`, `undefined`, empty string, objects). Callers decide how to treat
64471
+ * the `undefined` case; the helper deliberately does not coerce numerics or
64472
+ * mixed-case strings so unintended truthy-by-presence behavior doesn't sneak
64473
+ * back in.
64474
+ */
64475
+ function coerceBooleanish(value) {
64476
+ if (value === true || value === false) {
64477
+ return value;
64478
+ }
64479
+ if (typeof value === 'string') {
64480
+ if (value === 'true')
64481
+ return true;
64482
+ if (value === 'false')
64483
+ return false;
64484
+ }
64485
+ return undefined;
64486
+ }
64487
+
64298
64488
  /**
64299
64489
  * Components that are skipped entirely (they and their subtree do not
64300
64490
  * contribute text to the page-level announcement).
@@ -64646,6 +64836,7 @@ exports.bestUrlCampaignMatch = bestUrlCampaignMatch;
64646
64836
  exports.bigintToUuid = bigintToUuid;
64647
64837
  exports.checkAnySkuHasPromoOffer = checkAnySkuHasPromoOffer;
64648
64838
  exports.checkAnySkuHasTrialOffer = checkAnySkuHasTrialOffer;
64839
+ exports.coerceBooleanish = coerceBooleanish;
64649
64840
  exports.convertISO8601PeriodToText = convertISO8601PeriodToText;
64650
64841
  exports.convertLocale = convertLocale;
64651
64842
  exports.convertOfferToPricingPhase = convertOfferToPricingPhase;
package/dist/index.d.ts CHANGED
@@ -130,7 +130,8 @@ declare enum NamiFlowActionFunction {
130
130
  FLOW_DISABLED = "flowInteractionDisabled",
131
131
  SET_TAGS = "setTags",
132
132
  PAUSE = "flowPause",
133
- RESUME = "flowResume"
133
+ RESUME = "flowResume",
134
+ SET_LAUNCH_CONTEXT = "setLaunchContext"
134
135
  }
135
136
  type NamiFlowHandoffStepHandler = (handoffTag: string, handoffData?: Record<string, any>) => void;
136
137
  type NamiFlowEventHandler = (eventHandler: Record<string, any>) => void;
@@ -1280,6 +1281,15 @@ type NamiPaywallEvent = {
1280
1281
  purchaseChannel?: string;
1281
1282
  };
1282
1283
  type NamiPaywallActionHandler = (event: NamiPaywallEvent) => void;
1284
+ /**
1285
+ * Permitted value types for entries in {@link NamiPaywallLaunchContext.customAttributes}.
1286
+ *
1287
+ * Both native primitives and their string equivalents are accepted so integrators can
1288
+ * pass `true`/`false` directly or `"true"`/`"false"` from a stringly-typed source
1289
+ * (e.g. a remote-config blob). Targeting predicates treat the two wire formats
1290
+ * identically — see `coerceBooleanish()`.
1291
+ */
1292
+ type NamiCustomAttributeValue = string | boolean | number;
1283
1293
  /**
1284
1294
  * @type NamiPaywallLaunchContext
1285
1295
  * Will be used to pass custom context while launching paywall
@@ -1287,7 +1297,7 @@ type NamiPaywallActionHandler = (event: NamiPaywallEvent) => void;
1287
1297
  type NamiPaywallLaunchContext = {
1288
1298
  productGroups?: string[];
1289
1299
  customAttributes: {
1290
- [key: string]: string;
1300
+ [key: string]: NamiCustomAttributeValue;
1291
1301
  };
1292
1302
  customObject?: {
1293
1303
  [key: string]: any;
@@ -1907,6 +1917,7 @@ declare class NamiFlow extends BasicNamiFlow {
1907
1917
  [timerId: string]: TimerState;
1908
1918
  };
1909
1919
  constructor(campaign: NamiFlowCampaign, paywall: PaywallHandle, manager: NamiFlowManager$2, context?: NamiPaywallLaunchContext);
1920
+ private applyLaunchContextAttributes;
1910
1921
  private registerResolvers;
1911
1922
  get currentFlowStep(): NamiFlowStep | undefined;
1912
1923
  get nextStepAvailable(): boolean;
@@ -2555,6 +2566,7 @@ declare const EXTENDED_CLIENT_INFO_DELIMITER: string;
2555
2566
  declare const VALIDATE_PRODUCT_GROUPS: string;
2556
2567
  declare const LOG_HTTP_REQUESTS: string;
2557
2568
  declare const LOG_HTTP_TRAFFIC: string;
2569
+ declare const STARTUP_TELEMETRY: string;
2558
2570
  declare const EXTENDED_PLATFORM: string;
2559
2571
  declare const EXTENDED_PLATFORM_VERSION: string;
2560
2572
  declare const API_MAX_CALLS_LIMIT: number;
@@ -2643,6 +2655,18 @@ interface INamiRefsInstance {
2643
2655
  */
2644
2656
  declare function isAnonymousMode(): boolean;
2645
2657
 
2658
+ /**
2659
+ * Coerces the four launch-context wire-format variants of a boolean —
2660
+ * `true`, `false`, `"true"`, `"false"` — into a JS `boolean`.
2661
+ *
2662
+ * Returns `undefined` for everything else (case-variant strings, numbers,
2663
+ * `null`, `undefined`, empty string, objects). Callers decide how to treat
2664
+ * the `undefined` case; the helper deliberately does not coerce numerics or
2665
+ * mixed-case strings so unintended truthy-by-presence behavior doesn't sneak
2666
+ * back in.
2667
+ */
2668
+ declare function coerceBooleanish(value: unknown): boolean | undefined;
2669
+
2646
2670
  /**
2647
2671
  * Build the full-screen announcement string for a paywall page per the
2648
2672
  * TV Full-Page Announcement contract
@@ -3451,5 +3475,5 @@ declare namespace internal {
3451
3475
  };
3452
3476
  }
3453
3477
 
3454
- 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$2 as NamiCampaignManager, NamiCampaignRuleType, NamiConditionEvaluator, NamiCustomerManager$2 as NamiCustomerManager, NamiEntitlementManager$2 as NamiEntitlementManager, NamiEventEmitter, NamiFlow, NamiFlowActionFunction, NamiFlowManager$1 as NamiFlowManager, NamiFlowStepType, NamiPaywallAction, NamiPaywallManager$2 as NamiPaywallManager, PaywallManagerEvents as NamiPaywallManagerEvents, NamiPurchaseManager$2 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, 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, 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 };
3455
- export type { AccountStateHandler$1 as AccountStateHandler, AlignmentType, AmazonProduct, ApiResponse, AppleProduct, AvailableCampaignsResponseHandler, BorderLocationType, BorderSideType, Callback$1 as Callback, CloseHandler, CustomerJourneyState, DeepLinkUrlHandler, Device, DevicePayload, DeviceProfile, DirectionType, ExtendedPlatformInfo, FlexDirectionObject, FlowNavigationOptions, FontCollection, FontDetails, FormFactor, GoogleProduct, IConfig, IDeviceAdapter, IEntitlements$1 as IEntitlements, IPaywall, IPlatformAdapters, IProductsWithComponents, IPurchaseAdapter, ISkuMenu, IStorageAdapter, IUIAdapter, Impression, InitialConfig, InitialConfigCompressed, InitiateStateGroup, LoginResponse, NamiAnimation, NamiAnimationObjectSpec, NamiAnimationSpec, NamiAnonymousCampaign, NamiAppSuppliedVideoDetails, NamiCampaign, NamiCampaignManagerStatic, NamiCampaignSegment, NamiConfiguration, NamiConfigurationState, NamiCustomerManagerStatic, NamiEntitlement$1 as NamiEntitlement, NamiEntitlementManagerStatic, NamiFlowAction, NamiFlowAnimation, NamiFlowCampaign, NamiFlowDTO, NamiFlowEventHandler, NamiFlowHandoffStepHandler, NamiFlowManagerStatic, NamiFlowObjectDTO, NamiFlowOn, NamiFlowStep, NamiFlowTransition, NamiFlowTransitionDirection, NamiFlowWithObject, NamiInitialConfig, NamiLanguageCodes, NamiLogLevel, NamiPaywallActionHandler, NamiPaywallComponentChange, NamiPaywallEvent, NamiPaywallEventVideoMetadata, NamiPaywallLaunchContext, NamiPaywallManagerStatic, NamiPresentationStyle, NamiProductDetails, NamiProductOffer, NamiProfile, NamiPurchase, NamiPurchaseCompleteResult, NamiPurchaseDetails, NamiPurchaseManagerStatic, NamiPurchasesState, NamiSKU, NamiSKUType, NamiSubscriptionInterval, NamiSubscriptionPeriod, None, NoneSpec, PaywallActionEvent, PaywallHandle, PaywallResultHandler, PaywallSKU, PricingPhase, ProductGroup, Pulse, PulseSpec, PurchaseContext, PurchaseResult, PurchaseValidationRequest, SKU, SKUActionHandler, ScreenInfo, Session, TBaseComponent, TButtonContainer, TCarouselContainer, TCarouselSlide, TCarouselSlidesState, TCollapseContainer, TComponent, TConditionalAttributes, TConditionalComponent, TContainer, TContainerPosition, TCountdownTimerTextComponent, TDevice, TDisabledButton, TField, TFieldSettings, TFlexProductContainer, THeaderFooter, TImageComponent, TInitialState, TMediaTypes, TOffer, TPages, TPaywallContext, TPaywallLaunchContext, TPaywallMedia, TPaywallTemplate, TPlayPauseButton, TProductContainer, TProductGroup, TProgressBarComponent, TProgressIndicatorComponent, TQRCodeComponent, TRadioButton, TRepeatingGrid, TResponsiveGrid, TSegmentPicker, TSegmentPickerItem, TSemverObj, TSpacerComponent, TStack, TSvgImageComponent, TSymbolComponent, TTestObject, TTextComponent, TTextLikeComponent, TTextListComponent, TToggleButtonComponent, TToggleSwitch, TVariablePattern, TVideoComponent, TVolumeButton, TimerState, TransactionRequest, UserAction, UserActionParameters, Wave, WaveSpec };
3478
+ 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$2 as NamiCampaignManager, NamiCampaignRuleType, NamiConditionEvaluator, NamiCustomerManager$2 as NamiCustomerManager, NamiEntitlementManager$2 as NamiEntitlementManager, NamiEventEmitter, NamiFlow, NamiFlowActionFunction, NamiFlowManager$1 as NamiFlowManager, NamiFlowStepType, NamiPaywallAction, NamiPaywallManager$2 as NamiPaywallManager, PaywallManagerEvents as NamiPaywallManagerEvents, NamiPurchaseManager$2 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 };
3479
+ export type { AccountStateHandler$1 as AccountStateHandler, AlignmentType, AmazonProduct, ApiResponse, AppleProduct, AvailableCampaignsResponseHandler, BorderLocationType, BorderSideType, Callback$1 as Callback, CloseHandler, CustomerJourneyState, DeepLinkUrlHandler, Device, DevicePayload, DeviceProfile, DirectionType, ExtendedPlatformInfo, FlexDirectionObject, FlowNavigationOptions, FontCollection, FontDetails, FormFactor, GoogleProduct, IConfig, IDeviceAdapter, IEntitlements$1 as IEntitlements, IPaywall, IPlatformAdapters, IProductsWithComponents, IPurchaseAdapter, ISkuMenu, IStorageAdapter, IUIAdapter, Impression, InitialConfig, InitialConfigCompressed, InitiateStateGroup, LoginResponse, NamiAnimation, NamiAnimationObjectSpec, NamiAnimationSpec, NamiAnonymousCampaign, NamiAppSuppliedVideoDetails, NamiCampaign, NamiCampaignManagerStatic, NamiCampaignSegment, NamiConfiguration, NamiConfigurationState, NamiCustomAttributeValue, NamiCustomerManagerStatic, NamiEntitlement$1 as NamiEntitlement, NamiEntitlementManagerStatic, NamiFlowAction, NamiFlowAnimation, NamiFlowCampaign, NamiFlowDTO, NamiFlowEventHandler, NamiFlowHandoffStepHandler, NamiFlowManagerStatic, NamiFlowObjectDTO, NamiFlowOn, NamiFlowStep, NamiFlowTransition, NamiFlowTransitionDirection, NamiFlowWithObject, NamiInitialConfig, NamiLanguageCodes, NamiLogLevel, NamiPaywallActionHandler, NamiPaywallComponentChange, NamiPaywallEvent, NamiPaywallEventVideoMetadata, NamiPaywallLaunchContext, NamiPaywallManagerStatic, NamiPresentationStyle, NamiProductDetails, NamiProductOffer, NamiProfile, NamiPurchase, NamiPurchaseCompleteResult, NamiPurchaseDetails, NamiPurchaseManagerStatic, NamiPurchasesState, NamiSKU, NamiSKUType, NamiSubscriptionInterval, NamiSubscriptionPeriod, None, NoneSpec, PaywallActionEvent, PaywallHandle, PaywallResultHandler, PaywallSKU, PricingPhase, ProductGroup, Pulse, PulseSpec, PurchaseContext, PurchaseResult, PurchaseValidationRequest, SKU, SKUActionHandler, ScreenInfo, Session, TBaseComponent, TButtonContainer, TCarouselContainer, TCarouselSlide, TCarouselSlidesState, TCollapseContainer, TComponent, TConditionalAttributes, TConditionalComponent, TContainer, TContainerPosition, TCountdownTimerTextComponent, TDevice, TDisabledButton, TField, TFieldSettings, TFlexProductContainer, THeaderFooter, TImageComponent, TInitialState, TMediaTypes, TOffer, TPages, TPaywallContext, TPaywallLaunchContext, TPaywallMedia, TPaywallTemplate, TPlayPauseButton, TProductContainer, TProductGroup, TProgressBarComponent, TProgressIndicatorComponent, TQRCodeComponent, TRadioButton, TRepeatingGrid, TResponsiveGrid, TSegmentPicker, TSegmentPickerItem, TSemverObj, TSpacerComponent, TStack, TSvgImageComponent, TSymbolComponent, TTestObject, TTextComponent, TTextLikeComponent, TTextListComponent, TToggleButtonComponent, TToggleSwitch, TVariablePattern, TVideoComponent, TVolumeButton, TimerState, TransactionRequest, UserAction, UserActionParameters, Wave, WaveSpec };
package/dist/index.mjs CHANGED
@@ -94,9 +94,9 @@ var Capabilities;
94
94
 
95
95
  const {
96
96
  // version — stamped by scripts/version.sh
97
- NAMI_SDK_VERSION = "3.4.1",
97
+ NAMI_SDK_VERSION = "3.4.2",
98
98
  // full package version including dev suffix — stamped by scripts/version.sh
99
- NAMI_SDK_PACKAGE_VERSION = "3.4.1",
99
+ NAMI_SDK_PACKAGE_VERSION = "3.4.2-dev.202606022148",
100
100
  // environments
101
101
  PRODUCTION = "production", DEVELOPMENT = "development",
102
102
  // error messages
@@ -106,7 +106,7 @@ AUTH_DEVICE = "nami_auth_device", NAMI_CONFIGURATION = "nami_configuration", NAM
106
106
  // API settings
107
107
  API_VERSION = "v3", BASE_URL_PATH = `sdk/${API_VERSION}/platform`, BASE_URL = "https://app.namiml.com", BASE_STAGING_URL = "https://app-staging.namiml.com", CUSTOM_HOST_PREFIX = "namiAPIHost=", USE_STAGING_API = "useStagingAPI",
108
108
  // // extended client info
109
- EXTENDED_CLIENT_INFO_PREFIX = "extendedClientInfo", EXTENDED_CLIENT_INFO_DELIMITER = ":", VALIDATE_PRODUCT_GROUPS = "validateProductGroups", LOG_HTTP_REQUESTS = "logHTTPRequests", LOG_HTTP_TRAFFIC = "logHTTPTraffic", EXTENDED_PLATFORM = "extended-platform", EXTENDED_PLATFORM_VERSION = "extended-platform-version", API_MAX_CALLS_LIMIT = 2, API_RETRY_DELAY_SEC = 2, API_TIMEOUT_LIMIT = 20000, DEVICE_API_TIMEOUT_LIMIT = 2000,
109
+ EXTENDED_CLIENT_INFO_PREFIX = "extendedClientInfo", EXTENDED_CLIENT_INFO_DELIMITER = ":", VALIDATE_PRODUCT_GROUPS = "validateProductGroups", LOG_HTTP_REQUESTS = "logHTTPRequests", LOG_HTTP_TRAFFIC = "logHTTPTraffic", STARTUP_TELEMETRY = "startupTelemetry", EXTENDED_PLATFORM = "extended-platform", EXTENDED_PLATFORM_VERSION = "extended-platform-version", API_MAX_CALLS_LIMIT = 2, API_RETRY_DELAY_SEC = 2, API_TIMEOUT_LIMIT = 20000, DEVICE_API_TIMEOUT_LIMIT = 2000,
110
110
  // status codes
111
111
  STATUS_SUCCESS = 200, STATUS_BAD_REQUEST = 400, STATUS_NOT_FOUND = 404, STATUS_CONFLICT = 409, STATUS_INTERNAL_SERVER_ERROR = 500,
112
112
  // configuration states
@@ -6801,6 +6801,10 @@ const shouldLogHTTPTraffic = () => {
6801
6801
  const namiCommands = storageService.getNamiConfig()?.namiCommands;
6802
6802
  return namiCommands?.includes(LOG_HTTP_TRAFFIC) ?? false;
6803
6803
  };
6804
+ const shouldLogStartupTelemetry = () => {
6805
+ const namiCommands = storageService.getNamiConfig()?.namiCommands;
6806
+ return namiCommands?.includes(STARTUP_TELEMETRY) ?? false;
6807
+ };
6804
6808
  function tryParseJson(str) {
6805
6809
  const trimmed = str.trim();
6806
6810
  if (!trimmed.startsWith("{") && !trimmed.startsWith("["))
@@ -11927,6 +11931,123 @@ class CustomerJourneyRepository {
11927
11931
  }
11928
11932
  CustomerJourneyRepository.instance = new CustomerJourneyRepository();
11929
11933
 
11934
+ const PREFIX = "[NamiStartup]";
11935
+ /**
11936
+ * Module-level singleton for startup timing instrumentation.
11937
+ *
11938
+ * All methods are cheap no-ops when the `startupTelemetry` namiCommand flag
11939
+ * is absent. The flag is read once at `start()` and cached; subsequent calls
11940
+ * to `mark()` and the span helpers use that cached boolean so the hot path
11941
+ * never hits storage.
11942
+ *
11943
+ * Log format (info level via the shared logger):
11944
+ * [NamiStartup] phase=<name> ms=<n>
11945
+ * [NamiStartup] SUMMARY total_to_ready=<ms> decode=<ms> process=<ms> placements=<n>
11946
+ */
11947
+ class StartupTelemetry {
11948
+ constructor() {
11949
+ this.enabled = false;
11950
+ this.t0 = 0;
11951
+ this.lastMark = 0;
11952
+ // Accumulated segment durations for the SUMMARY line
11953
+ this.decodeDuration = 0;
11954
+ this.processDuration = 0;
11955
+ this.placements = 0;
11956
+ // One-shot guard: only log the very first launch lookup
11957
+ this.firstLaunchLogged = false;
11958
+ }
11959
+ /**
11960
+ * Call at the first line of configure(). Reads the feature flag once and
11961
+ * stores t0 if the flag is on.
11962
+ */
11963
+ start() {
11964
+ this.enabled = shouldLogStartupTelemetry();
11965
+ if (!this.enabled)
11966
+ return;
11967
+ this.t0 = Date.now();
11968
+ this.lastMark = this.t0;
11969
+ this.decodeDuration = 0;
11970
+ this.processDuration = 0;
11971
+ this.placements = 0;
11972
+ this.firstLaunchLogged = false;
11973
+ }
11974
+ /**
11975
+ * Log a named phase checkpoint.
11976
+ *
11977
+ * - Emits `[NamiStartup] phase=<name> ms=<segment> [extras]`
11978
+ * - On phase `ready`: also emits `total_to_ready=<ms>` and a SUMMARY line.
11979
+ * - On phase `initial_config_decoded`: records the decode segment.
11980
+ * - On phase `initial_processed`: records the process segment + placement count.
11981
+ *
11982
+ * @param phase Phase key string (e.g. "initial_config_decoded").
11983
+ * @param extras Optional key/value pairs appended to the log line.
11984
+ */
11985
+ mark(phase, extras) {
11986
+ if (!this.enabled)
11987
+ return;
11988
+ const now = Date.now();
11989
+ const segmentMs = now - this.lastMark;
11990
+ this.lastMark = now;
11991
+ // Accumulate segment durations for SUMMARY
11992
+ if (phase === "initial_config_decoded") {
11993
+ this.decodeDuration = segmentMs;
11994
+ }
11995
+ else if (phase === "initial_processed") {
11996
+ this.processDuration = segmentMs;
11997
+ if (extras?.count !== undefined) {
11998
+ this.placements = extras.count;
11999
+ }
12000
+ }
12001
+ const extrasStr = extras
12002
+ ? " " + Object.entries(extras).map(([k, v]) => `${k}=${v}`).join(" ")
12003
+ : "";
12004
+ if (phase === "ready") {
12005
+ const totalToReady = now - this.t0;
12006
+ logger.info(`${PREFIX} phase=${phase} ms=${segmentMs} total_to_ready=${totalToReady}${extrasStr}`);
12007
+ logger.info(`${PREFIX} SUMMARY total_to_ready=${totalToReady} decode=${this.decodeDuration} process=${this.processDuration} placements=${this.placements}`);
12008
+ }
12009
+ else {
12010
+ logger.info(`${PREFIX} phase=${phase} ms=${segmentMs}${extrasStr}`);
12011
+ }
12012
+ }
12013
+ /**
12014
+ * Wrap the very first launch lookup call. Only the first invocation is
12015
+ * instrumented; subsequent calls return immediately without logging.
12016
+ *
12017
+ * @param label The campaign label being looked up.
12018
+ * @param fn The synchronous lookup function to time.
12019
+ * @returns The return value of `fn`.
12020
+ */
12021
+ firstLaunchLookup(label, fn) {
12022
+ if (!this.enabled || this.firstLaunchLogged) {
12023
+ return fn();
12024
+ }
12025
+ this.firstLaunchLogged = true;
12026
+ const t = Date.now();
12027
+ const result = fn();
12028
+ const ms = Date.now() - t;
12029
+ logger.info(`${PREFIX} phase=first_launch_lookup ms=${ms} label=${label}`);
12030
+ return result;
12031
+ }
12032
+ /**
12033
+ * Wrap the background server fetch. Logs duration and campaign count when
12034
+ * the promise settles.
12035
+ *
12036
+ * @param fn An async function that performs the server fetch.
12037
+ * @returns A promise that resolves/rejects with the same value as `fn`.
12038
+ */
12039
+ async serverFetch(fn) {
12040
+ if (!this.enabled)
12041
+ return fn();
12042
+ const t = Date.now();
12043
+ const result = await fn();
12044
+ const ms = Date.now() - t;
12045
+ logger.info(`${PREFIX} phase=server_fetch ms=${ms} campaigns=${result.length}`);
12046
+ return result;
12047
+ }
12048
+ }
12049
+ const startupTelemetry = new StartupTelemetry();
12050
+
11930
12051
  class NamiRefs {
11931
12052
  constructor() {
11932
12053
  // In-memory flag for device registration failures (not persisted)
@@ -11994,7 +12115,9 @@ class NamiRefs {
11994
12115
  : this.initIdentifiedDevice(config);
11995
12116
  const splitPosition = audienceSplitPosition(deviceId);
11996
12117
  if (initialConfig.campaign_rules) {
11997
- storageService.setCampaignRules(INITIAL_CAMPAIGN_RULES, mapAnonymousCampaigns(initialConfig.campaign_rules, splitPosition, currentFormFactor));
12118
+ const mappedCampaigns = mapAnonymousCampaigns(initialConfig.campaign_rules, splitPosition, currentFormFactor);
12119
+ storageService.setCampaignRules(INITIAL_CAMPAIGN_RULES, mappedCampaigns);
12120
+ startupTelemetry.mark("initial_processed", { count: mappedCampaigns.length });
11998
12121
  }
11999
12122
  if (deviceTask)
12000
12123
  await deviceTask;
@@ -12004,7 +12127,7 @@ class NamiRefs {
12004
12127
  ProductRepository.instance.fetchProducts(),
12005
12128
  CustomerJourneyRepository.instance.fetchCustomerJourneyState(),
12006
12129
  EntitlementRepository.instance.fetchActiveEntitlements(),
12007
- this.fetchCampaignsAndPaywalls(),
12130
+ startupTelemetry.serverFetch(() => this.fetchCampaignsAndPaywalls()),
12008
12131
  ]).catch(async (error) => {
12009
12132
  if (error instanceof ConflictError) {
12010
12133
  storageService.resetDevice();
@@ -12232,10 +12355,12 @@ class Nami {
12232
12355
  * @returns {Promise<NamiConfigurationState>}
12233
12356
  */
12234
12357
  static async configure(options) {
12358
+ startupTelemetry.start();
12235
12359
  if (!options.appPlatformID) {
12236
12360
  throw new PlatformIDRequiredError();
12237
12361
  }
12238
12362
  this.setInitialConfig(options);
12363
+ startupTelemetry.mark("initial_config_decoded");
12239
12364
  return await Nami.instance.initializeSDK(options);
12240
12365
  }
12241
12366
  static setInitialConfig(config) {
@@ -12314,6 +12439,7 @@ class Nami {
12314
12439
  logger.info("SDK successfully initialized!");
12315
12440
  const state = partialReconfig || fullReconfig ? RECONFIG_SUCCESS : INITIAL_SUCCESS;
12316
12441
  getPlatformAdapters().ui.postConfigure?.();
12442
+ startupTelemetry.mark("ready");
12317
12443
  return {
12318
12444
  sdkInitialized: true,
12319
12445
  configureState: state,
@@ -12414,6 +12540,7 @@ var NamiFlowActionFunction;
12414
12540
  NamiFlowActionFunction["SET_TAGS"] = "setTags";
12415
12541
  NamiFlowActionFunction["PAUSE"] = "flowPause";
12416
12542
  NamiFlowActionFunction["RESUME"] = "flowResume";
12543
+ NamiFlowActionFunction["SET_LAUNCH_CONTEXT"] = "setLaunchContext";
12417
12544
  })(NamiFlowActionFunction || (NamiFlowActionFunction = {}));
12418
12545
  const HandoffTag = {
12419
12546
  SEQUENCE: '__handoff_sequence__',
@@ -12997,6 +13124,16 @@ class FlowLiquidResolver {
12997
13124
  const idx = screenState?.getSelectedSlideIndexForCurrentCarousel();
12998
13125
  return idx != null ? `${idx + 1}` : undefined;
12999
13126
  }
13127
+ case "productGroupId":
13128
+ return PaywallState.currentProvider?.state.currentGroupId || undefined;
13129
+ case "productGroupName": {
13130
+ const s = PaywallState.currentProvider?.state;
13131
+ return s?.groups?.find(g => g.id === s.currentGroupId)?.displayName ?? undefined;
13132
+ }
13133
+ case "productGroupRef": {
13134
+ const s = PaywallState.currentProvider?.state;
13135
+ return s?.groups?.find(g => g.id === s.currentGroupId)?.ref ?? undefined;
13136
+ }
13000
13137
  default:
13001
13138
  return undefined;
13002
13139
  }
@@ -13981,6 +14118,16 @@ class NamiFlow extends BasicNamiFlow {
13981
14118
  this.forward(entry.id);
13982
14119
  }
13983
14120
  }
14121
+ applyLaunchContextAttributes(attrs) {
14122
+ if (!this.context) {
14123
+ this.context = { customAttributes: {} };
14124
+ new LaunchContextResolver(this.context);
14125
+ }
14126
+ // Guard against a runtime-supplied context that omits customAttributes
14127
+ // (the field is required by the type but may be absent in untyped JSON).
14128
+ this.context.customAttributes ??= {};
14129
+ Object.assign(this.context.customAttributes, attrs);
14130
+ }
13984
14131
  registerResolvers(context) {
13985
14132
  if (context) {
13986
14133
  new LaunchContextResolver(context);
@@ -14237,6 +14384,9 @@ class NamiFlow extends BasicNamiFlow {
14237
14384
  this.back();
14238
14385
  break;
14239
14386
  case NamiFlowActionFunction.NEXT:
14387
+ if (action.parameters?.customAttributes) {
14388
+ this.applyLaunchContextAttributes(action.parameters.customAttributes);
14389
+ }
14240
14390
  if (action.parameters?.step) {
14241
14391
  this.forward(action.parameters.step);
14242
14392
  }
@@ -14245,6 +14395,9 @@ class NamiFlow extends BasicNamiFlow {
14245
14395
  }
14246
14396
  break;
14247
14397
  case NamiFlowActionFunction.NAVIGATE:
14398
+ if (action.parameters?.customAttributes) {
14399
+ this.applyLaunchContextAttributes(action.parameters.customAttributes);
14400
+ }
14248
14401
  if (action.parameters?.step) {
14249
14402
  if (this.previousFlowStep?.id === action.parameters.step) {
14250
14403
  this.back();
@@ -14370,6 +14523,20 @@ class NamiFlow extends BasicNamiFlow {
14370
14523
  });
14371
14524
  }
14372
14525
  break;
14526
+ case NamiFlowActionFunction.SET_LAUNCH_CONTEXT: {
14527
+ // Two supported shapes (matches the nav-action customAttributes wire shape
14528
+ // and the { key, value } shape used by Apple/Android/Roku). We deliberately
14529
+ // do NOT treat arbitrary top-level parameters as attributes, to avoid writing
14530
+ // reserved keys (step, delay, …) into the launch context.
14531
+ const params = action.parameters;
14532
+ if (params?.customAttributes) {
14533
+ this.applyLaunchContextAttributes(params.customAttributes);
14534
+ }
14535
+ else if (params?.key !== undefined && params?.value !== undefined) {
14536
+ this.applyLaunchContextAttributes({ [params.key]: params.value });
14537
+ }
14538
+ break;
14539
+ }
14373
14540
  default:
14374
14541
  logger.warn(`Missing action handler for ${action.function}`, action);
14375
14542
  break;
@@ -14597,7 +14764,7 @@ let NamiCampaignManager$2 = class NamiCampaignManager {
14597
14764
  resultCallback(false, LaunchCampaignError.SDK_NOT_INITIALIZED);
14598
14765
  throw new SDKNotInitializedError();
14599
14766
  }
14600
- const data = getPaywallDataFromLabel(value, type);
14767
+ const data = startupTelemetry.firstLaunchLookup(value, () => getPaywallDataFromLabel(value, type));
14601
14768
  let paywall = data.paywall;
14602
14769
  const campaign = data.campaign;
14603
14770
  if (!campaign || (!paywall && !campaign.flow)) {
@@ -64293,6 +64460,29 @@ const convertLocale = (locale) => {
64293
64460
  return intlLocale.language + (intlLocale.region ?? intlLocale.script ?? '');
64294
64461
  };
64295
64462
 
64463
+ /**
64464
+ * Coerces the four launch-context wire-format variants of a boolean —
64465
+ * `true`, `false`, `"true"`, `"false"` — into a JS `boolean`.
64466
+ *
64467
+ * Returns `undefined` for everything else (case-variant strings, numbers,
64468
+ * `null`, `undefined`, empty string, objects). Callers decide how to treat
64469
+ * the `undefined` case; the helper deliberately does not coerce numerics or
64470
+ * mixed-case strings so unintended truthy-by-presence behavior doesn't sneak
64471
+ * back in.
64472
+ */
64473
+ function coerceBooleanish(value) {
64474
+ if (value === true || value === false) {
64475
+ return value;
64476
+ }
64477
+ if (typeof value === 'string') {
64478
+ if (value === 'true')
64479
+ return true;
64480
+ if (value === 'false')
64481
+ return false;
64482
+ }
64483
+ return undefined;
64484
+ }
64485
+
64296
64486
  /**
64297
64487
  * Components that are skipped entirely (they and their subtree do not
64298
64488
  * contribute text to the page-level announcement).
@@ -64578,4 +64768,4 @@ var internal = /*#__PURE__*/Object.freeze({
64578
64768
  NamiPurchaseManager: NamiPurchaseManager
64579
64769
  });
64580
64770
 
64581
- 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, 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, 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 };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@namiml/sdk-core",
3
- "version": "3.4.1",
3
+ "version": "3.4.2-dev.202606022148",
4
4
  "description": "Platform-agnostic core for the Nami SDK — business logic, API, types, and state management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",