Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrustX Bid Adapter: convert all id-like request fields to a string #7386

Merged
merged 70 commits into from
Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
031fa56
Add trustx adapter and tests for it
PWyrembak Aug 15, 2017
319cadd
update integration example
PWyrembak Aug 15, 2017
0e877f9
Merge remote-tracking branch 'upstream/master'
PWyrembak Aug 16, 2017
0425234
Merge remote-tracking branch 'upstream/master'
PWyrembak Sep 8, 2017
69ab1f4
Update trustx adapter
PWyrembak Sep 9, 2017
817f2fa
Merge remote-tracking branch 'upstream/master'
PWyrembak Sep 19, 2017
ef50012
Post-review fixes of Trustx adapter
PWyrembak Sep 19, 2017
bd5b75c
Merge remote-tracking branch 'upstream/master'
PWyrembak Oct 3, 2017
bff944b
Merge remote-tracking branch 'upstream/master'
PWyrembak Oct 10, 2017
843440d
Code improvement for trustx adapter: changed default price type from …
PWyrembak Oct 10, 2017
cd01e9b
Merge remote-tracking branch 'upstream/master'
PWyrembak Oct 17, 2017
aa249b5
Update TrustX adapter to support the 1.0 version
PWyrembak Oct 17, 2017
119728b
Merge remote-tracking branch 'upstream/master'
PWyrembak Oct 20, 2017
5f60ac3
Make requested changes for TrustX adapter
PWyrembak Oct 20, 2017
2628673
Updated markdown file for TrustX adapter
PWyrembak Oct 24, 2017
b3badf9
Merge remote-tracking branch 'upstream/master'
PWyrembak Oct 26, 2017
292b4dd
Fix TrustX adapter and spec file
PWyrembak Oct 26, 2017
b3e1465
Merge remote-tracking branch 'upstream/master'
PWyrembak Dec 19, 2017
09b581a
Update TrustX adapter: r parameter was added to ad request as cache b…
PWyrembak Dec 19, 2017
7b16a1c
Merge remote-tracking branch 'upstream/master'
PWyrembak May 17, 2018
73b7249
Add support of gdpr to Trustx Bid Adapter
PWyrembak May 17, 2018
08ca36e
Merge remote-tracking branch 'upstream/master'
PWyrembak Aug 6, 2018
4974e55
Add wtimeout to ad request params for TrustX Bid Adapter
PWyrembak Aug 6, 2018
240306f
Merge remote-tracking branch 'upstream/master'
PWyrembak Aug 10, 2018
9175298
TrustX Bid Adapter: remove last ampersand in the ad request
PWyrembak Aug 10, 2018
d98be98
Merge remote-tracking branch 'upstream/master'
PWyrembak Feb 12, 2019
83b3aaf
Update TrustX Bid Adapter to support identical uids in parameters
PWyrembak Feb 15, 2019
3e348d2
Merge remote-tracking branch 'upstream/master'
PWyrembak Feb 15, 2019
fc2e05a
Merge remote-tracking branch 'upstream/master'
PWyrembak Feb 20, 2019
f77c2ee
Update TrustX Bid Adapter to ignore bids that sizes do not match the …
PWyrembak Feb 20, 2019
cba862b
Merge remote-tracking branch 'upstream/master'
PWyrembak Feb 28, 2019
f3de951
Merge remote-tracking branch 'upstream/master'
PWyrembak Mar 13, 2019
549ea7a
Update TrustX Bid Adapter to support instream and outstream video
PWyrembak Mar 13, 2019
4bca1d6
Merge remote-tracking branch 'upstream/master'
PWyrembak Apr 15, 2019
0bce985
Added wrapperType and wrapperVersion parameters in ad request for Tru…
PWyrembak Apr 15, 2019
59719fc
Merge remote-tracking branch 'upstream/master'
PWyrembak Jul 4, 2019
c604ba0
Update TrustX Bid Adapter to use refererInfo instead depricated funct…
PWyrembak Jul 5, 2019
ed34d02
Merge remote-tracking branch 'upstream/master'
PWyrembak Jul 30, 2019
aedbb7c
HOTFIX for referrer encodind in TrustX Bid Adapter
PWyrembak Jul 30, 2019
9a6110d
Fix test for TrustX Bid Adapter
PWyrembak Jul 30, 2019
40f8b2c
Merge remote-tracking branch 'upstream/master'
PWyrembak Sep 3, 2019
ccdfb14
Merge remote-tracking branch 'upstream/master'
PWyrembak Sep 5, 2019
319a7de
TrustX Bid Adapter: added keywords passing support
PWyrembak Sep 5, 2019
1e2f7ca
Merge remote-tracking branch 'upstream/master'
PWyrembak Sep 11, 2019
f1a8833
Merge remote-tracking branch 'upstream/master'
PWyrembak Nov 26, 2019
d13e78c
Merge remote-tracking branch 'upstream/master'
PWyrembak Nov 27, 2019
32f6aae
TrustX Bid Adapter: added us_privacy parameter in bid request
PWyrembak Nov 27, 2019
bf96101
Merge remote-tracking branch 'upstream/master'
PWyrembak Dec 4, 2019
9b8e683
TrustX Bid Adapter: fix us_privacy parameter in bid request
PWyrembak Dec 4, 2019
f2cdc55
Merge remote-tracking branch 'upstream/master'
PWyrembak Mar 1, 2021
a25be55
Fix alias error for TrustX Bid Adapter
PWyrembak Mar 1, 2021
05369a5
Merge remote-tracking branch 'upstream/master'
PWyrembak Mar 17, 2021
46b1824
Merge remote-tracking branch 'upstream/master'
PWyrembak Mar 19, 2021
8fb13fe
TrustX Bid Adapter: added new request format
PWyrembak Mar 22, 2021
40f9d36
Merge remote-tracking branch 'upstream/master'
PWyrembak Apr 6, 2021
e809a08
TrustX Bid adapter: fix new format endpoint
PWyrembak Apr 9, 2021
306dc26
TrustX Bid Adapter: update md file to support useNewFormat parameter
PWyrembak Apr 9, 2021
2bfaf93
Merge remote-tracking branch 'upstream/master'
PWyrembak May 17, 2021
df8c19e
TrustX Bid Adapter: added additional sync url
PWyrembak May 17, 2021
e6c54c7
Merge remote-tracking branch 'upstream/master'
PWyrembak May 17, 2021
c3829dd
TrustX Bid Adapter: added check for enabled syncs number + added gdpr…
PWyrembak May 18, 2021
7c575d7
Merge remote-tracking branch 'upstream/master'
PWyrembak May 31, 2021
5b312b1
TrustX Bid Adapter: added support of meta.advertiserDomains
PWyrembak May 31, 2021
7513881
Merge remote-tracking branch 'upstream/master'
PWyrembak Jun 18, 2021
267ab18
TrustX Bid Adapter: added support rtd permutive and jwplayer for new …
PWyrembak Jun 18, 2021
0be616c
Merge remote-tracking branch 'upstream/master'
PWyrembak Aug 11, 2021
08d45b5
TrustX Bid Adapter: Use new format by default + new keywords logic
PWyrembak Aug 11, 2021
2d25132
TrustX Bid Adapter: fix md file
PWyrembak Aug 23, 2021
14786b5
Merge remote-tracking branch 'upstream/master'
PWyrembak Sep 7, 2021
65abf5e
TrustX: Convert all id-like request fields to a string
PWyrembak Sep 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/trustxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ export const spec = {
}
}
let impObj = {
id: bidId,
id: bidId && bidId.toString(),
tagid: uid.toString(),
ext: {
divid: adUnitCode
divid: adUnitCode && adUnitCode.toString()
}
};

