@cognior/iap-sdk 0.2.8 → 0.2.12

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.d.ts CHANGED
@@ -81,7 +81,7 @@ interface DapInitOptions {
81
81
  /** Logical screen/view identifier for location-based flow matching. */
82
82
  screenId?: string;
83
83
  /** Authenticated user context. Can also be provided later via {@link DapSDK.setUser}. */
84
- user?: DapUser;
84
+ user?: any;
85
85
  }
86
86
  /** A single step inside a {@link DapFlowDefinition}. */
87
87
  interface DapFlowStep {
@@ -124,9 +124,9 @@ interface DapSDK {
124
124
  */
125
125
  init(opts: DapInitOptions): Promise<void>;
126
126
  /** Set (or replace) the authenticated user context. Triggers pending flows. */
127
- setUser(user: DapUser): void;
127
+ setUser(user: any): Promise<void>;
128
128
  /** Merge partial fields into the existing user context. */
129
- updateUser(partialUser: Partial<DapUser>): void;
129
+ updateUser(partialUser: any): void;
130
130
  /** Return the current user, or null if not set. */
131
131
  getUser(): DapUser | null;
132
132
  /** Clear the user context. */
@@ -182,8 +182,9 @@ declare global {
182
182
  declare function init(opts: DapInitOptions): Promise<void>;
183
183
  /**
184
184
  * Set user context and trigger flow re-evaluation
185
+ * Now supports flexible user data formats (userid, mailid, etc.)
185
186
  */
186
- declare function setUser(user: DapUser): void;
187
+ declare function setUser(user: any): Promise<void>;
187
188
  /**
188
189
  * Update existing user context
189
190
  */