mod-build 4.0.40-beta.1 → 4.0.40-beta.2

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## 4.0.40
2
2
 
3
- - Added `&filters[includeInactive]=1` to `getConsentCaptureLanguage` to get the `profileId` for inactive profiles to keep this flow happy!
3
+ - Updated `vendorPublicIdentifier` logic to work for new bestcompany.com branded pages.
4
4
 
5
5
  ## 4.0.39
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "4.0.40-beta.1",
3
+ "version": "4.0.40-beta.2",
4
4
  "description": "Share components for S3 sites.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -206,8 +206,8 @@ const getConsentCaptureLanguage = async function(config, tempConfig) {
206
206
 
207
207
  let apiUrl = '';
208
208
 
209
- if (brandedSiteIdentifiers.data[websiteName] && brandedSiteIdentifiers.data[websiteName].vendorPublicIdentifier) {
210
- const vendorPublicIdentifier = brandedSiteIdentifiers.data[websiteName].vendorPublicIdentifier;
209
+ if (brandedSiteIdentifiers.data[websiteName] && (brandedSiteIdentifiers.data[websiteName].vendorPublicIdentifier || brandedSiteIdentifiers.data[websiteName][companyName] && brandedSiteIdentifiers.data[websiteName][companyName].vendorPublicIdentifier)) {
210
+ const vendorPublicIdentifier = brandedSiteIdentifiers.data[websiteName][companyName] ? brandedSiteIdentifiers.data[websiteName][companyName].vendorPublicIdentifier : brandedSiteIdentifiers.data[websiteName].vendorPublicIdentifier;
211
211
 
212
212
  apiUrl = `${apiDomain}utils/vendor-display-name?vendorKeys=${vendorPublicIdentifier}`;
213
213
 
@@ -220,7 +220,7 @@ const getConsentCaptureLanguage = async function(config, tempConfig) {
220
220
  } else {
221
221
  const vendorKey = findVendorKey(config),
222
222
  profileApiDomain = 'https://api.modernize.com/',
223
- profileApiUrl = `${profileApiDomain}v1/client-profiles/profiles?filters[matches][]=${vendorKey},QMP&filters[includeInactive]=1`;
223
+ profileApiUrl = `${profileApiDomain}v1/client-profiles/profiles?filters[matches][]=${vendorKey},QMP`;
224
224
 
225
225
  if (vendorKey !== null) {
226
226
  const getBrandedProfileId = await axios.get(profileApiUrl);