|
1 | 1 | import { registerBidder } from '../src/adapters/bidderFactory.js'; |
2 | | -import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js'; |
| 2 | +import { BANNER, VIDEO } from '../src/mediaTypes.js'; |
| 3 | +import { getStorageManager } from '../src/storageManager.js'; |
3 | 4 | import { |
4 | | - isBidRequestValid, |
5 | | - buildRequests, |
6 | | - interpretResponse, |
7 | | - getUserSyncs |
8 | | -} from '../libraries/teqblazeUtils/bidderUtils.js'; |
| 5 | + createBuildRequestsFn, |
| 6 | + createInterpretResponseFn, |
| 7 | + createUserSyncGetter, |
| 8 | + isBidRequestValid |
| 9 | +} from '../libraries/vidazooUtils/bidderUtils.js'; |
9 | 10 |
|
| 11 | +const DEFAULT_SUB_DOMAIN = 'exchange'; |
10 | 12 | const BIDDER_CODE = 'programmaticX'; |
| 13 | +const BIDDER_VERSION = '1.0.0'; |
11 | 14 | const GVLID = 1344; |
12 | | -const AD_URL = 'https://us-east.progrtb.com/pbjs'; |
13 | | -const SYNC_URL = 'https://sync.progrtb.com'; |
| 15 | + |
| 16 | +export const storage = getStorageManager({ bidderCode: BIDDER_CODE }); |
| 17 | + |
| 18 | +export function createDomain(subDomain = DEFAULT_SUB_DOMAIN) { |
| 19 | + return `https://${subDomain}.programmaticx.ai`; |
| 20 | +} |
| 21 | + |
| 22 | +const buildRequests = createBuildRequestsFn( |
| 23 | + createDomain, |
| 24 | + null, |
| 25 | + storage, |
| 26 | + BIDDER_CODE, |
| 27 | + BIDDER_VERSION, |
| 28 | + false |
| 29 | +); |
| 30 | + |
| 31 | +const interpretResponse = createInterpretResponseFn(BIDDER_CODE, false); |
| 32 | + |
| 33 | +const getUserSyncs = createUserSyncGetter({ |
| 34 | + iframeSyncUrl: 'https://sync.programmaticx.ai/api/sync/iframe', |
| 35 | + imageSyncUrl: 'https://sync.programmaticx.ai/api/sync/image' |
| 36 | +}); |
14 | 37 |
|
15 | 38 | export const spec = { |
16 | 39 | code: BIDDER_CODE, |
| 40 | + version: BIDDER_VERSION, |
17 | 41 | gvlid: GVLID, |
18 | | - supportedMediaTypes: [BANNER, VIDEO, NATIVE], |
19 | | - |
20 | | - isBidRequestValid: isBidRequestValid(), |
21 | | - buildRequests: buildRequests(AD_URL), |
| 42 | + supportedMediaTypes: [BANNER, VIDEO], |
| 43 | + isBidRequestValid, |
| 44 | + buildRequests, |
22 | 45 | interpretResponse, |
23 | | - getUserSyncs: getUserSyncs(SYNC_URL) |
| 46 | + getUserSyncs |
24 | 47 | }; |
25 | 48 |
|
26 | 49 | registerBidder(spec); |
0 commit comments