-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
5 changed files
with
118 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* This module adds netId to the User ID module | ||
* The {@link module:modules/userId} module is required | ||
* @module modules/netIdSystem | ||
* @requires module:modules/userId | ||
*/ | ||
|
||
import {submodule} from '../src/hook.js'; | ||
|
||
/** @type {Submodule} */ | ||
export const netIdSubmodule = { | ||
/** | ||
* used to link submodule with config | ||
* @type {string} | ||
*/ | ||
name: 'netId', | ||
/** | ||
* decode the stored id value for passing to bid requests | ||
* @function decode | ||
* @param {(Object|string)} value | ||
* @returns {(Object|undefined)} | ||
*/ | ||
decode(value) { | ||
return (value && typeof value['netId'] === 'string') ? { 'netId': value['netId'] } : undefined; | ||
}, | ||
/** | ||
* performs action to obtain id and return a value in the callback's response argument | ||
* @function | ||
* @param {SubmoduleParams} [configParams] | ||
* @param {ConsentData} [consentData] | ||
* @param {(Object|undefined)} cacheIdObj | ||
* @returns {IdResponse|undefined} | ||
*/ | ||
getId(configParams) { | ||
/* currently not possible */ | ||
return {}; | ||
} | ||
}; | ||
|
||
submodule('userId', netIdSubmodule); |
This file contains 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
This file contains 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
This file contains 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
This file contains 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