-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInterfaces.ts
85 lines (84 loc) · 1.93 KB
/
Interfaces.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import { AdUnit } from './Internal';
export enum Status {
UNDEFINED, // never loaded or finished rendering
FETCHING, // fetching bids
READYTODRAW, // bids are back
DRAWING, // drawing
WAITING, // waiting for the timeout between reloads
}
export enum Libraries {
PREBID,
A9,
DFP
}
export interface ViewableSettings {
rootMargin: string,
threshold: Array<number>,
callback: Function
}
export interface PrebidJS {
setTargetingForGPTAsync: Function,
requestBids: Function,
que: Array<Function>,
addAdUnits: Function,
setConfig: Function
}
export interface PrebidUnit {
code: string,
mediaTypes: {
banner: {
sizes: Array<Array<number>>,
bids: Array<object>
}
}
}
export interface A9JS {
setDisplayBids: Function,
fetchBids: Function,
init: Function
}
export interface A9Unit {
slotID: string,
slotName: string,
sizes: Array<Array<number>>
}
export interface GoogleJS {
cmd: Array<Function>,
display: Function,
googletags: Function,
pubads: Function,
defineSlot: Function,
enableServices: Function,
destroySlots: Function
}
export interface GoogleUnit {
setTargeting: Function,
slot: {
getSlotElementId: Function
}
isEmpty: Boolean
}
export interface AdUnits {
[code: string]: AdUnit
}
export interface EventObject extends CustomEventInit<any> {
detail: {
code: string,
fromViewableEvent?: Boolean,
isEmpty?: Boolean
}
}
export interface Settings {
timeout: number, // in milliseconds
interactionThreshold: number | Boolean, // in milliseconds, or false
dfpUnitIdBase: string, // /{networkcode}/{string}
a9Id: string, // guid from Amazon
viewability: ViewableSettings,
retries: {
wait: number,
viewability: { // retry loading the unit on empty
wait: number,
limit: number
}
}
}