@namiml/sdk-core 3.5.0-dev.202611011549 → 3.5.0-dev.202611011626

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
@@ -106,7 +106,7 @@ const {
106
106
  // version — stamped by scripts/version.sh
107
107
  NAMI_SDK_VERSION: exports.NAMI_SDK_VERSION = "3.5.0",
108
108
  // full package version including dev suffix — stamped by scripts/version.sh
109
- NAMI_SDK_PACKAGE_VERSION: exports.NAMI_SDK_PACKAGE_VERSION = "3.5.0-dev.202611011549",
109
+ NAMI_SDK_PACKAGE_VERSION: exports.NAMI_SDK_PACKAGE_VERSION = "3.5.0-dev.202611011626",
110
110
  // environments
111
111
  PRODUCTION: exports.PRODUCTION = "production", DEVELOPMENT: exports.DEVELOPMENT = "development",
112
112
  // error messages
@@ -7814,6 +7814,7 @@ function isNamiFlowCampaign(campaign) {
7814
7814
  exports.NamiCampaignRuleType = void 0;
7815
7815
  (function (NamiCampaignRuleType) {
7816
7816
  NamiCampaignRuleType["DEFAULT"] = "default";
7817
+ NamiCampaignRuleType["JOURNEY"] = "journey";
7817
7818
  NamiCampaignRuleType["LABEL"] = "label";
7818
7819
  NamiCampaignRuleType["UNKNOWN"] = "unknown";
7819
7820
  NamiCampaignRuleType["URL"] = "url";
@@ -57037,6 +57038,69 @@ const isCampaignRuleActive = (notBefore, expiresAt, now = new Date()) => {
57037
57038
  return startOk && endOk;
57038
57039
  };
57039
57040
 
57041
+ const TRIGGER_EVENT_TYPES = ["app_install", "session_start"];
57042
+ const GOAL_TYPES = ["flow_completed", "user_context_set"];
57043
+ const PRIORITIES = ["high", "medium", "low"];
57044
+ const oneOf = (allowed, value) => allowed.includes(value) ? value : null;
57045
+ const numberOrNull = (value) => (typeof value === "number" ? value : null);
57046
+ /**
57047
+ * Resolves a rule's `journey` object, reading `journey_id` from the top level and the other
57048
+ * fields from the `object` envelope when present, else from the top level (the flat contract
57049
+ * shape). Never throws: unknown values become `null` or their spec default.
57050
+ */
57051
+ function parseJourneyMetadata(dto) {
57052
+ if (!dto)
57053
+ return null;
57054
+ const fields = "object" in dto ? dto.object ?? {} : dto;
57055
+ const { goal, delivery } = fields;
57056
+ return {
57057
+ journey_id: typeof dto.journey_id === "string" ? dto.journey_id : "",
57058
+ category: fields.category ?? null,
57059
+ priority: oneOf(PRIORITIES, fields.priority) ?? "medium",
57060
+ trigger: { event_type: oneOf(TRIGGER_EVENT_TYPES, fields.trigger?.event_type) },
57061
+ goal: goal
57062
+ ? {
57063
+ type: oneOf(GOAL_TYPES, goal.type),
57064
+ context_key: goal.context_key ?? null,
57065
+ timeout_days: numberOrNull(goal.timeout_days),
57066
+ re_eligibility_days: numberOrNull(goal.re_eligibility_days),
57067
+ re_entry_after_goal: goal.re_entry_after_goal === true,
57068
+ }
57069
+ : null,
57070
+ delivery: {
57071
+ show_once: delivery?.show_once === true,
57072
+ max_impressions_total: numberOrNull(delivery?.max_impressions_total),
57073
+ max_per_session: numberOrNull(delivery?.max_per_session),
57074
+ max_per_day: numberOrNull(delivery?.max_per_day),
57075
+ delay_seconds: numberOrNull(delivery?.delay_seconds) ?? 0,
57076
+ },
57077
+ };
57078
+ }
57079
+ /**
57080
+ * Whether this SDK can act on the journey: the `journey_id` is non-blank, the trigger and goal
57081
+ * types are known, and a `user_context_set` goal names the key it watches.
57082
+ */
57083
+ function isSupportedJourney(meta) {
57084
+ if (!meta || !meta.journey_id.trim())
57085
+ return false;
57086
+ if (!meta.trigger.event_type || !meta.goal?.type)
57087
+ return false;
57088
+ if (meta.goal.type === "user_context_set")
57089
+ return !!meta.goal.context_key;
57090
+ return true;
57091
+ }
57092
+ const isJourneyCampaign = (rule) => rule.type === exports.NamiCampaignRuleType.JOURNEY;
57093
+ /**
57094
+ * Whether this SDK can use the rule. Every placement rule qualifies. A journey also needs
57095
+ * supported metadata and a flow, because journeys are flow-only. Callers skip an unsupported
57096
+ * journey rather than failing the payload.
57097
+ */
57098
+ function isSupportedCampaignRule(rule) {
57099
+ if (!isJourneyCampaign(rule))
57100
+ return true;
57101
+ return rule.flow != null && isSupportedJourney(parseJourneyMetadata(rule.journey));
57102
+ }
57103
+
57040
57104
  const isValidUrl = (label) => {
57041
57105
  try {
57042
57106
  const url = new URL(label);
@@ -57150,7 +57214,7 @@ const mapAnonymousCampaigns = (campaigns, splitPosition, formFactor) => {
57150
57214
  if (segments.length === 0)
57151
57215
  return [];
57152
57216
  const segment = selectSegment(segments, splitPosition);
57153
- return {
57217
+ const mapped = {
57154
57218
  form_factors: segment.form_factors,
57155
57219
  paywall: segment.paywall,
57156
57220
  paywall_url: segment.paywall_url,
@@ -57165,12 +57229,47 @@ const mapAnonymousCampaigns = (campaigns, splitPosition, formFactor) => {
57165
57229
  type: campaign.type,
57166
57230
  value: campaign.value,
57167
57231
  external_segment: campaign.external_segment,
57232
+ // Rule-level, like Apple's decoder: the window applies whichever segment wins.
57233
+ not_before: campaign.not_before,
57234
+ expires_at: campaign.expires_at,
57235
+ journey: campaign.journey,
57168
57236
  };
57237
+ // The initial-config path stores this list directly, so it needs the same skip-not-fail
57238
+ // check the repository applies to fetched rules (NAM-3225).
57239
+ if (!isSupportedCampaignRule(mapped)) {
57240
+ logger.debug(`Skipping unsupported journey rule ${campaign.rule}`);
57241
+ return [];
57242
+ }
57243
+ return mapped;
57169
57244
  });
57170
57245
  };
57246
+ /** Stored rules that target this device's form factor and are inside their active window. */
57247
+ const liveForDevice = (campaigns) => {
57248
+ const formFactor = getDeviceFormFactor();
57249
+ return compact(campaigns)
57250
+ .filter((cRule) => cRule.form_factors?.some((f) => f.form_factor === formFactor))
57251
+ .filter((cRule) => isCampaignRuleActive(cRule.not_before, cRule.expires_at));
57252
+ };
57253
+ /** Keeps the first rule per key, so API entries (listed first) win and payload order is kept. */
57254
+ const dedupeBy = (campaigns, key) => {
57255
+ const seen = new Set();
57256
+ return campaigns.filter((c) => {
57257
+ const k = key(c);
57258
+ if (seen.has(k))
57259
+ return false;
57260
+ seen.add(k);
57261
+ return true;
57262
+ });
57263
+ };
57264
+ const storedApiAndInitialRules = () => [
57265
+ ...(storageService.getCampaignRules(exports.API_CAMPAIGN_RULES) ?? []),
57266
+ ...(storageService.getCampaignRules(exports.INITIAL_CAMPAIGN_RULES) ?? []),
57267
+ ];
57171
57268
  /**
57172
- * Returns the combined list of API + initial-config campaigns for the current device's
57173
- * form factor, deduplicated by (type, value) with API entries winning on collision.
57269
+ * Returns the combined list of API + initial-config placement campaigns for the current
57270
+ * device's form factor, deduplicated by (type, value) with API entries winning on collision.
57271
+ * Journey rules are never included: they are launched by trigger events, not by a placement
57272
+ * (see {@link journeyCampaigns}).
57174
57273
  *
57175
57274
  * Mirrors NamiCampaignManager.allCampaigns() on Apple (Set keyed on hash(value, type))
57176
57275
  * and Android (.distinct() with server-first ordering). Keying on (type, value) — rather
@@ -57184,35 +57283,22 @@ const mapAnonymousCampaigns = (campaigns, splitPosition, formFactor) => {
57184
57283
  * when the API pair is incomplete — matching the merged-paywall-lookup behavior on
57185
57284
  * Apple and Android.
57186
57285
  */
57187
- const allCampaigns = () => {
57188
- const apiCampaigns = storageService.getCampaignRules(exports.API_CAMPAIGN_RULES) ?? [];
57189
- const initialCampaigns = storageService.getCampaignRules(exports.INITIAL_CAMPAIGN_RULES) ?? [];
57190
- const formFactor = getDeviceFormFactor();
57191
- const campaigns = compact([...apiCampaigns, ...initialCampaigns])
57192
- .filter((cRule) => cRule.form_factors?.some((f) => f.form_factor === formFactor))
57193
- .filter((cRule) => isCampaignRuleActive(cRule.not_before, cRule.expires_at));
57194
- const seen = new Set();
57195
- return campaigns.filter((c) => {
57196
- const key = `${c.type ?? ''}::${c.value ?? ''}`;
57197
- if (seen.has(key))
57198
- return false;
57199
- seen.add(key);
57200
- return true;
57201
- });
57202
- };
57286
+ const allCampaigns = () => dedupeBy(liveForDevice(storedApiAndInitialRules()).filter((c) => !isJourneyCampaign(c)), (c) => `${c.type ?? ''}::${c.value ?? ''}`);
57287
+ /**
57288
+ * API + initial-config journey rules for the current device's form factor and inside their
57289
+ * window, deduplicated on `rule` (every journey's `value` is null, so the placement key would
57290
+ * collapse them) with API entries first and payload order kept: the engine's tiebreaks depend
57291
+ * on it. This is the read surface for journey delivery; placement APIs never see these rules.
57292
+ */
57293
+ const journeyCampaigns = () => dedupeBy(liveForDevice(storedApiAndInitialRules()).filter(isJourneyCampaign), (c) => c.rule);
57203
57294
  /**
57204
- * Get campaigns by rule key, filtered by form factor.
57295
+ * Get placement campaigns by rule key, filtered by form factor and active window. Journey
57296
+ * rules are excluded so label, URL and default matching never resolve to one.
57205
57297
  *
57206
57298
  * @param ruleKey The key of the campaign rule to filter by
57207
57299
  * @returns An array of campaigns that match the rule key and form factor
57208
57300
  */
57209
- const getCampaignsByRule = (ruleKey) => {
57210
- const campaigns = storageService.getCampaignRules(ruleKey) ?? [];
57211
- const formFactor = getDeviceFormFactor();
57212
- return compact(campaigns)
57213
- .filter((cRule) => cRule.form_factors?.some((f) => f.form_factor === formFactor))
57214
- .filter((cRule) => isCampaignRuleActive(cRule.not_before, cRule.expires_at));
57215
- };
57301
+ const getCampaignsByRule = (ruleKey) => liveForDevice(storageService.getCampaignRules(ruleKey) ?? []).filter((c) => !isJourneyCampaign(c));
57216
57302
  const getInitialCampaigns = () => getCampaignsByRule(exports.INITIAL_CAMPAIGN_RULES);
57217
57303
  const getApiCampaigns = () => getCampaignsByRule(exports.API_CAMPAIGN_RULES);
57218
57304
  /**
@@ -57761,6 +57847,22 @@ class CampaignRuleRepository {
57761
57847
  constructor() {
57762
57848
  this.disableCampaignUpdates = false;
57763
57849
  this.useLegacyPaywallFetch = false;
57850
+ /**
57851
+ * A rule this device can use: it has content (a paywall or a flow), targets the current form
57852
+ * factor, and, for a journey, carries supported metadata. An unsupported journey is skipped,
57853
+ * never the payload (NAM-3225).
57854
+ */
57855
+ this.isUsableOnDevice = (cRule) => {
57856
+ if (!cRule.paywall && !cRule.flow)
57857
+ return false;
57858
+ if (!cRule.form_factors?.some((f) => f.form_factor === this.currentFormFactor))
57859
+ return false;
57860
+ if (!isSupportedCampaignRule(cRule)) {
57861
+ logger.debug(`Skipping unsupported journey rule ${cRule.rule}`);
57862
+ return false;
57863
+ }
57864
+ return true;
57865
+ };
57764
57866
  this.currentFormFactor = getDeviceFormFactor();
57765
57867
  }
57766
57868
  configure(formFactor, splitPosition, namiCommands = []) {
@@ -57795,9 +57897,7 @@ class CampaignRuleRepository {
57795
57897
  else {
57796
57898
  campaignRules = await this.getCampaigns(authDevice.id);
57797
57899
  }
57798
- // get campaign rules according to device's form_factor
57799
- campaignRules = campaignRules?.filter((cRule) => (cRule.paywall && cRule.form_factors.some((f) => f.form_factor === this.currentFormFactor)) ||
57800
- (cRule.flow && cRule.form_factors?.some((f) => f.form_factor === this.currentFormFactor)));
57900
+ campaignRules = campaignRules?.filter(this.isUsableOnDevice);
57801
57901
  // Keep only those campaign rules whose corresponding paywall is available
57802
57902
  campaignRules = campaignRules?.filter((cRule) => {
57803
57903
  if (cRule.paywall) {
@@ -57847,8 +57947,7 @@ class CampaignRuleRepository {
57847
57947
  const fetched = authDevice?.id
57848
57948
  ? await this.fetchCampaigns(authDevice.id)
57849
57949
  : await this.fetchAnonymousCampaigns();
57850
- const campaigns = fetched.campaigns?.filter((cRule) => (cRule.paywall && cRule.form_factors.some((f) => f.form_factor === this.currentFormFactor)) ||
57851
- (cRule.flow && cRule.form_factors?.some((f) => f.form_factor === this.currentFormFactor)));
57950
+ const campaigns = fetched.campaigns?.filter(this.isUsableOnDevice);
57852
57951
  return { campaigns, fromNetwork: fetched.fromNetwork };
57853
57952
  }
57854
57953
  finalizeCampaignRules(campaignRules, paywalls) {
@@ -66739,6 +66838,7 @@ const NamiAnimationType = {
66739
66838
  var CampaignRuleType;
66740
66839
  (function (CampaignRuleType) {
66741
66840
  CampaignRuleType["DEFAULT"] = "default";
66841
+ CampaignRuleType["JOURNEY"] = "journey";
66742
66842
  CampaignRuleType["LABEL"] = "label";
66743
66843
  CampaignRuleType["URL"] = "url";
66744
66844
  })(CampaignRuleType || (CampaignRuleType = {}));
@@ -67349,6 +67449,7 @@ exports.isSubscription = isSubscription;
67349
67449
  exports.isSystemTimeAssertion = isSystemTimeAssertion;
67350
67450
  exports.isValidISODate = isValidISODate;
67351
67451
  exports.isValidUrl = isValidUrl;
67452
+ exports.journeyCampaigns = journeyCampaigns;
67352
67453
  exports.logger = logger;
67353
67454
  exports.mapAnonymousCampaigns = mapAnonymousCampaigns;
67354
67455
  exports.namiBuySKU = namiBuySKU;
package/dist/index.d.ts CHANGED
@@ -1065,6 +1065,47 @@ interface NamiCampaignSegment {
1065
1065
  conversion_event_type?: CampaignRuleConversionEventType | null;
1066
1066
  conversion_event_url?: string | null;
1067
1067
  }
1068
+ /**
1069
+ * @type NamiJourneyFields
1070
+ * The per-journey fields of a `journey` object. Values stay loose (`string`) on the wire so an
1071
+ * unknown trigger, goal or priority from a newer backend parses; `parseJourneyMetadata` narrows
1072
+ * them and drops what this SDK doesn't support.
1073
+ */
1074
+ interface NamiJourneyFields {
1075
+ status?: string | null;
1076
+ category?: string | null;
1077
+ priority?: string | null;
1078
+ trigger?: {
1079
+ event_type?: string | null;
1080
+ parameters?: Record<string, unknown> | null;
1081
+ } | null;
1082
+ goal?: {
1083
+ type?: string | null;
1084
+ context_key?: string | null;
1085
+ timeout_days?: number | null;
1086
+ re_eligibility_days?: number | null;
1087
+ re_entry_after_goal?: boolean | null;
1088
+ } | null;
1089
+ delivery?: {
1090
+ show_once?: boolean | null;
1091
+ max_impressions_total?: number | null;
1092
+ max_per_session?: number | null;
1093
+ max_per_day?: number | null;
1094
+ delay_seconds?: number | null;
1095
+ } | null;
1096
+ }
1097
+ /**
1098
+ * @type NamiJourneyDTO
1099
+ * The `journey` object on a `type: "journey"` campaign rule. It is rule-level, so it applies to
1100
+ * whichever A/B segment wins. The backend nests every field but `journey_id` and `object_id` in
1101
+ * an `object` envelope, the way `flow` is delivered; the flat contract shape (fields at the top
1102
+ * level) is accepted too.
1103
+ */
1104
+ interface NamiJourneyDTO extends NamiJourneyFields {
1105
+ journey_id: string;
1106
+ object_id?: string | null;
1107
+ object?: NamiJourneyFields | null;
1108
+ }
1068
1109
  /**
1069
1110
  * @type NamiAnonymousCampaign
1070
1111
  * Represents the anonymous campaign in Nami.
@@ -1078,6 +1119,7 @@ interface NamiAnonymousCampaign {
1078
1119
  segments: NamiCampaignSegment[];
1079
1120
  not_before?: string | null;
1080
1121
  expires_at?: string | null;
1122
+ journey?: NamiJourneyDTO | null;
1081
1123
  }
1082
1124
  /**
1083
1125
  * @type NamiCampaign
@@ -1100,6 +1142,8 @@ interface NamiCampaign {
1100
1142
  flow?: NamiFlowDTO | null;
1101
1143
  not_before?: string | null;
1102
1144
  expires_at?: string | null;
1145
+ /** Present on `type: "journey"` rules. Journeys are launched by trigger events, never by a placement. */
1146
+ journey?: NamiJourneyDTO | null;
1103
1147
  }
1104
1148
  interface NamiFlowCampaign extends NamiCampaign {
1105
1149
  flow: NamiFlowWithObject;
@@ -1111,6 +1155,7 @@ declare function isNamiFlowCampaign(campaign?: NamiCampaign): campaign is NamiFl
1111
1155
  */
1112
1156
  declare enum NamiCampaignRuleType {
1113
1157
  DEFAULT = "default",
1158
+ JOURNEY = "journey",
1114
1159
  LABEL = "label",
1115
1160
  UNKNOWN = "unknown",
1116
1161
  URL = "url"
@@ -3658,8 +3703,10 @@ declare const bestUrlCampaignMatch: (incomingUrl: string, campaigns: NamiCampaig
3658
3703
  declare const selectSegment: (segments: NamiCampaignSegment[], splitPosition: number) => NamiCampaignSegment;
3659
3704
  declare const mapAnonymousCampaigns: (campaigns: NamiAnonymousCampaign[], splitPosition: number, formFactor?: TDevice) => NamiCampaign[];
3660
3705
  /**
3661
- * Returns the combined list of API + initial-config campaigns for the current device's
3662
- * form factor, deduplicated by (type, value) with API entries winning on collision.
3706
+ * Returns the combined list of API + initial-config placement campaigns for the current
3707
+ * device's form factor, deduplicated by (type, value) with API entries winning on collision.
3708
+ * Journey rules are never included: they are launched by trigger events, not by a placement
3709
+ * (see {@link journeyCampaigns}).
3663
3710
  *
3664
3711
  * Mirrors NamiCampaignManager.allCampaigns() on Apple (Set keyed on hash(value, type))
3665
3712
  * and Android (.distinct() with server-first ordering). Keying on (type, value) — rather
@@ -3674,6 +3721,13 @@ declare const mapAnonymousCampaigns: (campaigns: NamiAnonymousCampaign[], splitP
3674
3721
  * Apple and Android.
3675
3722
  */
3676
3723
  declare const allCampaigns: () => NamiCampaign[];
3724
+ /**
3725
+ * API + initial-config journey rules for the current device's form factor and inside their
3726
+ * window, deduplicated on `rule` (every journey's `value` is null, so the placement key would
3727
+ * collapse them) with API entries first and payload order kept: the engine's tiebreaks depend
3728
+ * on it. This is the read surface for journey delivery; placement APIs never see these rules.
3729
+ */
3730
+ declare const journeyCampaigns: () => NamiCampaign[];
3677
3731
  declare const getInitialCampaigns: () => NamiCampaign[];
3678
3732
  declare const getApiCampaigns: () => NamiCampaign[];
3679
3733
  /**
@@ -3838,6 +3892,12 @@ declare class CampaignRuleRepository {
3838
3892
  */
3839
3893
  reset(): void;
3840
3894
  fetchCampaignRules(paywalls: IPaywall[]): Promise<NamiCampaign[]>;
3895
+ /**
3896
+ * A rule this device can use: it has content (a paywall or a flow), targets the current form
3897
+ * factor, and, for a journey, carries supported metadata. An unsupported journey is skipped,
3898
+ * never the payload (NAM-3225).
3899
+ */
3900
+ private isUsableOnDevice;
3841
3901
  static extractPaywallUrls(campaigns: NamiCampaign[]): string[];
3842
3902
  static hasPaywallUrls(campaigns: NamiCampaign[]): boolean;
3843
3903
  /**
@@ -4542,5 +4602,5 @@ declare namespace internal {
4542
4602
  };
4543
4603
  }
4544
4604
 
4545
- 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_TRAFFIC_OBSERVER, 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_CACHE_TTL_PREFIX, CAMPAIGN_NOT_AVAILABLE, CONFIG_API_TIMEOUT_LIMIT, CONFIG_MAX_ATTEMPTS, CUSTOMER_ATTRIBUTES_KEY_PREFIX, CUSTOMER_JOURNEY_STATE_CHANGED, CUSTOM_HOST_PREFIX, CampaignNotAvailableError, CampaignRuleConversionEventType, CampaignRuleRepository, Capabilities, ClientError, ConfigRepository, ConflictError, CustomerJourneyRepository, DEFAULT_JOURNEY_SETTINGS, 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, MAX_FIXED_STEP_COUNT, MIN_FIXED_STEP_COUNT, 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, NamiHandoffTag, NamiPaywallAction, NamiPaywallManager$2 as NamiPaywallManager, PaywallManagerEvents as NamiPaywallManagerEvents, NamiPermissionOutcome, NamiPurchaseManager$2 as NamiPurchaseManager, NamiRefs, NamiReservedActions, NotFoundError, PAYWALL_ACTION_EVENT, PLATFORM_ID_REQUIRED, PRODUCTION, PaywallManagerEvents, PaywallRepository, PaywallState, PlacementLabelResolver, PlatformIDRequiredError, ProductRepository, RECONFIG_SUCCESS, RESUME_THROTTLE_MS, RetryLimitExceededError, SDKNotInitializedError, SDK_NOT_INITIALIZED, SERVER_NAMI_ENTITLEMENTS, SESSION_REQUIRED, SHOULD_SHOW_LOADING_INDICATOR, SIMULATE_CONFIG_FETCH_FAILURE, SIMULATE_PAYWALL_FETCH_FAILURE, SKU_TEXT_REGEX, SMART_TEXT_PATTERN, STARTUP_TELEMETRY, STATUS_BAD_REQUEST, STATUS_CONFLICT, STATUS_INTERNAL_SERVER_ERROR, STATUS_NOT_FOUND, STATUS_SUCCESS, SYSTEM_TIME_FILTER_PREFIX, SYSTEM_TIME_TOKEN_PREFIX, SessionService, SimpleEventTarget, StorageService, TIME_OVERRIDE_PREFIX, TRANSPORT_FAILURE_STATUS, 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, didReceiveResponse, empty, evaluateSystemTimeAssertion, evaluateSystemTimeCondition, evenSegmentWidth, extractStandardPricingPhases, firstSet, formatDate, formattedPrice, generateUUID, getApiCampaigns, getApiPaywalls, getBaseUrl, getBillingPeriodNumber, getCurrencyFormat, getDeviceData, getDeviceFormFactor, getDeviceScaleFactor, getEffectiveWebStyle, getEntitlementRefIdsForSku, getExtendedClientInfo, getFreeTrialPeriod, getInitialCampaigns, getInitialPaywalls, getJourneySettings, getPaywall, getPaywallDataFromLabel, getPercentagePriceDifference, getPeriodNumberInDays, getPeriodNumberInWeeks, getPlatformAdapters, getPriceDifference, getPricePerMonth, getProductDetail, getPurchaseAdapter, getReferenceSku, getSkuProductDetailKeys, getSkuSmartTextValue, getSlideSmartTextValue, getStandardBillingPeriod, getSystemTimeNow, getTranslate, getUrlParams, handleErrors, hasAllPaywalls, hasCapability, hasPurchaseManagement, initialState, invokeHandler, isAnonymousMode, isInitialConfigCompressed, isNamiFlowCampaign, isStepsStyle, isSubscription, isSystemTimeAssertion, isValidISODate, isValidUrl, logger, mapAnonymousCampaigns, namiBuySKU, normalizeLaunchContext, parseTimeOverride, parseToSemver, postConversion, productDetail, registerAPITrafficObserver, registerPlatformAdapters, registerPurchaseAdapter, resolveCurrentStep, resolveLoopSource, resolveStepAlignment, resolveStepCount, resolveStepSizing, selectSegment, setActiveNamiEntitlements, shouldValidateProductGroups, skuItems, skuMapFromEntitlements, stepSegmentState, storageService, toDouble, toNamiEntitlements, toNamiSKU, tryParseB64Gzip, tryParseJson, updateRelatedSKUsForNamiEntitlement, uuidFromSplitPosition, validateForm, validateMinSDKVersion, validateTextInput };
4546
- 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, FormFieldValidator, GoogleProduct, IConfig, IDeviceAdapter, IEntitlements$1 as IEntitlements, IPaywall, IPlatformAdapters, IProductsWithComponents, IPurchaseAdapter, ISkuMenu, IStorageAdapter, IUIAdapter, Impression, InitialConfig, InitialConfigCompressed, InitiateStateGroup, JourneySettings, LoginResponse, NamiAPITrafficKind, NamiAPITrafficObserver, NamiAPITrafficRecord, NamiAnimation, NamiAnimationObjectSpec, NamiAnimationSpec, NamiAnonymousCampaign, NamiAppSuppliedVideoDetails, NamiCampaign, NamiCampaignManagerStatic, NamiCampaignSegment, NamiCompletionResult, NamiConfiguration, NamiConfigurationState, NamiCustomAttributeValue, NamiCustomerManagerStatic, NamiEntitlement$1 as NamiEntitlement, NamiEntitlementManagerStatic, NamiFlowAction, NamiFlowAnimation, NamiFlowCampaign, NamiFlowCompletionCondition, NamiFlowDTO, NamiFlowEventHandler, NamiFlowHandoffStepHandler, NamiFlowManagerStatic, NamiFlowObjectDTO, NamiFlowOn, NamiFlowStep, NamiFlowTransition, NamiFlowTransitionDirection, NamiFlowWithObject, NamiHandoffAttributeValue, NamiHandoffComplete, NamiHandoffOutcome, NamiHandoffTagValue, NamiInitialConfig, NamiKnownHandoffTag, NamiLanguageCodes, NamiLogLevel, NamiLoginSuccess, NamiPaywallActionHandler, NamiPaywallComponentChange, NamiPaywallEvent, NamiPaywallEventVideoMetadata, NamiPaywallLaunchContext, NamiPaywallManagerStatic, NamiPresentationStyle, NamiProductDetails, NamiProductOffer, NamiProfile, NamiPurchase, NamiPurchaseCompleteResult, NamiPurchaseDetails, NamiPurchaseManagerStatic, NamiPurchaseSuccess, NamiPurchasesState, NamiSKU, NamiSKUType, NamiSubscriptionInterval, NamiSubscriptionPeriod, NamiUserDataEnvelope, 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, TSlot, TSlotGroupSelector, TSpacerComponent, TStack, TStepState, TSvgImageComponent, TSymbolComponent, TTestObject, TTextComponent, TTextInputComponent, TTextInputType, TTextLikeComponent, TTextListComponent, TTimelineRail, TToggleButtonComponent, TToggleSwitch, TVariablePattern, TVideoComponent, TVolumeButton, TimerState, TransactionRequest, UserAction, UserActionParameters, Wave, WaveSpec };
4605
+ 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_TRAFFIC_OBSERVER, 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_CACHE_TTL_PREFIX, CAMPAIGN_NOT_AVAILABLE, CONFIG_API_TIMEOUT_LIMIT, CONFIG_MAX_ATTEMPTS, CUSTOMER_ATTRIBUTES_KEY_PREFIX, CUSTOMER_JOURNEY_STATE_CHANGED, CUSTOM_HOST_PREFIX, CampaignNotAvailableError, CampaignRuleConversionEventType, CampaignRuleRepository, Capabilities, ClientError, ConfigRepository, ConflictError, CustomerJourneyRepository, DEFAULT_JOURNEY_SETTINGS, 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, MAX_FIXED_STEP_COUNT, MIN_FIXED_STEP_COUNT, 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, NamiHandoffTag, NamiPaywallAction, NamiPaywallManager$2 as NamiPaywallManager, PaywallManagerEvents as NamiPaywallManagerEvents, NamiPermissionOutcome, NamiPurchaseManager$2 as NamiPurchaseManager, NamiRefs, NamiReservedActions, NotFoundError, PAYWALL_ACTION_EVENT, PLATFORM_ID_REQUIRED, PRODUCTION, PaywallManagerEvents, PaywallRepository, PaywallState, PlacementLabelResolver, PlatformIDRequiredError, ProductRepository, RECONFIG_SUCCESS, RESUME_THROTTLE_MS, RetryLimitExceededError, SDKNotInitializedError, SDK_NOT_INITIALIZED, SERVER_NAMI_ENTITLEMENTS, SESSION_REQUIRED, SHOULD_SHOW_LOADING_INDICATOR, SIMULATE_CONFIG_FETCH_FAILURE, SIMULATE_PAYWALL_FETCH_FAILURE, SKU_TEXT_REGEX, SMART_TEXT_PATTERN, STARTUP_TELEMETRY, STATUS_BAD_REQUEST, STATUS_CONFLICT, STATUS_INTERNAL_SERVER_ERROR, STATUS_NOT_FOUND, STATUS_SUCCESS, SYSTEM_TIME_FILTER_PREFIX, SYSTEM_TIME_TOKEN_PREFIX, SessionService, SimpleEventTarget, StorageService, TIME_OVERRIDE_PREFIX, TRANSPORT_FAILURE_STATUS, 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, didReceiveResponse, empty, evaluateSystemTimeAssertion, evaluateSystemTimeCondition, evenSegmentWidth, extractStandardPricingPhases, firstSet, formatDate, formattedPrice, generateUUID, getApiCampaigns, getApiPaywalls, getBaseUrl, getBillingPeriodNumber, getCurrencyFormat, getDeviceData, getDeviceFormFactor, getDeviceScaleFactor, getEffectiveWebStyle, getEntitlementRefIdsForSku, getExtendedClientInfo, getFreeTrialPeriod, getInitialCampaigns, getInitialPaywalls, getJourneySettings, getPaywall, getPaywallDataFromLabel, getPercentagePriceDifference, getPeriodNumberInDays, getPeriodNumberInWeeks, getPlatformAdapters, getPriceDifference, getPricePerMonth, getProductDetail, getPurchaseAdapter, getReferenceSku, getSkuProductDetailKeys, getSkuSmartTextValue, getSlideSmartTextValue, getStandardBillingPeriod, getSystemTimeNow, getTranslate, getUrlParams, handleErrors, hasAllPaywalls, hasCapability, hasPurchaseManagement, initialState, invokeHandler, isAnonymousMode, isInitialConfigCompressed, isNamiFlowCampaign, isStepsStyle, isSubscription, isSystemTimeAssertion, isValidISODate, isValidUrl, journeyCampaigns, logger, mapAnonymousCampaigns, namiBuySKU, normalizeLaunchContext, parseTimeOverride, parseToSemver, postConversion, productDetail, registerAPITrafficObserver, registerPlatformAdapters, registerPurchaseAdapter, resolveCurrentStep, resolveLoopSource, resolveStepAlignment, resolveStepCount, resolveStepSizing, selectSegment, setActiveNamiEntitlements, shouldValidateProductGroups, skuItems, skuMapFromEntitlements, stepSegmentState, storageService, toDouble, toNamiEntitlements, toNamiSKU, tryParseB64Gzip, tryParseJson, updateRelatedSKUsForNamiEntitlement, uuidFromSplitPosition, validateForm, validateMinSDKVersion, validateTextInput };
4606
+ 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, FormFieldValidator, GoogleProduct, IConfig, IDeviceAdapter, IEntitlements$1 as IEntitlements, IPaywall, IPlatformAdapters, IProductsWithComponents, IPurchaseAdapter, ISkuMenu, IStorageAdapter, IUIAdapter, Impression, InitialConfig, InitialConfigCompressed, InitiateStateGroup, JourneySettings, LoginResponse, NamiAPITrafficKind, NamiAPITrafficObserver, NamiAPITrafficRecord, NamiAnimation, NamiAnimationObjectSpec, NamiAnimationSpec, NamiAnonymousCampaign, NamiAppSuppliedVideoDetails, NamiCampaign, NamiCampaignManagerStatic, NamiCampaignSegment, NamiCompletionResult, NamiConfiguration, NamiConfigurationState, NamiCustomAttributeValue, NamiCustomerManagerStatic, NamiEntitlement$1 as NamiEntitlement, NamiEntitlementManagerStatic, NamiFlowAction, NamiFlowAnimation, NamiFlowCampaign, NamiFlowCompletionCondition, NamiFlowDTO, NamiFlowEventHandler, NamiFlowHandoffStepHandler, NamiFlowManagerStatic, NamiFlowObjectDTO, NamiFlowOn, NamiFlowStep, NamiFlowTransition, NamiFlowTransitionDirection, NamiFlowWithObject, NamiHandoffAttributeValue, NamiHandoffComplete, NamiHandoffOutcome, NamiHandoffTagValue, NamiInitialConfig, NamiJourneyDTO, NamiJourneyFields, NamiKnownHandoffTag, NamiLanguageCodes, NamiLogLevel, NamiLoginSuccess, NamiPaywallActionHandler, NamiPaywallComponentChange, NamiPaywallEvent, NamiPaywallEventVideoMetadata, NamiPaywallLaunchContext, NamiPaywallManagerStatic, NamiPresentationStyle, NamiProductDetails, NamiProductOffer, NamiProfile, NamiPurchase, NamiPurchaseCompleteResult, NamiPurchaseDetails, NamiPurchaseManagerStatic, NamiPurchaseSuccess, NamiPurchasesState, NamiSKU, NamiSKUType, NamiSubscriptionInterval, NamiSubscriptionPeriod, NamiUserDataEnvelope, 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, TSlot, TSlotGroupSelector, TSpacerComponent, TStack, TStepState, TSvgImageComponent, TSymbolComponent, TTestObject, TTextComponent, TTextInputComponent, TTextInputType, TTextLikeComponent, TTextListComponent, TTimelineRail, TToggleButtonComponent, TToggleSwitch, TVariablePattern, TVideoComponent, TVolumeButton, TimerState, TransactionRequest, UserAction, UserActionParameters, Wave, WaveSpec };
package/dist/index.mjs CHANGED
@@ -104,7 +104,7 @@ const {
104
104
  // version — stamped by scripts/version.sh
105
105
  NAMI_SDK_VERSION = "3.5.0",
106
106
  // full package version including dev suffix — stamped by scripts/version.sh
107
- NAMI_SDK_PACKAGE_VERSION = "3.5.0-dev.202611011549",
107
+ NAMI_SDK_PACKAGE_VERSION = "3.5.0-dev.202611011626",
108
108
  // environments
109
109
  PRODUCTION = "production", DEVELOPMENT = "development",
110
110
  // error messages
@@ -7812,6 +7812,7 @@ function isNamiFlowCampaign(campaign) {
7812
7812
  var NamiCampaignRuleType;
7813
7813
  (function (NamiCampaignRuleType) {
7814
7814
  NamiCampaignRuleType["DEFAULT"] = "default";
7815
+ NamiCampaignRuleType["JOURNEY"] = "journey";
7815
7816
  NamiCampaignRuleType["LABEL"] = "label";
7816
7817
  NamiCampaignRuleType["UNKNOWN"] = "unknown";
7817
7818
  NamiCampaignRuleType["URL"] = "url";
@@ -57035,6 +57036,69 @@ const isCampaignRuleActive = (notBefore, expiresAt, now = new Date()) => {
57035
57036
  return startOk && endOk;
57036
57037
  };
57037
57038
 
57039
+ const TRIGGER_EVENT_TYPES = ["app_install", "session_start"];
57040
+ const GOAL_TYPES = ["flow_completed", "user_context_set"];
57041
+ const PRIORITIES = ["high", "medium", "low"];
57042
+ const oneOf = (allowed, value) => allowed.includes(value) ? value : null;
57043
+ const numberOrNull = (value) => (typeof value === "number" ? value : null);
57044
+ /**
57045
+ * Resolves a rule's `journey` object, reading `journey_id` from the top level and the other
57046
+ * fields from the `object` envelope when present, else from the top level (the flat contract
57047
+ * shape). Never throws: unknown values become `null` or their spec default.
57048
+ */
57049
+ function parseJourneyMetadata(dto) {
57050
+ if (!dto)
57051
+ return null;
57052
+ const fields = "object" in dto ? dto.object ?? {} : dto;
57053
+ const { goal, delivery } = fields;
57054
+ return {
57055
+ journey_id: typeof dto.journey_id === "string" ? dto.journey_id : "",
57056
+ category: fields.category ?? null,
57057
+ priority: oneOf(PRIORITIES, fields.priority) ?? "medium",
57058
+ trigger: { event_type: oneOf(TRIGGER_EVENT_TYPES, fields.trigger?.event_type) },
57059
+ goal: goal
57060
+ ? {
57061
+ type: oneOf(GOAL_TYPES, goal.type),
57062
+ context_key: goal.context_key ?? null,
57063
+ timeout_days: numberOrNull(goal.timeout_days),
57064
+ re_eligibility_days: numberOrNull(goal.re_eligibility_days),
57065
+ re_entry_after_goal: goal.re_entry_after_goal === true,
57066
+ }
57067
+ : null,
57068
+ delivery: {
57069
+ show_once: delivery?.show_once === true,
57070
+ max_impressions_total: numberOrNull(delivery?.max_impressions_total),
57071
+ max_per_session: numberOrNull(delivery?.max_per_session),
57072
+ max_per_day: numberOrNull(delivery?.max_per_day),
57073
+ delay_seconds: numberOrNull(delivery?.delay_seconds) ?? 0,
57074
+ },
57075
+ };
57076
+ }
57077
+ /**
57078
+ * Whether this SDK can act on the journey: the `journey_id` is non-blank, the trigger and goal
57079
+ * types are known, and a `user_context_set` goal names the key it watches.
57080
+ */
57081
+ function isSupportedJourney(meta) {
57082
+ if (!meta || !meta.journey_id.trim())
57083
+ return false;
57084
+ if (!meta.trigger.event_type || !meta.goal?.type)
57085
+ return false;
57086
+ if (meta.goal.type === "user_context_set")
57087
+ return !!meta.goal.context_key;
57088
+ return true;
57089
+ }
57090
+ const isJourneyCampaign = (rule) => rule.type === NamiCampaignRuleType.JOURNEY;
57091
+ /**
57092
+ * Whether this SDK can use the rule. Every placement rule qualifies. A journey also needs
57093
+ * supported metadata and a flow, because journeys are flow-only. Callers skip an unsupported
57094
+ * journey rather than failing the payload.
57095
+ */
57096
+ function isSupportedCampaignRule(rule) {
57097
+ if (!isJourneyCampaign(rule))
57098
+ return true;
57099
+ return rule.flow != null && isSupportedJourney(parseJourneyMetadata(rule.journey));
57100
+ }
57101
+
57038
57102
  const isValidUrl = (label) => {
57039
57103
  try {
57040
57104
  const url = new URL(label);
@@ -57148,7 +57212,7 @@ const mapAnonymousCampaigns = (campaigns, splitPosition, formFactor) => {
57148
57212
  if (segments.length === 0)
57149
57213
  return [];
57150
57214
  const segment = selectSegment(segments, splitPosition);
57151
- return {
57215
+ const mapped = {
57152
57216
  form_factors: segment.form_factors,
57153
57217
  paywall: segment.paywall,
57154
57218
  paywall_url: segment.paywall_url,
@@ -57163,12 +57227,47 @@ const mapAnonymousCampaigns = (campaigns, splitPosition, formFactor) => {
57163
57227
  type: campaign.type,
57164
57228
  value: campaign.value,
57165
57229
  external_segment: campaign.external_segment,
57230
+ // Rule-level, like Apple's decoder: the window applies whichever segment wins.
57231
+ not_before: campaign.not_before,
57232
+ expires_at: campaign.expires_at,
57233
+ journey: campaign.journey,
57166
57234
  };
57235
+ // The initial-config path stores this list directly, so it needs the same skip-not-fail
57236
+ // check the repository applies to fetched rules (NAM-3225).
57237
+ if (!isSupportedCampaignRule(mapped)) {
57238
+ logger.debug(`Skipping unsupported journey rule ${campaign.rule}`);
57239
+ return [];
57240
+ }
57241
+ return mapped;
57167
57242
  });
57168
57243
  };
57244
+ /** Stored rules that target this device's form factor and are inside their active window. */
57245
+ const liveForDevice = (campaigns) => {
57246
+ const formFactor = getDeviceFormFactor();
57247
+ return compact(campaigns)
57248
+ .filter((cRule) => cRule.form_factors?.some((f) => f.form_factor === formFactor))
57249
+ .filter((cRule) => isCampaignRuleActive(cRule.not_before, cRule.expires_at));
57250
+ };
57251
+ /** Keeps the first rule per key, so API entries (listed first) win and payload order is kept. */
57252
+ const dedupeBy = (campaigns, key) => {
57253
+ const seen = new Set();
57254
+ return campaigns.filter((c) => {
57255
+ const k = key(c);
57256
+ if (seen.has(k))
57257
+ return false;
57258
+ seen.add(k);
57259
+ return true;
57260
+ });
57261
+ };
57262
+ const storedApiAndInitialRules = () => [
57263
+ ...(storageService.getCampaignRules(API_CAMPAIGN_RULES) ?? []),
57264
+ ...(storageService.getCampaignRules(INITIAL_CAMPAIGN_RULES) ?? []),
57265
+ ];
57169
57266
  /**
57170
- * Returns the combined list of API + initial-config campaigns for the current device's
57171
- * form factor, deduplicated by (type, value) with API entries winning on collision.
57267
+ * Returns the combined list of API + initial-config placement campaigns for the current
57268
+ * device's form factor, deduplicated by (type, value) with API entries winning on collision.
57269
+ * Journey rules are never included: they are launched by trigger events, not by a placement
57270
+ * (see {@link journeyCampaigns}).
57172
57271
  *
57173
57272
  * Mirrors NamiCampaignManager.allCampaigns() on Apple (Set keyed on hash(value, type))
57174
57273
  * and Android (.distinct() with server-first ordering). Keying on (type, value) — rather
@@ -57182,35 +57281,22 @@ const mapAnonymousCampaigns = (campaigns, splitPosition, formFactor) => {
57182
57281
  * when the API pair is incomplete — matching the merged-paywall-lookup behavior on
57183
57282
  * Apple and Android.
57184
57283
  */
57185
- const allCampaigns = () => {
57186
- const apiCampaigns = storageService.getCampaignRules(API_CAMPAIGN_RULES) ?? [];
57187
- const initialCampaigns = storageService.getCampaignRules(INITIAL_CAMPAIGN_RULES) ?? [];
57188
- const formFactor = getDeviceFormFactor();
57189
- const campaigns = compact([...apiCampaigns, ...initialCampaigns])
57190
- .filter((cRule) => cRule.form_factors?.some((f) => f.form_factor === formFactor))
57191
- .filter((cRule) => isCampaignRuleActive(cRule.not_before, cRule.expires_at));
57192
- const seen = new Set();
57193
- return campaigns.filter((c) => {
57194
- const key = `${c.type ?? ''}::${c.value ?? ''}`;
57195
- if (seen.has(key))
57196
- return false;
57197
- seen.add(key);
57198
- return true;
57199
- });
57200
- };
57284
+ const allCampaigns = () => dedupeBy(liveForDevice(storedApiAndInitialRules()).filter((c) => !isJourneyCampaign(c)), (c) => `${c.type ?? ''}::${c.value ?? ''}`);
57285
+ /**
57286
+ * API + initial-config journey rules for the current device's form factor and inside their
57287
+ * window, deduplicated on `rule` (every journey's `value` is null, so the placement key would
57288
+ * collapse them) with API entries first and payload order kept: the engine's tiebreaks depend
57289
+ * on it. This is the read surface for journey delivery; placement APIs never see these rules.
57290
+ */
57291
+ const journeyCampaigns = () => dedupeBy(liveForDevice(storedApiAndInitialRules()).filter(isJourneyCampaign), (c) => c.rule);
57201
57292
  /**
57202
- * Get campaigns by rule key, filtered by form factor.
57293
+ * Get placement campaigns by rule key, filtered by form factor and active window. Journey
57294
+ * rules are excluded so label, URL and default matching never resolve to one.
57203
57295
  *
57204
57296
  * @param ruleKey The key of the campaign rule to filter by
57205
57297
  * @returns An array of campaigns that match the rule key and form factor
57206
57298
  */
57207
- const getCampaignsByRule = (ruleKey) => {
57208
- const campaigns = storageService.getCampaignRules(ruleKey) ?? [];
57209
- const formFactor = getDeviceFormFactor();
57210
- return compact(campaigns)
57211
- .filter((cRule) => cRule.form_factors?.some((f) => f.form_factor === formFactor))
57212
- .filter((cRule) => isCampaignRuleActive(cRule.not_before, cRule.expires_at));
57213
- };
57299
+ const getCampaignsByRule = (ruleKey) => liveForDevice(storageService.getCampaignRules(ruleKey) ?? []).filter((c) => !isJourneyCampaign(c));
57214
57300
  const getInitialCampaigns = () => getCampaignsByRule(INITIAL_CAMPAIGN_RULES);
57215
57301
  const getApiCampaigns = () => getCampaignsByRule(API_CAMPAIGN_RULES);
57216
57302
  /**
@@ -57759,6 +57845,22 @@ class CampaignRuleRepository {
57759
57845
  constructor() {
57760
57846
  this.disableCampaignUpdates = false;
57761
57847
  this.useLegacyPaywallFetch = false;
57848
+ /**
57849
+ * A rule this device can use: it has content (a paywall or a flow), targets the current form
57850
+ * factor, and, for a journey, carries supported metadata. An unsupported journey is skipped,
57851
+ * never the payload (NAM-3225).
57852
+ */
57853
+ this.isUsableOnDevice = (cRule) => {
57854
+ if (!cRule.paywall && !cRule.flow)
57855
+ return false;
57856
+ if (!cRule.form_factors?.some((f) => f.form_factor === this.currentFormFactor))
57857
+ return false;
57858
+ if (!isSupportedCampaignRule(cRule)) {
57859
+ logger.debug(`Skipping unsupported journey rule ${cRule.rule}`);
57860
+ return false;
57861
+ }
57862
+ return true;
57863
+ };
57762
57864
  this.currentFormFactor = getDeviceFormFactor();
57763
57865
  }
57764
57866
  configure(formFactor, splitPosition, namiCommands = []) {
@@ -57793,9 +57895,7 @@ class CampaignRuleRepository {
57793
57895
  else {
57794
57896
  campaignRules = await this.getCampaigns(authDevice.id);
57795
57897
  }
57796
- // get campaign rules according to device's form_factor
57797
- campaignRules = campaignRules?.filter((cRule) => (cRule.paywall && cRule.form_factors.some((f) => f.form_factor === this.currentFormFactor)) ||
57798
- (cRule.flow && cRule.form_factors?.some((f) => f.form_factor === this.currentFormFactor)));
57898
+ campaignRules = campaignRules?.filter(this.isUsableOnDevice);
57799
57899
  // Keep only those campaign rules whose corresponding paywall is available
57800
57900
  campaignRules = campaignRules?.filter((cRule) => {
57801
57901
  if (cRule.paywall) {
@@ -57845,8 +57945,7 @@ class CampaignRuleRepository {
57845
57945
  const fetched = authDevice?.id
57846
57946
  ? await this.fetchCampaigns(authDevice.id)
57847
57947
  : await this.fetchAnonymousCampaigns();
57848
- const campaigns = fetched.campaigns?.filter((cRule) => (cRule.paywall && cRule.form_factors.some((f) => f.form_factor === this.currentFormFactor)) ||
57849
- (cRule.flow && cRule.form_factors?.some((f) => f.form_factor === this.currentFormFactor)));
57948
+ const campaigns = fetched.campaigns?.filter(this.isUsableOnDevice);
57850
57949
  return { campaigns, fromNetwork: fetched.fromNetwork };
57851
57950
  }
57852
57951
  finalizeCampaignRules(campaignRules, paywalls) {
@@ -66737,6 +66836,7 @@ const NamiAnimationType = {
66737
66836
  var CampaignRuleType;
66738
66837
  (function (CampaignRuleType) {
66739
66838
  CampaignRuleType["DEFAULT"] = "default";
66839
+ CampaignRuleType["JOURNEY"] = "journey";
66740
66840
  CampaignRuleType["LABEL"] = "label";
66741
66841
  CampaignRuleType["URL"] = "url";
66742
66842
  })(CampaignRuleType || (CampaignRuleType = {}));
@@ -67213,4 +67313,4 @@ var internal = /*#__PURE__*/Object.freeze({
67213
67313
  NamiPurchaseManager: NamiPurchaseManager
67214
67314
  });
67215
67315
 
67216
- 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_TRAFFIC_OBSERVER, 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_CACHE_TTL_PREFIX, CAMPAIGN_NOT_AVAILABLE, CONFIG_API_TIMEOUT_LIMIT, CONFIG_MAX_ATTEMPTS, CUSTOMER_ATTRIBUTES_KEY_PREFIX, CUSTOMER_JOURNEY_STATE_CHANGED, CUSTOM_HOST_PREFIX, CampaignNotAvailableError, CampaignRuleConversionEventType, CampaignRuleRepository, Capabilities, ClientError, ConfigRepository, ConflictError, CustomerJourneyRepository, DEFAULT_JOURNEY_SETTINGS, 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, MAX_FIXED_STEP_COUNT, MIN_FIXED_STEP_COUNT, 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, NamiHandoffTag, NamiPaywallAction, NamiPaywallManager$1 as NamiPaywallManager, PaywallManagerEvents as NamiPaywallManagerEvents, NamiPermissionOutcome, NamiPurchaseManager$1 as NamiPurchaseManager, NamiRefs, NamiReservedActions, NotFoundError, PAYWALL_ACTION_EVENT, PLATFORM_ID_REQUIRED, PRODUCTION, PaywallManagerEvents, PaywallRepository, PaywallState, PlacementLabelResolver, PlatformIDRequiredError, ProductRepository, RECONFIG_SUCCESS, RESUME_THROTTLE_MS, RetryLimitExceededError, SDKNotInitializedError, SDK_NOT_INITIALIZED, SERVER_NAMI_ENTITLEMENTS, SESSION_REQUIRED, SHOULD_SHOW_LOADING_INDICATOR, SIMULATE_CONFIG_FETCH_FAILURE, SIMULATE_PAYWALL_FETCH_FAILURE, SKU_TEXT_REGEX, SMART_TEXT_PATTERN, STARTUP_TELEMETRY, STATUS_BAD_REQUEST, STATUS_CONFLICT, STATUS_INTERNAL_SERVER_ERROR, STATUS_NOT_FOUND, STATUS_SUCCESS, SYSTEM_TIME_FILTER_PREFIX, SYSTEM_TIME_TOKEN_PREFIX, SessionService, SimpleEventTarget, StorageService, TIME_OVERRIDE_PREFIX, TRANSPORT_FAILURE_STATUS, 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, didReceiveResponse, empty, evaluateSystemTimeAssertion, evaluateSystemTimeCondition, evenSegmentWidth, extractStandardPricingPhases, firstSet, formatDate, formattedPrice, generateUUID, getApiCampaigns, getApiPaywalls, getBaseUrl, getBillingPeriodNumber, getCurrencyFormat, getDeviceData, getDeviceFormFactor, getDeviceScaleFactor, getEffectiveWebStyle, getEntitlementRefIdsForSku, getExtendedClientInfo, getFreeTrialPeriod, getInitialCampaigns, getInitialPaywalls, getJourneySettings, getPaywall, getPaywallDataFromLabel, getPercentagePriceDifference, getPeriodNumberInDays, getPeriodNumberInWeeks, getPlatformAdapters, getPriceDifference, getPricePerMonth, getProductDetail, getPurchaseAdapter, getReferenceSku, getSkuProductDetailKeys, getSkuSmartTextValue, getSlideSmartTextValue, getStandardBillingPeriod, getSystemTimeNow, getTranslate, getUrlParams, handleErrors, hasAllPaywalls, hasCapability, hasPurchaseManagement, initialState, invokeHandler, isAnonymousMode, isInitialConfigCompressed, isNamiFlowCampaign, isStepsStyle, isSubscription, isSystemTimeAssertion, isValidISODate, isValidUrl, logger, mapAnonymousCampaigns, namiBuySKU, normalizeLaunchContext, parseTimeOverride, parseToSemver, postConversion, productDetail, registerAPITrafficObserver, registerPlatformAdapters, registerPurchaseAdapter, resolveCurrentStep, resolveLoopSource, resolveStepAlignment, resolveStepCount, resolveStepSizing, selectSegment, setActiveNamiEntitlements, shouldValidateProductGroups, skuItems, skuMapFromEntitlements, stepSegmentState, storageService, toDouble, toNamiEntitlements, toNamiSKU, tryParseB64Gzip, tryParseJson, updateRelatedSKUsForNamiEntitlement, uuidFromSplitPosition, validateForm, validateMinSDKVersion, validateTextInput };
67316
+ 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_TRAFFIC_OBSERVER, 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_CACHE_TTL_PREFIX, CAMPAIGN_NOT_AVAILABLE, CONFIG_API_TIMEOUT_LIMIT, CONFIG_MAX_ATTEMPTS, CUSTOMER_ATTRIBUTES_KEY_PREFIX, CUSTOMER_JOURNEY_STATE_CHANGED, CUSTOM_HOST_PREFIX, CampaignNotAvailableError, CampaignRuleConversionEventType, CampaignRuleRepository, Capabilities, ClientError, ConfigRepository, ConflictError, CustomerJourneyRepository, DEFAULT_JOURNEY_SETTINGS, 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, MAX_FIXED_STEP_COUNT, MIN_FIXED_STEP_COUNT, 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, NamiHandoffTag, NamiPaywallAction, NamiPaywallManager$1 as NamiPaywallManager, PaywallManagerEvents as NamiPaywallManagerEvents, NamiPermissionOutcome, NamiPurchaseManager$1 as NamiPurchaseManager, NamiRefs, NamiReservedActions, NotFoundError, PAYWALL_ACTION_EVENT, PLATFORM_ID_REQUIRED, PRODUCTION, PaywallManagerEvents, PaywallRepository, PaywallState, PlacementLabelResolver, PlatformIDRequiredError, ProductRepository, RECONFIG_SUCCESS, RESUME_THROTTLE_MS, RetryLimitExceededError, SDKNotInitializedError, SDK_NOT_INITIALIZED, SERVER_NAMI_ENTITLEMENTS, SESSION_REQUIRED, SHOULD_SHOW_LOADING_INDICATOR, SIMULATE_CONFIG_FETCH_FAILURE, SIMULATE_PAYWALL_FETCH_FAILURE, SKU_TEXT_REGEX, SMART_TEXT_PATTERN, STARTUP_TELEMETRY, STATUS_BAD_REQUEST, STATUS_CONFLICT, STATUS_INTERNAL_SERVER_ERROR, STATUS_NOT_FOUND, STATUS_SUCCESS, SYSTEM_TIME_FILTER_PREFIX, SYSTEM_TIME_TOKEN_PREFIX, SessionService, SimpleEventTarget, StorageService, TIME_OVERRIDE_PREFIX, TRANSPORT_FAILURE_STATUS, 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, didReceiveResponse, empty, evaluateSystemTimeAssertion, evaluateSystemTimeCondition, evenSegmentWidth, extractStandardPricingPhases, firstSet, formatDate, formattedPrice, generateUUID, getApiCampaigns, getApiPaywalls, getBaseUrl, getBillingPeriodNumber, getCurrencyFormat, getDeviceData, getDeviceFormFactor, getDeviceScaleFactor, getEffectiveWebStyle, getEntitlementRefIdsForSku, getExtendedClientInfo, getFreeTrialPeriod, getInitialCampaigns, getInitialPaywalls, getJourneySettings, getPaywall, getPaywallDataFromLabel, getPercentagePriceDifference, getPeriodNumberInDays, getPeriodNumberInWeeks, getPlatformAdapters, getPriceDifference, getPricePerMonth, getProductDetail, getPurchaseAdapter, getReferenceSku, getSkuProductDetailKeys, getSkuSmartTextValue, getSlideSmartTextValue, getStandardBillingPeriod, getSystemTimeNow, getTranslate, getUrlParams, handleErrors, hasAllPaywalls, hasCapability, hasPurchaseManagement, initialState, invokeHandler, isAnonymousMode, isInitialConfigCompressed, isNamiFlowCampaign, isStepsStyle, isSubscription, isSystemTimeAssertion, isValidISODate, isValidUrl, journeyCampaigns, logger, mapAnonymousCampaigns, namiBuySKU, normalizeLaunchContext, parseTimeOverride, parseToSemver, postConversion, productDetail, registerAPITrafficObserver, registerPlatformAdapters, registerPurchaseAdapter, resolveCurrentStep, resolveLoopSource, resolveStepAlignment, resolveStepCount, resolveStepSizing, selectSegment, setActiveNamiEntitlements, shouldValidateProductGroups, skuItems, skuMapFromEntitlements, stepSegmentState, storageService, toDouble, toNamiEntitlements, toNamiSKU, tryParseB64Gzip, tryParseJson, updateRelatedSKUsForNamiEntitlement, uuidFromSplitPosition, validateForm, validateMinSDKVersion, validateTextInput };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@namiml/sdk-core",
3
- "version": "3.5.0-dev.202611011549",
3
+ "version": "3.5.0-dev.202611011626",
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",