Expand Down Expand Up @@ -132,7 +132,7 @@ export const spec = {
});

const source = {
tid: auctionId,
tid: auctionId && auctionId.toString(),
ext: {
wrapper: 'Prebid_js',
wrapper_version: '$prebid.version$'
Expand All @@ -147,7 +147,7 @@ export const spec = {
const tmax = timeout ? Math.min(bidderTimeout, timeout) : bidderTimeout;

let request = {
id: bidderRequestId,
id: bidderRequestId && bidderRequestId.toString(),
site: {
page: referer
},
Expand Down
45 changes: 45 additions & 0 deletions test/spec/modules/trustxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,51 @@ describe('TrustXAdapter', function () {
expect(payload.tmax).to.equal(3000);
getConfigStub.restore();
});
it('all id like request fields must be a string', function () {
const bidderRequestWithNumId = Object.assign({}, bidderRequest, { bidderRequestId: 123123, auctionId: 345345543 });

let bidRequestWithNumId = {
'bidder': 'trustx',
'params': {
'uid': 43,
},
'adUnitCode': 111111,
'sizes': [[300, 250], [300, 600]],
'mediaTypes': {
'banner': {
'sizes': [[300, 250], [300, 600]]
}
},
'bidId': 23423423,
'bidderRequestId': 123123,
'auctionId': 345345543,
};

const request = spec.buildRequests([bidRequestWithNumId], bidderRequestWithNumId);
expect(request.data).to.be.an('string');
const payload = parseRequest(request.data);
expect(payload).to.deep.equal({
'id': '123123',
'site': {
'page': referrer
},
'tmax': bidderRequest.timeout,
'source': {
'tid': '345345543',
'ext': {'wrapper': 'Prebid_js', 'wrapper_version': '$prebid.version$'}
},
'imp': [{
'id': '23423423',
'tagid': '43',
'ext': {'divid': '111111'},
'banner': {
'w': 300,
'h': 250,
'format': [{'w': 300, 'h': 250}, {'w': 300, 'h': 600}]
}
}]
});
});

describe('floorModule', function () {
const floorTestData = {
Expand Down