@blotoutio/edgetag-sdk-js
Advanced tools
Comparing version 0.62.1 to 0.63.0
@@ -281,2 +281,3 @@ 'use strict'; | ||
const fallbackSessionKey = 'fallback_tag_user_id'; | ||
const storageIdKey = 'storageId'; | ||
@@ -565,3 +566,3 @@ const getMessage = (error) => { | ||
locale: getLocale(), | ||
sdkVersion: "0.62.1" , | ||
sdkVersion: "0.63.0" , | ||
...(payload || {}), | ||
@@ -848,7 +849,7 @@ }; | ||
if (options === null || options === void 0 ? void 0 : options.destination) { | ||
processConsent(options.destination, consent, options === null || options === void 0 ? void 0 : options.localSave); | ||
processConsent(options.destination, consent, options); | ||
return; | ||
} | ||
getInstances().forEach((destination) => { | ||
processConsent(destination, consent, options === null || options === void 0 ? void 0 : options.localSave); | ||
processConsent(destination, consent, options); | ||
}); | ||
@@ -862,3 +863,3 @@ }; | ||
}; | ||
const processConsent = (destination, consent, localSave) => { | ||
const processConsent = (destination, consent, options) => { | ||
const existingConsent = getConsent$1(destination); | ||
@@ -868,2 +869,9 @@ if (areEqual(existingConsent, consent)) { | ||
} | ||
if (!getSetting(destination, 'initialized')) { | ||
addStub(destination, { | ||
name: 'consent', | ||
arguments: [consent, options], | ||
}); | ||
return; | ||
} | ||
const payload = { | ||
@@ -873,3 +881,3 @@ consentString: consent, | ||
saveConsent(destination, consent); | ||
if (!localSave) { | ||
if (!(options === null || options === void 0 ? void 0 : options.localSave)) { | ||
postRequest(getConsentURL(destination), payload).catch(error); | ||
@@ -1183,3 +1191,7 @@ } | ||
browserPackages: Object.values(providers), | ||
storageId: result.storageId, | ||
}); | ||
if (result.storageId != null) { | ||
savePerKey(preferences.edgeURL, 'local', tagStorage, result.storageId, storageIdKey); | ||
} | ||
handleManifest(preferences.edgeURL, result); | ||
@@ -1186,0 +1198,0 @@ try { |
@@ -52,2 +52,3 @@ import { | ||
userId?: string | ||
storageId?: number | ||
consent: UserConsent | ||
@@ -54,0 +55,0 @@ consentSetting: ConsentSetting |
{ | ||
"name": "@blotoutio/edgetag-sdk-js", | ||
"version": "0.62.1", | ||
"version": "0.63.0", | ||
"description": "JS SDK for EdgeTag", | ||
@@ -5,0 +5,0 @@ "author": "Blotout", |
Sorry, the diff of this file is not supported yet
92366
2846