@surfside/ads-core 1.0.6

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.
Files changed (80) hide show
  1. package/README.md +64 -0
  2. package/lib/index.js +1 -0
  3. package/lib/types/constant-values/index.d.ts +46 -0
  4. package/lib/types/errors/index.d.ts +3 -0
  5. package/lib/types/helpers/generators/CollectN.d.ts +2 -0
  6. package/lib/types/helpers/generators/index.d.ts +1 -0
  7. package/lib/types/helpers/handlebars/index.d.ts +119 -0
  8. package/lib/types/helpers/index.d.ts +4 -0
  9. package/lib/types/helpers/requests/RequestBuilder.d.ts +124 -0
  10. package/lib/types/helpers/requests/SimpleBannerRequest.d.ts +26 -0
  11. package/lib/types/helpers/requests/index.d.ts +2 -0
  12. package/lib/types/helpers/responses/BuildBannerResponse.d.ts +10 -0
  13. package/lib/types/helpers/responses/BuildNativeResponse.d.ts +21 -0
  14. package/lib/types/helpers/responses/BuildVideoResponse.d.ts +0 -0
  15. package/lib/types/helpers/responses/ClickthroughHelpers.d.ts +2 -0
  16. package/lib/types/helpers/responses/VastHelpers.d.ts +4 -0
  17. package/lib/types/helpers/responses/index.d.ts +4 -0
  18. package/lib/types/index.d.ts +19 -0
  19. package/lib/types/middleware/DeviceMiddleware.d.ts +3 -0
  20. package/lib/types/middleware/GeoMiddleware.d.ts +3 -0
  21. package/lib/types/middleware/IdentityMiddleware.d.ts +4 -0
  22. package/lib/types/middleware/index.d.ts +3 -0
  23. package/lib/types/models/index.d.ts +4 -0
  24. package/lib/types/models/retail/IProductInformation.d.ts +37 -0
  25. package/lib/types/models/retail/IPublisherConfiguration.d.ts +64 -0
  26. package/lib/types/models/retail/IRecommenderResponse.d.ts +10 -0
  27. package/lib/types/models/retail/index.d.ts +3 -0
  28. package/lib/types/models/rtb/IBidRequest.d.ts +399 -0
  29. package/lib/types/models/rtb/IBidResponse.d.ts +47 -0
  30. package/lib/types/models/rtb/index.d.ts +3 -0
  31. package/lib/types/models/rtb/native/Constants.d.ts +60 -0
  32. package/lib/types/models/rtb/native/INativeRequest.d.ts +54 -0
  33. package/lib/types/models/rtb/native/INativeResponse.d.ts +60 -0
  34. package/lib/types/models/rtb/native/NativeConstants.d.ts +120 -0
  35. package/lib/types/models/rtb/native/NativeRequestBuilder.d.ts +158 -0
  36. package/lib/types/models/rtb/native/index.d.ts +4 -0
  37. package/lib/types/models/tracking/IEvents.d.ts +82 -0
  38. package/lib/types/models/tracking/IGeoContext.d.ts +14 -0
  39. package/lib/types/models/tracking/IUserID.d.ts +1 -0
  40. package/lib/types/models/tracking/index.d.ts +3 -0
  41. package/lib/types/models/vast/Vast.d.ts +50 -0
  42. package/lib/types/models/vast/index.d.ts +1 -0
  43. package/lib/types/services/OverrideService.d.ts +10 -0
  44. package/lib/types/services/index.d.ts +5 -0
  45. package/lib/types/services/logger/ILoggerService.d.ts +39 -0
  46. package/lib/types/services/logger/LocalLoggerService.d.ts +19 -0
  47. package/lib/types/services/logger/index.d.ts +2 -0
  48. package/lib/types/services/product-feed/IProductFeedService.d.ts +5 -0
  49. package/lib/types/services/product-feed/SurfsideProductFeedService.d.ts +11 -0
  50. package/lib/types/services/product-feed/index.d.ts +2 -0
  51. package/lib/types/services/recommender/IRecommenderService.d.ts +47 -0
  52. package/lib/types/services/recommender/SurfsideRecommenderService.d.ts +31 -0
  53. package/lib/types/services/recommender/index.d.ts +2 -0
  54. package/lib/types/services/rtb/bidder/IBidderService.d.ts +12 -0
  55. package/lib/types/services/rtb/bidder/SurfsideBidderService.d.ts +28 -0
  56. package/lib/types/services/rtb/bidder/index.d.ts +2 -0
  57. package/lib/types/services/rtb/configuration/IConfigurationService.d.ts +14 -0
  58. package/lib/types/services/rtb/configuration/SurfsideConfigurationService.d.ts +29 -0
  59. package/lib/types/services/rtb/configuration/index.d.ts +2 -0
  60. package/lib/types/services/rtb/index.d.ts +2 -0
  61. package/lib/types/services/tracking/device/DeviceOverrideService.d.ts +8 -0
  62. package/lib/types/services/tracking/device/IDeviceService.d.ts +4 -0
  63. package/lib/types/services/tracking/device/SurfsideDeviceService.d.ts +16 -0
  64. package/lib/types/services/tracking/device/index.d.ts +3 -0
  65. package/lib/types/services/tracking/events/IEventService.d.ts +5 -0
  66. package/lib/types/services/tracking/events/SurfsideEventService.d.ts +42 -0
  67. package/lib/types/services/tracking/events/index.d.ts +2 -0
  68. package/lib/types/services/tracking/geo/GeoOverrideService.d.ts +8 -0
  69. package/lib/types/services/tracking/geo/IGeoService.d.ts +12 -0
  70. package/lib/types/services/tracking/geo/SurfsideGeoService.d.ts +7 -0
  71. package/lib/types/services/tracking/geo/index.d.ts +3 -0
  72. package/lib/types/services/tracking/index.d.ts +4 -0
  73. package/lib/types/services/tracking/user/IUserIDService.d.ts +4 -0
  74. package/lib/types/services/tracking/user/SurfsideUserIDService.d.ts +7 -0
  75. package/lib/types/services/tracking/user/UserOverrideService.d.ts +8 -0
  76. package/lib/types/services/tracking/user/index.d.ts +3 -0
  77. package/lib/types/utils/Protocol.d.ts +1 -0
  78. package/lib/types/utils/Rendering.d.ts +44 -0
  79. package/lib/types/utils/index.d.ts +2 -0
  80. package/package.json +47 -0
