@schibsted/advertory 2.71.17 → 2.72.0

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 (125) hide show
  1. package/core/aftenposten/es/index.css +1 -1
  2. package/core/aftenposten/es/index.d.ts +3 -1
  3. package/core/aftenposten/es/index.js +1 -1
  4. package/core/aftenposten/index.d.ts +3 -1
  5. package/core/aftenposten/index.js +1 -1
  6. package/core/aftenpostenv2/es/index.css +1 -1
  7. package/core/aftenpostenv2/es/index.d.ts +3 -1
  8. package/core/aftenpostenv2/es/index.js +1 -1
  9. package/core/aftonbladet/es/index.css +1 -1
  10. package/core/aftonbladet/es/index.d.ts +3 -1
  11. package/core/aftonbladet/es/index.js +1 -1
  12. package/core/aftonbladet/index.d.ts +3 -1
  13. package/core/aftonbladet/index.js +1 -1
  14. package/core/aftonbladetv2/es/index.css +1 -1
  15. package/core/aftonbladetv2/es/index.d.ts +3 -1
  16. package/core/aftonbladetv2/es/index.js +1 -1
  17. package/core/bt/es/index.css +1 -1
  18. package/core/bt/es/index.d.ts +3 -1
  19. package/core/bt/es/index.js +1 -1
  20. package/core/bt/index.d.ts +3 -1
  21. package/core/bt/index.js +1 -1
  22. package/core/btv2/es/index.css +1 -1
  23. package/core/btv2/es/index.d.ts +3 -1
  24. package/core/btv2/es/index.js +1 -1
  25. package/core/e24/es/index.css +1 -1
  26. package/core/e24/es/index.d.ts +3 -1
  27. package/core/e24/es/index.js +1 -1
  28. package/core/e24/index.d.ts +3 -1
  29. package/core/e24/index.js +1 -1
  30. package/core/fotbollskanalen/es/index.css +1 -1
  31. package/core/fotbollskanalen/es/index.d.ts +3 -1
  32. package/core/fotbollskanalen/es/index.js +1 -1
  33. package/core/fotbollskanalen/index.d.ts +3 -1
  34. package/core/fotbollskanalen/index.js +1 -1
  35. package/core/godare/index.d.ts +3 -1
  36. package/core/godare/index.js +1 -1
  37. package/core/godt/index.d.ts +3 -1
  38. package/core/godt/index.js +1 -1
  39. package/core/klart/index.d.ts +3 -1
  40. package/core/klart/index.js +1 -1
  41. package/core/koket/es/index.css +1 -1
  42. package/core/koket/es/index.d.ts +3 -1
  43. package/core/koket/es/index.js +1 -1
  44. package/core/koket/index.d.ts +3 -1
  45. package/core/koket/index.js +1 -1
  46. package/core/kompakt/index.d.ts +3 -1
  47. package/core/kompakt/index.js +1 -1
  48. package/core/minmote/index.d.ts +3 -1
  49. package/core/minmote/index.js +1 -1
  50. package/core/pent/index.d.ts +3 -1
  51. package/core/pent/index.js +1 -1
  52. package/core/sa/es/index.css +1 -1
  53. package/core/sa/es/index.d.ts +3 -1
  54. package/core/sa/es/index.js +1 -1
  55. package/core/sa/index.d.ts +3 -1
  56. package/core/sa/index.js +1 -1
  57. package/core/sav2/es/index.css +1 -1
  58. package/core/sav2/es/index.d.ts +3 -1
  59. package/core/sav2/es/index.js +1 -1
  60. package/core/svd/es/index.css +1 -1
  61. package/core/svd/es/index.d.ts +3 -1
  62. package/core/svd/es/index.js +1 -1
  63. package/core/svd/index.d.ts +3 -1
  64. package/core/svd/index.js +1 -1
  65. package/core/svdv2/es/index.css +1 -1
  66. package/core/svdv2/es/index.d.ts +3 -1
  67. package/core/svdv2/es/index.js +1 -1
  68. package/core/tek/index.d.ts +3 -1
  69. package/core/tek/index.js +1 -1
  70. package/core/tv4/es/index.d.ts +3 -1
  71. package/core/tv4/es/index.js +1 -1
  72. package/core/tv4/index.d.ts +3 -1
  73. package/core/tv4/index.js +1 -1
  74. package/core/tvnu/index.d.ts +3 -1
  75. package/core/tvnu/index.js +1 -1
  76. package/core/vg/es/index.css +1 -1
  77. package/core/vg/es/index.d.ts +3 -1
  78. package/core/vg/es/index.js +1 -1
  79. package/core/vg/index.d.ts +3 -1
  80. package/core/vg/index.js +1 -1
  81. package/core/vgv2/es/index.css +1 -1
  82. package/core/vgv2/es/index.d.ts +3 -1
  83. package/core/vgv2/es/index.js +1 -1
  84. package/features/ad-native/index.d.ts +2 -0
  85. package/features/ad-native/index.js +1 -1
  86. package/features/dr-edition/es/index.d.ts +2 -0
  87. package/features/dr-edition/index.d.ts +2 -0
  88. package/features/kilkaya/es/index.d.ts +2 -0
  89. package/features/kilkaya/index.d.ts +2 -0
  90. package/features/tracker/index.d.ts +4 -1
  91. package/features/tracker/index.js +1 -1
  92. package/package.json +1 -1
  93. package/sites/aftenposten/es/index.css +1 -1
  94. package/sites/aftenpostenv2/es/index.css +1 -1
  95. package/sites/aftonbladet/es/index.css +1 -1
  96. package/sites/aftonbladetv2/es/index.css +1 -1
  97. package/sites/bt/es/index.css +1 -1
  98. package/sites/btv2/es/index.css +1 -1
  99. package/sites/e24/es/index.css +1 -1
  100. package/sites/fotbollskanalen/es/index.css +1 -1
  101. package/sites/koket/es/index.css +1 -1
  102. package/sites/sa/es/index.css +1 -1
  103. package/sites/sav2/es/index.css +1 -1
  104. package/sites/svd/es/index.css +1 -1
  105. package/sites/svdv2/es/index.css +1 -1
  106. package/sites/vg/es/index.css +1 -1
  107. package/sites/vgv2/es/index.css +1 -1
  108. package/types/core/interface/ast.d.ts +1 -1
  109. package/types/core/interface/config.d.ts +2 -0
  110. package/types/features/ad-native/trackers/trackers.d.ts +1 -1
  111. package/types/features/ad-server-side/banner-object.d.ts +4 -0
  112. package/types/features/ad-server-side/banner-object.test.d.ts +1 -0
  113. package/types/features/ad-server-side/cogwheel.d.ts +3 -0
  114. package/types/features/ad-server-side/constants.d.ts +2 -0
  115. package/types/features/ad-server-side/index.d.ts +5 -0
  116. package/types/features/ad-server-side/keywords.d.ts +3 -0
  117. package/types/features/ad-server-side/keywords.test.d.ts +1 -0
  118. package/types/features/ad-server-side/native-request.d.ts +42 -0
  119. package/types/features/ad-server-side/native-request.test.d.ts +1 -0
  120. package/types/features/ad-server-side/server-side-xandr-renderer.d.ts +3 -0
  121. package/types/features/ad-server-side/server-side-xandr-service.d.ts +7 -0
  122. package/types/features/cogwheel/index.d.ts +1 -1
  123. package/types/features/interface/ad-native.d.ts +1 -0
  124. package/types/features/interface/ad-server-side.d.ts +48 -0
  125. package/types/features/tracker/index.d.ts +3 -2
