@namiml/sdk-core 3.4.3-dev.202606151743 → 3.4.3-dev.202606180014

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
@@ -98,7 +98,7 @@ const {
98
98
  // version — stamped by scripts/version.sh
99
99
  NAMI_SDK_VERSION: exports.NAMI_SDK_VERSION = "3.4.3",
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.3-dev.202606151743",
101
+ NAMI_SDK_PACKAGE_VERSION: exports.NAMI_SDK_PACKAGE_VERSION = "3.4.3-dev.202606180014",
102
102
  // environments
103
103
  PRODUCTION: exports.PRODUCTION = "production", DEVELOPMENT: exports.DEVELOPMENT = "development",
104
104
  // error messages
@@ -12059,6 +12059,8 @@ class NamiRefs {
12059
12059
  constructor() {
12060
12060
  // In-memory flag for device registration failures (not persisted)
12061
12061
  this.inMemoryAnonymousMode = false;
12062
+ // Captured before device registration; true only on genuine fresh installs
12063
+ this.isFirstSession = false;
12062
12064
  // Register this instance to avoid circular dependency issues
12063
12065
  setNamiRefsInstance(this);
12064
12066
  }
@@ -12073,7 +12075,11 @@ class NamiRefs {
12073
12075
  // Check both persistent and in-memory flags
12074
12076
  return storageService.getAnonymousMode() || this.inMemoryAnonymousMode;
12075
12077
  }
12078
+ getIsFirstSession() {
12079
+ return this.isFirstSession;
12080
+ }
12076
12081
  async init(config) {
12082
+ this.isFirstSession = storageService.getDevice() === null && !storageService.getAnonymousMode();
12077
12083
  this.setInitialValues(config);
12078
12084
  ConfigRepository.instance.fetchConfig();
12079
12085
  await this.initAndFetchRequiredData(config);
@@ -14159,6 +14165,9 @@ class NamiFlow extends BasicNamiFlow {
14159
14165
  return undefined;
14160
14166
  }
14161
14167
  });
14168
+ NamiConditionEvaluator.shared.registerNamespaceResolver('__first_session__', () => {
14169
+ return NamiRefs.instance.getIsFirstSession();
14170
+ });
14162
14171
  }
14163
14172
  get currentFlowStep() {
14164
14173
  return this.stepcrumbs.at(-1);
package/dist/index.d.ts CHANGED
@@ -2764,10 +2764,12 @@ declare class NamiAPI {
2764
2764
  declare class NamiRefs {
2765
2765
  static instance: NamiRefs;
2766
2766
  private inMemoryAnonymousMode;
2767
+ private isFirstSession;
2767
2768
  constructor();
2768
2769
  setInMemoryAnonymousMode(enabled: boolean): void;
2769
2770
  isInMemoryAnonymousMode(): boolean;
2770
2771
  isAnonymousMode(): boolean;
2772
+ getIsFirstSession(): boolean;
2771
2773
  init(config: NamiConfiguration): Promise<void>;
2772
2774
  private setInitialValues;
2773
2775
  private initAnonymousDevice;
package/dist/index.mjs CHANGED
@@ -96,7 +96,7 @@ const {
96
96
  // version — stamped by scripts/version.sh
97
97
  NAMI_SDK_VERSION = "3.4.3",
98
98
  // full package version including dev suffix — stamped by scripts/version.sh
99
- NAMI_SDK_PACKAGE_VERSION = "3.4.3-dev.202606151743",
99
+ NAMI_SDK_PACKAGE_VERSION = "3.4.3-dev.202606180014",
100
100
  // environments
101
101
  PRODUCTION = "production", DEVELOPMENT = "development",
102
102
  // error messages
@@ -12057,6 +12057,8 @@ class NamiRefs {
12057
12057
  constructor() {
12058
12058
  // In-memory flag for device registration failures (not persisted)
12059
12059
  this.inMemoryAnonymousMode = false;
12060
+ // Captured before device registration; true only on genuine fresh installs
12061
+ this.isFirstSession = false;
12060
12062
  // Register this instance to avoid circular dependency issues
12061
12063
  setNamiRefsInstance(this);
12062
12064
  }
@@ -12071,7 +12073,11 @@ class NamiRefs {
12071
12073
  // Check both persistent and in-memory flags
12072
12074
  return storageService.getAnonymousMode() || this.inMemoryAnonymousMode;
12073
12075
  }
12076
+ getIsFirstSession() {
12077
+ return this.isFirstSession;
12078
+ }
12074
12079
  async init(config) {
12080
+ this.isFirstSession = storageService.getDevice() === null && !storageService.getAnonymousMode();
12075
12081
  this.setInitialValues(config);
12076
12082
  ConfigRepository.instance.fetchConfig();
12077
12083
  await this.initAndFetchRequiredData(config);
@@ -14157,6 +14163,9 @@ class NamiFlow extends BasicNamiFlow {
14157
14163
  return undefined;
14158
14164
  }
14159
14165
  });
14166
+ NamiConditionEvaluator.shared.registerNamespaceResolver('__first_session__', () => {
14167
+ return NamiRefs.instance.getIsFirstSession();
14168
+ });
14160
14169
  }
14161
14170
  get currentFlowStep() {
14162
14171
  return this.stepcrumbs.at(-1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@namiml/sdk-core",
3
- "version": "3.4.3-dev.202606151743",
3
+ "version": "3.4.3-dev.202606180014",
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",