@@ -0,0 +1,2 @@
1
+ import type { ICompiledPublisherConfiguration, IProductInformation } from '../../models';
2
+ export declare function BuildClickThroughUrl(configuration: ICompiledPublisherConfiguration, product: IProductInformation, catalog: IProductInformation, ext?: any): string;
@@ -0,0 +1,4 @@
1
+ import type { IBidResponse, IVast } from '../../models';
2
+ import type { ILoggerService } from '../../services';
3
+ export declare function DeserializeVideo(response: IBidResponse, logger?: ILoggerService): IVast | null;
4
+ export declare function DeserializeVast(logger: ILoggerService | undefined, adm: string): IVast;
@@ -0,0 +1,4 @@
1
+ export * from './BuildBannerResponse';
2
+ export * from './BuildNativeResponse';
3
+ export * from './ClickthroughHelpers';
4
+ export * from './VastHelpers';
@@ -0,0 +1,19 @@
1
+ import { type IBidderService, type IConfigurationService, type IDeviceService, type IEventService, type IGeoService, type IProductFeedService, type IRecommenderService, type IUserIDService } from './services';
2
+ export * from './models';
3
+ export * from './services';
4
+ export * from './errors';
5
+ export * from './constant-values';
6
+ export * from './helpers';
7
+ export * from './utils';
8
+ export * from './middleware';
9
+ export interface ISurfsideCoreAPI {
10
+ bidder: IBidderService;
11
+ config: IConfigurationService;
12
+ geo: IGeoService;
13
+ productFeed: IProductFeedService;
14
+ userId: IUserIDService;
15
+ recommender: IRecommenderService;
16
+ events: IEventService;
17
+ device: IDeviceService;
18
+ }
19
+ export declare function initSurfsideCore(): ISurfsideCoreAPI;
@@ -0,0 +1,3 @@
1
+ import type { IBidRequest } from '../models';
2
+ import type { IDeviceService, ILoggerService } from '../services';
3
+ export declare function DeviceMiddleware(logger: ILoggerService | undefined, deviceService: IDeviceService | undefined, request: IBidRequest): Promise<IBidRequest>;
@@ -0,0 +1,3 @@
1
+ import type { IBidRequest } from '../models';
2
+ import type { IGeoService, ILoggerService } from '../services';
3
+ export declare function GeoMiddlewareImmediate(geoService: IGeoService, logger: ILoggerService | undefined, request: IBidRequest, geoTargetingEnabled: boolean, ipTargetingEnabled: boolean): Promise<IBidRequest>;
@@ -0,0 +1,4 @@
1
+ import { type IBidRequest } from '../models';
2
+ import type { ILoggerService, IUserIDService } from '../services';
3
+ export declare function IdentityMiddleware(userIDService: IUserIDService, logger: ILoggerService | undefined, request: IBidRequest): Promise<IBidRequest>;
4
+ export declare const buildIdentityMiddleware: (userIdService: IUserIDService, logger: ILoggerService | undefined) => (request: IBidRequest) => Promise<IBidRequest>;
@@ -0,0 +1,3 @@
1
+ export * from './GeoMiddleware';
2
+ export * from './DeviceMiddleware';
3
+ export * from './IdentityMiddleware';
@@ -0,0 +1,4 @@
1
+ export * from './rtb';
2
+ export * from './retail';
3
+ export * from './vast';
4
+ export * from './tracking';
@@ -0,0 +1,37 @@
1
+ export interface IProductInformation {
2
+ image: string | null;
3
+ price: string | null;
4
+ salePrice: string | null;
5
+ thc: string | null;
6
+ strain: string | null;
7
+ cbd: string | null;
8
+ name: string | null;
9
+ brand_name: string | null;
10
+ brandName: string | null;
11
+ productType: string | null;
12
+ details: string | null;
13
+ cta: string | null;
14
+ clickthroughUrl: string | null;
15
+ winUrl: string | null;
16
+ pixelUrl: string | null;
17
+ ext?: any;
18
+ }
19
+ export declare class DefaultProductInformation implements IProductInformation {
20
+ image: string | null;
21
+ price: string | null;
22
+ salePrice: string | null;
23
+ thc: string | null;
24
+ strain: string | null;
25
+ cbd: string | null;
26
+ name: string | null;
27
+ brand_name: string | null;
28
+ brandName: string | null;
29
+ productType: string | null;
30
+ details: string | null;
31
+ cta: string | null;
32
+ clickthroughUrl: string | null;
33
+ winUrl: string | null;
34
+ pixelUrl: string | null;
35
+ ext?: any;
36
+ constructor();
37
+ }
@@ -0,0 +1,64 @@
1
+ import type { IProductInformation } from '../../models';
2
+ import type Handlebars from 'handlebars/runtime';
3
+ export type ProductCallback = (e: Event, product: IProductInformation) => void;
4
+ export interface ICallbacks extends Record<string, ProductCallback> {
5
+ }
6
+ export interface INativeTemplateDelegateWindow {
7
+ origin: string;
8
+ port: string;
9
+ path: string;
10
+ host: string;
11
+ host_name: string;
12
+ search: string;
13
+ hash: string;
14
+ protocol: string;
15
+ }
16
+ export interface IPublisherConfiguration {
17
+ geoTargeting?: boolean;
18
+ ipTargeting?: boolean;
19
+ clickThroughUrlTemplate?: string;
20
+ productCardTemplate?: string;
21
+ productCardStyleSheet?: string;
22
+ carouselStyleSheet?: string;
23
+ reAuctionEnabled?: boolean;
24
+ reAuctionInterval?: number;
25
+ }
26
+ export interface ICompiledPublisherConfigurationTemplatesDTO {
27
+ productCardTemplate: string;
28
+ productCardStylesheet: string;
29
+ clickThroughUrlTemplate: string;
30
+ carouselStylesheet: string;
31
+ javascriptCallbacks: string;
32
+ }
33
+ export interface IProductContext {
34
+ product: Partial<IProductInformation>;
35
+ window: INativeTemplateDelegateWindow;
36
+ publisher: ICompiledPublisherConfiguration;
37
+ catalog: IProductInformation;
38
+ clickthrough?: string;
39
+ ext: any;
40
+ }
41
+ export interface ICompiledPublisherConfigurationTemplates {
42
+ productCardTemplate: Handlebars.TemplateDelegate<IProductContext>;
43
+ clickThroughUrlTemplate: Handlebars.TemplateDelegate<IProductContext>;
44
+ productCardStylesheet: string;
45
+ carouselStylesheet: string;
46
+ javascriptCallbacks: ICallbacks;
47
+ }
48
+ export interface ICompiledPublisherConfigurationSettingsDTO {
49
+ commerceMediaEnabled: boolean;
50
+ ipTargetingEnabled: boolean;
51
+ geoTargetingEnabled: boolean;
52
+ reauctionEnabled: boolean;
53
+ reauctionIntervalMs: number;
54
+ productFeedEnabled: boolean;
55
+ sponsoredByEnabled?: boolean;
56
+ }
57
+ export interface ICompiledPublisherConfigurationDTO {
58
+ templates: ICompiledPublisherConfigurationTemplatesDTO;
59
+ settings: ICompiledPublisherConfigurationSettingsDTO;
60
+ }
61
+ export interface ICompiledPublisherConfiguration {
62
+ settings: ICompiledPublisherConfigurationSettingsDTO;
63
+ templates: ICompiledPublisherConfigurationTemplates;
64
+ }
@@ -0,0 +1,10 @@
1
+ export interface IRecommendedProduct {
2
+ item_id: string;
3
+ rating?: number;
4
+ }
5
+ export interface IRecommenderResponse {
6
+ id: string;
7
+ error?: string;
8
+ locationId: string;
9
+ recommendations: IRecommendedProduct[];
10
+ }
@@ -0,0 +1,3 @@
1
+ export * from './IPublisherConfiguration';
2
+ export type { IProductInformation } from './IProductInformation';
3
+ export type { IRecommenderResponse, IRecommendedProduct } from './IRecommenderResponse';
@@ -0,0 +1,399 @@
1
+ export interface IBrandVersion {
2
+ brand: string;
3
+ version?: string[];
4
+ ext?: any;
5
+ }
6
+ export interface IUserAgent {
7
+ browsers?: IBrandVersion[];
8
+ platform?: IBrandVersion;
9
+ mobile?: number;
10
+ architecture?: string;
11
+ bitness?: string;
12
+ model?: string;
13
+ source?: number;
14
+ ext?: any;
15
+ }
16
+ export declare enum AgentTypes {
17
+ SESSION = 1,
18
+ DEVICE = 2,
19
+ USER = 3
20
+ }
21
+ export interface IUid {
22
+ id: string;
23
+ atype?: AgentTypes;
24
+ ext?: any;
25
+ }
26
+ export interface IEid {
27
+ source: string;
28
+ uids: IUid[];
29
+ ext?: any;
30
+ }
31
+ export interface ISupplyChainNode {
32
+ asi?: string;
33
+ sid?: string;
34
+ hp?: number;
35
+ rid?: string;
36
+ name?: string;
37
+ domain?: string;
38
+ ext?: any;
39
+ }
40
+ export interface ISupplyChain {
41
+ complete: number;
42
+ nodes: ISupplyChainNode[];
43
+ ver: string;
44
+ ext?: any;
45
+ }
46
+ export interface IChannel {
47
+ id?: string;
48
+ name?: string;
49
+ domain?: string;
50
+ ext?: any;
51
+ }
52
+ export interface INetwork {
53
+ id?: string;
54
+ name?: string;
55
+ domain?: string;
56
+ ext?: any;
57
+ }
58
+ export interface ISegment {
59
+ id?: string;
60
+ name?: string;
61
+ value?: string;
62
+ ext?: any;
63
+ }
64
+ export interface IData {
65
+ id?: string;
66
+ name?: string;
67
+ segment?: ISegment[];
68
+ ext?: any;
69
+ }
70
+ export interface IUser {
71
+ id?: string;
72
+ buyeruid?: string;
73
+ yob?: number;
74
+ gender?: string;
75
+ keywords?: string;
76
+ kwarray?: string[];
77
+ customdata?: string;
78
+ geo?: IGeo;
79
+ data?: IData[];
80
+ cconsent?: string;
81
+ eids?: IEid[];
82
+ ext?: any;
83
+ }
84
+ export interface IGeo {
85
+ lat?: number;
86
+ lon?: number;
87
+ type?: number;
88
+ accuracy?: number;
89
+ lastfix?: number;
90
+ ipservice?: number;
91
+ country?: string;
92
+ region?: string;
93
+ regionfips104?: string;
94
+ metro?: string;
95
+ city?: string;
96
+ zip?: string;
97
+ utcoffset?: number;
98
+ ext?: any;
99
+ }
100
+ export declare enum AdCom10DeviceTypes {
101
+ MOBILE = 1,
102
+ PC = 2,
103
+ CTV = 3,
104
+ PHONE = 4,
105
+ TABLET = 5,
106
+ CONNECTED = 6,
107
+ SET_TOP = 7,
108
+ OOH = 8
109
+ }
110
+ export interface IDevice {
111
+ ua?: string;
112
+ geo?: IGeo;
113
+ dnt?: number;
114
+ lmt?: number;
115
+ ip?: string;
116
+ ipv6?: string;
117
+ devicetype?: number;
118
+ make?: string;
119
+ model?: string;
120
+ os?: string;
121
+ osv?: string;
122
+ hwv?: string;
123
+ h?: number;
124
+ w?: number;
125
+ ppi?: number;
126
+ pxratio?: number;
127
+ js?: number;
128
+ geofetch?: number;
129
+ flashver?: string;
130
+ language?: string;
131
+ lanbg?: string;
132
+ carrier?: string;
133
+ mccmnc?: string;
134
+ connectiontype?: number;
135
+ ifa?: string;
136
+ didsha1?: string;
137
+ didmd5?: string;
138
+ dpidsha1?: string;
139
+ dpidmd5?: string;
140
+ macsha1?: string;
141
+ macmd5?: string;
142
+ ext?: any;
143
+ sua?: IUserAgent;
144
+ }
145
+ export interface IProducer {
146
+ id?: string;
147
+ name?: string;
148
+ cattax?: number[];
149
+ cat?: string[];
150
+ domain?: string;
151
+ ext?: any;
152
+ }
153
+ export interface IContent {
154
+ id?: string;
155
+ episode?: number;
156
+ title?: string;
157
+ series?: string;
158
+ season?: string;
159
+ artist?: string;
160
+ genre?: string;
161
+ album?: string;
162
+ isrc?: string;
163
+ producer?: IProducer;
164
+ url?: string;
165
+ cattax?: number[];
166
+ cat?: string[];
167
+ prodq?: number;
168
+ videoquality?: number;
169
+ context?: number;
170
+ contentrating?: string;
171
+ userrating?: string;
172
+ qagmediarating?: number;
173
+ keywords?: string;
174
+ kwarray?: string[];
175
+ livestream?: number;
176
+ sourcerelationship?: number;
177
+ len?: number;
178
+ language?: string;
179
+ langb?: string;
180
+ embeddable?: number;
181
+ data?: IData[];
182
+ network?: INetwork;
183
+ channel?: IChannel;
184
+ ext?: any;
185
+ }
186
+ export interface IPublisher {
187
+ id?: string;
188
+ name?: string;
189
+ cattax?: number[];
190
+ cat?: string[];
191
+ domain?: string;
192
+ ext?: any;
193
+ }
194
+ export interface IApp {
195
+ id?: string;
196
+ name?: string;
197
+ bundle?: string;
198
+ domain?: string;
199
+ storeurl?: string;
200
+ cat?: string[];
201
+ sectioncat?: string[];
202
+ pagecat?: string[];
203
+ ver?: string;
204
+ privacypolicy?: number;
205
+ paid?: number;
206
+ publisher?: IPublisher;
207
+ content?: IContent;
208
+ keywords?: string;
209
+ kwarray?: string[];
210
+ ext?: any;
211
+ }
212
+ export interface ISite {
213
+ id?: string;
214
+ name?: string;
215
+ domain?: string;
216
+ cat?: string[];
217
+ sectioncat?: string[];
218
+ pagecat?: string[];
219
+ page?: string;
220
+ ref?: string;
221
+ search?: string;
222
+ mobile?: number;
223
+ privacypolicy?: number;
224
+ publisher?: IPublisher;
225
+ content?: IContent;
226
+ keywords?: string;
227
+ kwarray?: string[];
228
+ ext?: any;
229
+ }
230
+ export interface IDeal {
231
+ id: string;
232
+ bidfloor: number;
233
+ bidfloorcur?: string;
234
+ at?: number;
235
+ wseat?: string[];
236
+ wadomain?: string[];
237
+ ext?: any;
238
+ }
239
+ export interface IPmp {
240
+ private_auction?: number;
241
+ deals?: IDeal[];
242
+ ext?: any;
243
+ }
244
+ export interface IFormat {
245
+ w?: number;
246
+ h?: number;
247
+ wratio?: number;
248
+ hratio?: number;
249
+ wmin?: number;
250
+ ext?: any;
251
+ }
252
+ export interface INative {
253
+ request: string;
254
+ ver?: string;
255
+ api?: number[];
256
+ battr?: number[];
257
+ ext?: any;
258
+ }
259
+ export interface IAudio {
260
+ mimes: string[];
261
+ minduration?: number;
262
+ maxduration?: number;
263
+ poddur?: number;
264
+ protocols?: number[];
265
+ startdelay?: number;
266
+ rqddurs?: number[];
267
+ podid?: string;
268
+ podseq?: number;
269
+ sequence?: number;
270
+ slotinpod?: number;
271
+ mincpmpersec?: number;
272
+ battr?: number[];
273
+ maxextended?: number;
274
+ minbitrate?: number;
275
+ maxbitrate?: number;
276
+ delivery?: number[];
277
+ companionad?: IBanner[];
278
+ api?: number[];
279
+ companiontype?: number[];
280
+ maxseq?: number;
281
+ feed?: number;
282
+ stitched?: number;
283
+ nvol?: number;
284
+ ext?: any;
285
+ }
286
+ export interface IVideo {
287
+ mimes: string[];
288
+ minduration?: number;
289
+ maxduration?: number;
290
+ startdelay?: number;
291
+ maxseq?: number;
292
+ poddur?: number;
293
+ protocols?: number[];
294
+ w?: number;
295
+ h?: number;
296
+ podid?: string;
297
+ podseq?: number;
298
+ rqddurs?: number[];
299
+ placement?: number;
300
+ linearity?: number;
301
+ skip?: number;
302
+ skipmin?: number;
303
+ skipafter?: number;
304
+ sequence?: number;
305
+ slotinpod?: number;
306
+ mincpmpersec?: number;
307
+ battr?: number[];
308
+ maxextended?: number;
309
+ minbitrate?: number;
310
+ maxbitrate?: number;
311
+ boxingallowed?: number;
312
+ playbackmethod?: number[];
313
+ playbackend?: number;
314
+ delivery?: number[];
315
+ pos?: number;
316
+ companionad?: IBanner[];
317
+ api?: number[];
318
+ companiontype?: number[];
319
+ ext?: any;
320
+ }
321
+ export interface IBanner {
322
+ format?: IFormat[];
323
+ w?: number;
324
+ h?: number;
325
+ btype?: number[];
326
+ battr?: number[];
327
+ pos?: number;
328
+ mimes?: string[];
329
+ topframe?: number;
330
+ expdir?: number[];
331
+ api?: number[];
332
+ id?: string;
333
+ ext?: any;
334
+ }
335
+ export interface IMetric {
336
+ type: string;
337
+ value: number;
338
+ vendor?: string;
339
+ ext?: any;
340
+ }
341
+ export interface IImp {
342
+ id: string;
343
+ metric?: IMetric[];
344
+ banner?: IBanner;
345
+ video?: IVideo;
346
+ audio?: IAudio;
347
+ native?: INative;
348
+ pmp?: IPmp;
349
+ displaymanager?: string;
350
+ displaymanagerver?: string;
351
+ instl?: number;
352
+ tagid?: string;
353
+ bidfloor?: number;
354
+ bidfloorcur?: string;
355
+ clickbrowser?: number;
356
+ secure?: number;
357
+ iframebuster?: string[];
358
+ rwdd?: number;
359
+ ssai?: number;
360
+ exp?: number;
361
+ ext?: any;
362
+ }
363
+ export interface IRegs {
364
+ coppa?: number;
365
+ ext?: any;
366
+ gdpr?: number;
367
+ us_privacy?: string;
368
+ }
369
+ export interface ISource {
370
+ fd?: number;
371
+ tid?: string;
372
+ pchain?: string;
373
+ schain?: ISupplyChain;
374
+ ext?: any;
375
+ }
376
+ export interface IBidRequest {
377
+ id: string;
378
+ imp: IImp[];
379
+ site?: ISite;
380
+ app?: IApp;
381
+ device?: IDevice;
382
+ user?: IUser;
383
+ test?: number;
384
+ at?: number;
385
+ tmax?: number;
386
+ wseat?: string[];
387
+ bseat?: string[];
388
+ allimps?: number;
389
+ cur?: string[];
390
+ wlang?: string[];
391
+ wlangb?: string[];
392
+ bcat?: string[];
393
+ cattax?: number[];
394
+ badv?: string[];
395
+ bapp?: string[];
396
+ source?: ISource;
397
+ regs?: IRegs;
398
+ ext?: any;
399
+ }
@@ -0,0 +1,47 @@
1
+ export interface IBid {
2
+ id: string;
3
+ impid: string;
4
+ price: number;
5
+ nurl?: string;
6
+ burl?: string;
7
+ lurl?: string;
8
+ adm?: string;
9
+ adid?: string;
10
+ adomain?: string[];
11
+ bundle?: string;
12
+ iurl?: string;
13
+ cid?: string;
14
+ crid?: string;
15
+ tactic?: string;
16
+ cattax?: number;
17
+ cat?: string[];
18
+ attr?: number[];
19
+ api?: number;
20
+ protocol?: number;
21
+ qagmediarating?: number;
22
+ language?: string;
23
+ dealid?: string;
24
+ w?: number;
25
+ h?: number;
26
+ wratio?: number;
27
+ hratio?: number;
28
+ exp?: number;
29
+ ext?: any;
30
+ dur?: number;
31
+ mtype?: number;
32
+ slotinpid?: number;
33
+ }
34
+ export interface ISeatBid {
35
+ bid: IBid[];
36
+ seat?: string;
37
+ group?: number;
38
+ ext?: any;
39
+ }
40
+ export interface IBidResponse {
41
+ id: string;
42
+ seatbid?: ISeatBid[];
43
+ bidid?: string;
44
+ cur?: string;
45
+ nbr?: number;
46
+ ext?: any;
47
+ }
@@ -0,0 +1,3 @@
1
+ export * from './IBidResponse';
2
+ export * from './IBidRequest';
3
+ export * from './native';
@@ -0,0 +1,60 @@
1
+ export declare enum CreativeType {
2
+ BANNER = 0,
3
+ INLINE = 1,
4
+ PRODUCT_CARD = 2,
5
+ PRODUCT_CAROUSEL = 3,
6
+ VIDEO = 4
7
+ }
8
+ export declare enum NativePosition {
9
+ UNKNOWN = 0,
10
+ ABOVE_THE_FOLD = 1,
11
+ BELOW_THE_FOLD = 3,
12
+ HEADER = 4,
13
+ FOOTER = 5,
14
+ SIDEBAR = 6,
15
+ FULL_SCREN = 7
16
+ }
17
+ export declare enum NativeImageTypes {
18
+ ICON = 1,
19
+ MAIN = 3
20
+ }
21
+ export declare enum NativeDataTypes {
22
+ SPONSORED = 1,
23
+ DESC = 2,
24
+ RATING = 3,
25
+ LIKES = 4,
26
+ DOWNLOADS = 5,
27
+ PRICE = 6,
28
+ SALEPRICE = 7,
29
+ PHONE = 8,
30
+ ADDRESS = 9,
31
+ DESC2 = 10,
32
+ DISPLAYURL = 11,
33
+ CTATEXT = 12,
34
+ SURF_STRAIN = 500,
35
+ SURF_THC = 501,
36
+ SURF_CBD = 502,
37
+ SURF_CATEGORY = 503
38
+ }
39
+ export declare enum NativeAssetId {
40
+ TITLE = 0,
41
+ IMAGE = 1,
42
+ SPONSORED = 2,
43
+ DESC = 3,
44
+ RATING = 4,
45
+ PRICE = 5,
46
+ SALEPRICE = 6,
47
+ DISPLAYURL = 7,
48
+ CTATEXT = 8,
49
+ SURF_CATEGORY = 9,
50
+ SURF_THC = 10,
51
+ SURF_CBD = 11,
52
+ SURF_STRAIN = 12
53
+ }
54
+ export interface INativeDataAsset {
55
+ id: number;
56
+ required: 0 | 1;
57
+ data: {
58
+ type: number;
59
+ };
60
+ }