@@ -292,7 +292,7 @@ export interface AstApnTagRequests {
292
292
  banner: AstBanner;
293
293
  native: AstNative;
294
294
  };
295
- creative_id?: string;
295
+ creative_id?: number;
296
296
  }>;
297
297
  };
298
298
  uuid?: string;
@@ -96,6 +96,8 @@ export interface Placement {
96
96
  drEdition?: DrEditionPlacementConfig;
97
97
  isBackfill?: boolean;
98
98
  takeoverCookieCapForSharedPlacement?: boolean;
99
+ serverSidePlacement?: boolean;
100
+ xandrPlacementId?: number;
99
101
  supportsNonRTB?: boolean;
100
102
  }
101
103
  export interface Placements {
@@ -1,5 +1,5 @@
1
1
  import { AstAdObj } from 'core/interface/ast';
2
2
  import { Options } from 'features/interface/ad-native';
3
3
  declare const addTracking: (adObj: AstAdObj, options: Options) => void;
4
- declare const addClickTrackers: (adObj: AstAdObj) => void;
4
+ declare const addClickTrackers: (adObj: AstAdObj, options?: Options) => void;
5
5
  export { addTracking, addClickTrackers };
@@ -0,0 +1,4 @@
1
+ import { Placement } from 'core/interface/config';
2
+ import { BannerObject } from 'features/interface/ad-server-side';
3
+ declare const buildBannerObject: (placement: Placement) => BannerObject | undefined;
4
+ export { buildBannerObject };
@@ -0,0 +1,3 @@
1
+ import { XandrResponse } from 'features/interface/ad-server-side';
2
+ declare const appendCogwheelToContainer: (placementId: string, invCode: string, container: HTMLElement, bid: XandrResponse["bid"]) => void;
3
+ export { appendCogwheelToContainer };
@@ -0,0 +1,2 @@
1
+ declare const XANDR_BASE_URL = "https://dr-edition-teaser-server.inventory.schibsted.io/xandr";
2
+ export { XANDR_BASE_URL };
@@ -0,0 +1,5 @@
1
+ import { Placement, SiteConfig } from 'core/interface/config';
2
+ import { PlacementSplit } from 'features/interface/ad-server-side';
3
+ declare const splitPlacements: (placements: Array<Placement>) => PlacementSplit;
4
+ declare const handleServerSideAds: (placements: Array<Placement>, siteConfig: SiteConfig) => void;
5
+ export { splitPlacements, handleServerSideAds };
@@ -0,0 +1,3 @@
1
+ import { AstKeywords } from 'core/interface/ast';
2
+ declare const astKeywordsToString: (keywords: AstKeywords) => string;
3
+ export { astKeywordsToString };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,42 @@
1
+ import { Placement } from 'core/interface/config';
2
+ import { NativeObject } from 'features/interface/ad-server-side';
3
+ declare const nativeRequest: {
4
+ plcmtcnt: number;
5
+ context: number;
6
+ contextsubtype: number;
7
+ plcmttype: number;
8
+ assets: ({
9
+ id: number;
10
+ title: {
11
+ len: number;
12
+ };
13
+ required: number;
14
+ img?: undefined;
15
+ data?: undefined;
16
+ } | {
17
+ id: number;
18
+ img: {
19
+ type: number;
20
+ hmin: number;
21
+ wmin: number;
22
+ };
23
+ required: number;
24
+ title?: undefined;
25
+ data?: undefined;
26
+ } | {
27
+ id: number;
28
+ data: {
29
+ type: number;
30
+ };
31
+ required: number;
32
+ title?: undefined;
33
+ img?: undefined;
34
+ })[];
35
+ ver: string;
36
+ eventtrackers: {
37
+ event: number;
38
+ methods: number[];
39
+ }[];
40
+ };
41
+ declare const buildNativeRequest: (placement: Placement) => NativeObject | undefined;
42
+ export { nativeRequest, buildNativeRequest };
@@ -0,0 +1,3 @@
1
+ import { XandrResponse } from 'features/interface/ad-server-side';
2
+ import { DeviceType } from 'core/interface/device';
3
+ export declare const renderServerSideXandrAd: (container: HTMLElement, response: XandrResponse, device: DeviceType) => void;
@@ -0,0 +1,7 @@
1
+ import { XandrResponse } from 'features/interface/ad-server-side';
2
+ import { Placement, SiteConfig } from 'core/interface/config';
3
+ import { AstKeywords } from 'core/interface/ast';
4
+ export declare class ServerSideXandrService {
5
+ private buildFetchObject;
6
+ fetchData(placement: Placement, pageKeywords: AstKeywords, tagKeywords: AstKeywords, siteConfig: SiteConfig): Promise<XandrResponse | null>;
7
+ }
@@ -1,3 +1,3 @@
1
1
  declare const loadCogwheelButton: (targetId: string) => void;
2
- declare const appendCogwheelButton: (targetId: string, element: HTMLElement, creativeId?: string) => void;
2
+ declare const appendCogwheelButton: (targetId: string, element: HTMLElement, creativeId: number) => void;
3
3
  export { loadCogwheelButton, appendCogwheelButton };
@@ -41,6 +41,7 @@ export interface Options {
41
41
  nativeTrackingConfig?: NativeTrackingConfig;
42
42
  adPlacementFormat?: string;
43
43
  productTag?: string;
44
+ clickLinkSelector?: string;
44
45
  }
45
46
  export interface BrandStudioClassicFormatProps {
46
47
  descriptionClassName: string;
@@ -0,0 +1,48 @@
1
+ import { Placement } from 'core/interface/config';
2
+ export interface NativeObject {
3
+ request: string;
4
+ ver: string;
5
+ }
6
+ export interface BannerObject {
7
+ format: Array<{
8
+ w: number;
9
+ h: number;
10
+ }>;
11
+ w: number;
12
+ h: number;
13
+ }
14
+ export interface XandrResponse {
15
+ desktopHTML: string;
16
+ mobileHTML: string;
17
+ adType: BidAdType;
18
+ impTrackers?: Array<string>;
19
+ clickTrackers?: Array<string>;
20
+ bid: {
21
+ adid?: string;
22
+ w: number;
23
+ h: number;
24
+ };
25
+ }
26
+ export declare const BidAdTypes: {
27
+ readonly Banner: 0;
28
+ readonly Video: 1;
29
+ readonly Audio: 2;
30
+ readonly Native: 3;
31
+ };
32
+ export type BidAdType = (typeof BidAdTypes)[keyof typeof BidAdTypes];
33
+ export interface OpenRtbBidRequest {
34
+ id: string;
35
+ imp: Array<Record<string, unknown>>;
36
+ site: Record<string, unknown>;
37
+ device: Record<string, unknown>;
38
+ regs: Record<string, unknown>;
39
+ user: Record<string, unknown>;
40
+ at: number;
41
+ cur: Array<string | undefined>;
42
+ source: Record<string, unknown>;
43
+ ext: Record<string, unknown>;
44
+ }
45
+ export interface PlacementSplit {
46
+ clientSidePlacements: Array<Placement>;
47
+ serverSidePlacements: Array<Placement>;
48
+ }
@@ -1,5 +1,5 @@
1
1
  import { UserIdsObject, PPIDLoggedInStatusKeywords } from 'features/interface/tracker';
2
- import { RelevantYieldPPIDConfig } from 'features/interface/prebid';
2
+ import { RelevantYieldEids, RelevantYieldPPIDConfig } from 'features/interface/prebid';
3
3
  import { Country } from 'core/interface/countries';
4
4
  import { SiteConfig } from 'core/interface/config';
5
5
  declare const setXandrPPIDs: (siteConfig: SiteConfig) => Promise<void>;
@@ -7,6 +7,7 @@ declare const getUserIdsObject: (country: Country) => UserIdsObject;
7
7
  declare const getPPIDLoggedInStatus: () => PPIDLoggedInStatusKeywords;
8
8
  declare const getPPIDRelevantYieldConfig: (country: Country) => RelevantYieldPPIDConfig | object;
9
9
  declare const getPPIDNorstatString: (country: Country) => string;
10
+ declare const getOpenRtbEids: (country: Country) => Array<RelevantYieldEids>;
10
11
  declare const getVideoPPIDs: (country: Country) => Promise<string>;
11
12
  declare const getFinnBlinkUserId: () => Promise<string>;
12
- export { getPPIDRelevantYieldConfig, getPPIDLoggedInStatus, getUserIdsObject, setXandrPPIDs, getPPIDNorstatString, getVideoPPIDs, getFinnBlinkUserId };
13
+ export { getPPIDRelevantYieldConfig, getPPIDLoggedInStatus, getUserIdsObject, setXandrPPIDs, getPPIDNorstatString, getVideoPPIDs, getFinnBlinkUserId, getOpenRtbEids };