You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Low Risk
Mostly typing and module rename; the only behavioral tweak is a narrow fix in identity callback previous-user resolution when MPIDs collide.
Overview
Migrates the helpers module from JavaScript to TypeScript and aligns runtime types with the typed implementation.
src/helpers.ts replaces helpers.js with explicit types on the Helpers constructor (SDKHelpersApi / IMParticleWebSDKInstance), typed helper methods, const/let instead of var, and arrow functions on several methods so this no longer uses a self alias. getPreviousUser in invokeCallback now returns the next user from the stack when the most recent user matches the current MPID (return users.shift() || null) instead of only reassigning a local variable.
src/sdkRuntimeModels.ts expands SDKHelpersApi (e.g. filterUserIdentities, decoded, parseStringOrNumber, inArray), changes generateHash to return number, relaxes SDKProduct required fields and allows Attributes to be null, and stops omitting identityCallback from SDKInitConfig’s MPConfiguration omit list.
src/consent.ts widens IConsentRulesValues.consentPurpose to string | number for hashed consent rule keys.
test/src/tests-helpers.ts is the TypeScript test port with sandbox typing and casts where the public SDK types are incomplete.
Reviewed by Cursor Bugbot for commit 354bfb4. Bugbot is set up for automated code reviews on this repo. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
What Has Changed
Screenshots/Video
Checklist
Additional Notes
Reference Issue (For employees only. Ignore if you are an outside contributor)