@mparticle/web-sdk
Advanced tools
Comparing version 2.26.9 to 2.26.10
{ | ||
"name": "@mparticle/web-sdk", | ||
"version": "2.26.9", | ||
"version": "2.26.10", | ||
"description": "mParticle core SDK for web applications", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -13,3 +13,3 @@ import Types from './types'; | ||
var currentUserIdentities = {}; | ||
var identities = mpInstance._Persistence.getUserIdentities(mpid); | ||
var identities = mpInstance._Store.getUserIdentities(mpid); | ||
@@ -16,0 +16,0 @@ for (var identityType in identities) { |
import { Context } from '@mparticle/event-models'; | ||
import { | ||
AllUserAttributes, | ||
IdentityApiData, | ||
@@ -123,9 +122,4 @@ MPID, | ||
getDomain(doc: string, locationHostname: string): string; | ||
getUserIdentities(mpid: MPID): UserIdentities; | ||
getCartProducts(mpid: MPID): Product[]; | ||
setCartProducts(allProducts: Product[]): void; | ||
saveUserIdentitiesToPersistence( | ||
mpid: MPID, | ||
userIdentities: UserIdentities | ||
): void; | ||
saveUserCookieSyncDatesToPersistence(mpid: MPID, csd: CookieSyncDate): void; | ||
@@ -132,0 +126,0 @@ savePersistence(persistance: IPersistenceMinified): void; |
@@ -885,12 +885,2 @@ import Constants from './constants'; | ||
this.getUserIdentities = function(mpid) { | ||
var persistence = self.getPersistence(); | ||
if (persistence && persistence[mpid] && persistence[mpid].ui) { | ||
return persistence[mpid].ui; | ||
} else { | ||
return {}; | ||
} | ||
}; | ||
this.getCartProducts = function(mpid) { | ||
@@ -932,18 +922,2 @@ var allCartProducts, | ||
this.saveUserIdentitiesToPersistence = function(mpid, userIdentities) { | ||
if (userIdentities) { | ||
var persistence = self.getPersistence(); | ||
if (persistence) { | ||
if (persistence[mpid]) { | ||
persistence[mpid].ui = userIdentities; | ||
} else { | ||
persistence[mpid] = { | ||
ui: userIdentities, | ||
}; | ||
} | ||
self.savePersistence(persistence); | ||
} | ||
} | ||
}; | ||
this.saveUserCookieSyncDatesToPersistence = function(mpid, csd) { | ||
@@ -950,0 +924,0 @@ if (csd) { |
@@ -8,2 +8,3 @@ import { Batch, Context } from '@mparticle/event-models'; | ||
ConsentState, | ||
UserIdentities, | ||
} from '@mparticle/web-sdk'; | ||
@@ -201,2 +202,4 @@ import { IKitConfigs } from './configAPIClient'; | ||
setUserAttributes?(mpid: MPID, attributes: UserAttributes): void; | ||
getUserIdentities?(mpid: MPID): UserIdentities; | ||
setUserIdentities?(mpid: MPID, userIdentities: UserIdentities): void; | ||
@@ -535,6 +538,4 @@ addMpidToSessionHistory?(mpid: MPID, previousMpid?: MPID): void; | ||
); | ||
} | ||
}; | ||
this.getConsentState = (mpid: MPID): ConsentState => { | ||
@@ -544,3 +545,3 @@ const { | ||
} = mpInstance._Consent.ConsentSerialization; | ||
const serializedConsentState = this._getFromPersistence< | ||
@@ -634,2 +635,9 @@ IMinifiedConsentJSONObject | ||
this.getUserIdentities = (mpid: MPID): UserIdentities => | ||
this._getFromPersistence(mpid, 'ui') || {}; | ||
this.setUserIdentities = (mpid: MPID, userIdentities: UserIdentities) => { | ||
this._setPersistence(mpid, 'ui', userIdentities); | ||
}; | ||
this.addMpidToSessionHistory = (mpid: MPID, previousMPID?: MPID): void => { | ||
@@ -636,0 +644,0 @@ const indexOfMPID = this.currentSessionMPIDs.indexOf(mpid); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1541859
27780