@schibsted/advertory 2.69.0 → 2.70.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 (99) hide show
  1. package/core/aftenposten/es/index.css +1 -1
  2. package/core/aftenposten/es/index.js +1 -1
  3. package/core/aftenposten/index.js +1 -1
  4. package/core/aftenpostenv2/es/index.css +1 -1
  5. package/core/aftenpostenv2/es/index.js +1 -1
  6. package/core/aftonbladet/es/index.css +1 -1
  7. package/core/aftonbladet/es/index.js +1 -1
  8. package/core/aftonbladet/index.js +1 -1
  9. package/core/aftonbladetv2/es/index.css +1 -1
  10. package/core/aftonbladetv2/es/index.d.ts +51 -1
  11. package/core/aftonbladetv2/es/index.js +1 -1
  12. package/core/bt/es/index.css +1 -1
  13. package/core/bt/es/index.js +1 -1
  14. package/core/bt/index.js +1 -1
  15. package/core/e24/es/index.css +1 -1
  16. package/core/e24/es/index.js +1 -1
  17. package/core/e24/index.js +1 -1
  18. package/core/fotbollskanalen/es/index.css +1 -1
  19. package/core/fotbollskanalen/es/index.js +1 -1
  20. package/core/fotbollskanalen/index.js +1 -1
  21. package/core/godare/index.js +1 -1
  22. package/core/godt/index.js +1 -1
  23. package/core/klart/index.js +1 -1
  24. package/core/koket/es/index.css +1 -1
  25. package/core/koket/es/index.js +1 -1
  26. package/core/koket/index.js +1 -1
  27. package/core/kompakt/index.js +1 -1
  28. package/core/minmote/index.js +1 -1
  29. package/core/pent/index.js +1 -1
  30. package/core/sa/es/index.css +1 -1
  31. package/core/sa/es/index.js +1 -1
  32. package/core/sa/index.js +1 -1
  33. package/core/sav2/es/index.css +1 -1
  34. package/core/sav2/es/index.js +1 -1
  35. package/core/svd/es/index.css +1 -1
  36. package/core/svd/es/index.js +1 -1
  37. package/core/svd/index.js +1 -1
  38. package/core/svdv2/es/index.css +1 -1
  39. package/core/svdv2/es/index.js +1 -1
  40. package/core/tek/index.js +1 -1
  41. package/core/tv4/es/index.css +1 -1
  42. package/core/tv4/es/index.js +1 -1
  43. package/core/tv4/index.js +1 -1
  44. package/core/tvnu/index.js +1 -1
  45. package/core/vg/es/index.css +1 -1
  46. package/core/vg/es/index.js +1 -1
  47. package/core/vg/index.js +1 -1
  48. package/core/vgv2/es/index.css +1 -1
  49. package/core/vgv2/es/index.js +1 -1
  50. package/features/glimr/index.js +1 -1
  51. package/features/video/index.js +1 -1
  52. package/package.json +1 -1
  53. package/sites/aftenposten/es/index.css +1 -1
  54. package/sites/aftenpostenv2/es/index.css +1 -1
  55. package/sites/aftonbladet/es/index.css +1 -1
  56. package/sites/aftonbladetv2/es/index.css +1 -1
  57. package/sites/bt/es/index.css +1 -1
  58. package/sites/e24/es/index.css +1 -1
  59. package/sites/fotbollskanalen/es/index.css +1 -1
  60. package/sites/sa/es/index.css +1 -1
  61. package/sites/sav2/es/index.css +1 -1
  62. package/sites/svd/es/index.css +1 -1
  63. package/sites/svdv2/es/index.css +1 -1
  64. package/sites/vg/es/index.css +1 -1
  65. package/sites/vgv2/es/index.css +1 -1
  66. package/types/config/aftonbladetv2.d.ts +2 -1
  67. package/types/core/handlers/country-prefix/index.d.ts +2 -2
  68. package/types/core/interface/device.d.ts +13 -0
  69. package/types/core/logger/index.d.ts +2 -1
  70. package/types/features/glimr/glimr-core-handler.d.ts +2 -1
  71. package/types/features/glimr/glimr-tag-filters.d.ts +2 -1
  72. package/types/features/glimr/glimr-tags-handler.d.ts +2 -1
  73. package/types/{core/handlers/user/index.d.ts → features/identity/user.d.ts} +2 -1
  74. package/types/features/interface/video.d.ts +97 -0
  75. package/types/features/video/aftonbladet.test.d.ts +1 -0
  76. package/types/features/video/aspect-ratios.d.ts +5 -0
  77. package/types/features/video/aspect-ratios.test.d.ts +1 -0
  78. package/types/features/video/builder.test.d.ts +1 -0
  79. package/types/features/video/config.d.ts +3 -0
  80. package/types/features/video/constants.d.ts +30 -0
  81. package/types/features/video/device.d.ts +5 -0
  82. package/types/features/video/filters.test.d.ts +1 -0
  83. package/types/features/video/index.d.ts +1 -0
  84. package/types/features/video/inv-code.d.ts +5 -0
  85. package/types/features/video/inv-code.test.d.ts +1 -0
  86. package/types/features/video/keywords/builder.d.ts +4 -0
  87. package/types/features/video/keywords/filters.d.ts +8 -0
  88. package/types/features/video/keywords/index.d.ts +2 -0
  89. package/types/features/video/playback.d.ts +3 -0
  90. package/types/features/video/playback.test.d.ts +1 -0
  91. package/types/features/video/pulse.d.ts +3 -0
  92. package/types/features/video/pulse.test.d.ts +1 -0
  93. package/types/features/video/registry.test.d.ts +1 -0
  94. package/types/features/video/sites/aftonbladet.d.ts +4 -0
  95. package/types/features/video/sites/index.d.ts +4 -0
  96. package/types/features/video/tags.d.ts +3 -0
  97. package/types/features/video/url.d.ts +5 -0
  98. package/types/features/video/url.test.d.ts +1 -0
  99. /package/types/{core/handlers/user/index.test.d.ts → features/identity/user.test.d.ts} +0 -0
@@ -1,4 +1,5 @@
1
1
  import { updateAdvertory } from 'core/handlers/ad-server';
2
2
  import { getVideoPPIDs } from '../features/tracker';
3
+ import { getAdsConfig } from '../features/video';
3
4
  declare const initAdvertoryPackage: (config: import("core/interface/config").SiteConfig) => Promise<void>;
4
- export { initAdvertoryPackage, updateAdvertory, getVideoPPIDs };
5
+ export { initAdvertoryPackage, updateAdvertory, getVideoPPIDs, getAdsConfig };
@@ -1,4 +1,4 @@
1
- import { CountryPrefix } from 'core/interface/countries';
2
- declare const getCountryPrefix: () => CountryPrefix;
1
+ import { CountryPrefix, Country } from 'core/interface/countries';
2
+ declare const getCountryPrefix: (country?: Country) => CountryPrefix;
3
3
  declare const getCountryCountPrefix: () => string;
4
4
  export { getCountryPrefix, getCountryCountPrefix };
@@ -11,3 +11,16 @@ export interface DeviceParams {
11
11
  isHybridApp: boolean;
12
12
  appMode: string;
13
13
  }
14
+ export declare const DevicesKeywordTypes: {
15
+ readonly DESKTOP: "web_desktop";
16
+ readonly MOBILE: "web_phone";
17
+ readonly TABLET: "web_tablet";
18
+ readonly APP: "app_phone";
19
+ };
20
+ export type DevicesKeywordType = (typeof DevicesKeywordTypes)[keyof typeof DevicesKeywordTypes];
21
+ export declare const DevicesCodes: {
22
+ readonly DESKTOP: "wde";
23
+ readonly MOBILE: "wph";
24
+ readonly TABLETE: "wtb";
25
+ readonly APP: "wph";
26
+ };
@@ -1,2 +1,3 @@
1
1
  declare const log: (message: string, params?: any) => void;
2
- export { log };
2
+ declare const warn: (message: string, params?: any) => void;
3
+ export { log, warn };
@@ -1,3 +1,4 @@
1
- declare const isGlimrConsentGiven: () => Promise<boolean>;
1
+ import { SiteConfig } from 'core/interface/config';
2
+ declare const isGlimrConsentGiven: (consentConfig?: Partial<SiteConfig>) => Promise<boolean>;
2
3
  declare const updateGlimr: () => Promise<void>;
3
4
  export { updateGlimr, isGlimrConsentGiven };
@@ -1,4 +1,5 @@
1
+ import { SiteConfig } from 'core/interface/config';
1
2
  declare const getWeatherGlimrTags: (glimrTags?: Array<string>) => Array<string>;
2
3
  declare const getGeofenceGlimrTags: (glimrTags?: Array<string>) => Array<string>;
3
- declare const getGeoGlimrTags: (glimrTags?: Array<string>, addPublisherToGeo?: boolean) => Array<string>;
4
+ declare const getGeoGlimrTags: (glimrTags?: Array<string>, customConfig?: Partial<SiteConfig>, addPublisherToGeo?: boolean) => Array<string>;
4
5
  export { getWeatherGlimrTags, getGeoGlimrTags, getGeofenceGlimrTags };
@@ -1,4 +1,5 @@
1
1
  import { NoGlimrKeywords, SeGlimrKeywords } from 'core/interface/keywords';
2
2
  import { GlimrKeywordsOptions } from 'features/interface/glimr';
3
- declare const getGlimrKeywords: (options?: GlimrKeywordsOptions) => Promise<NoGlimrKeywords | SeGlimrKeywords | object>;
3
+ import { SiteConfig } from 'core/interface/config';
4
+ declare const getGlimrKeywords: (customConfig: Partial<SiteConfig>, options?: GlimrKeywordsOptions) => Promise<NoGlimrKeywords | SeGlimrKeywords | object>;
4
5
  export { getGlimrKeywords };
@@ -1,4 +1,5 @@
1
+ import { SiteConfig } from 'core/interface/config';
1
2
  declare const getCookie: (cookieName: string) => string | null;
2
- declare const getAdUserId: () => Promise<string | undefined>;
3
+ declare const getAdUserId: (config: Partial<SiteConfig>) => Promise<string | undefined>;
3
4
  declare const getUserId: () => string | undefined;
4
5
  export { getUserId, getAdUserId, getCookie };
@@ -0,0 +1,97 @@
1
+ import { Country } from 'core/interface/countries';
2
+ import { DeviceType } from 'core/interface/device';
3
+ import { Keywords } from 'core/interface/ast';
4
+ import { TCFConfig, GlimrConfig } from 'core/interface/config';
5
+ export type ValidPlayerAspectRatios = '1-1' | '16-9' | '9-16' | 'responsive';
6
+ export type ValidInstreamAspectRatios = '1-1' | '16-9' | '9-16' | '3-4';
7
+ export type AdFormatKeywordCreator = (position: string) => string | undefined;
8
+ export type AdFormationInvCodeCreator = (position: string, isUserPresentOnFrontPage?: boolean) => string;
9
+ export interface BaseTag {
10
+ slug?: string;
11
+ enabled?: boolean;
12
+ id: string;
13
+ title: string;
14
+ metadata?: [{
15
+ url: string;
16
+ type: string;
17
+ }];
18
+ }
19
+ export interface Tag extends BaseTag {
20
+ type?: 'descriptor' | 'organization' | 'person' | 'place' | 'location' | 'event';
21
+ }
22
+ export interface VideoSection {
23
+ title: string;
24
+ id: string;
25
+ shortPath: string;
26
+ metadata: {
27
+ podcast_author?: string;
28
+ podcast_categoryTree?: string;
29
+ actingEditor?: string;
30
+ afp?: 'true';
31
+ sponsored?: 'true';
32
+ [property: string]: unknown;
33
+ };
34
+ parent: VideoSection;
35
+ }
36
+ export interface SiteVideoConfig {
37
+ publisher: string;
38
+ memberId: number;
39
+ sectionKeyword: string;
40
+ frontpageInvCodeTemplate: string;
41
+ additionalFilterKeys: Array<string>;
42
+ tcf: TCFConfig;
43
+ glimr: GlimrConfig;
44
+ country: Country;
45
+ }
46
+ export interface VideoAdParams {
47
+ invCode: string;
48
+ videoOverlayInvCode: string;
49
+ sections: string;
50
+ }
51
+ export interface GetVideoAdsKeywordsParams {
52
+ pageAdsKeywords?: Keywords;
53
+ tags: string;
54
+ sections: string;
55
+ isUserLoggedIn: boolean;
56
+ isUserPresentOnFrontPage: boolean;
57
+ isInitialVideo: boolean;
58
+ currentVideoId?: string;
59
+ instreamAspectRatio: number;
60
+ playerAspectRatio: number;
61
+ isApp: boolean;
62
+ isAndroidApp: boolean;
63
+ deviceType: DeviceType;
64
+ }
65
+ export type VideoParamsCreator = (section: VideoSection, isLiveStudio: boolean) => VideoAdParams | null;
66
+ export interface ViewportInfo {
67
+ height: number;
68
+ width: number;
69
+ }
70
+ export interface VideoAdsConfigParams {
71
+ aspectRatio?: string;
72
+ tags: Array<Tag>;
73
+ assetSection: VideoSection;
74
+ publisher: string;
75
+ isApp: boolean;
76
+ pageAdsKeywords?: Keywords;
77
+ startMode: 'manual' | 'auto' | 'silent';
78
+ isUserLoggedIn: boolean;
79
+ isUsedInOverlayVideoPlayer?: boolean;
80
+ isLiveStudio: boolean;
81
+ assetId: string;
82
+ isAndroidApp: boolean;
83
+ deviceType: DeviceType;
84
+ }
85
+ export interface VideoStream {
86
+ attributes?: {
87
+ id?: number;
88
+ };
89
+ }
90
+ export interface GatheredAdData {
91
+ siteConfig: SiteVideoConfig;
92
+ siteVideoParams: VideoAdParams | null;
93
+ isUserPresentOnFrontPage: boolean;
94
+ adsKeywords: Keywords;
95
+ prerollPlacementFormat: string;
96
+ playbackMethod: number;
97
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { ValidPlayerAspectRatios, ValidInstreamAspectRatios } from 'features/interface/video';
2
+ declare const getClosestPlayerAspectRatio: (playerAspectRatio?: number) => ValidPlayerAspectRatios;
3
+ declare const getClosestInstreamAspectRatio: (instreamAspectRatio?: number) => ValidInstreamAspectRatios;
4
+ declare const getPlayerAspectRatio: () => number;
5
+ export { getClosestPlayerAspectRatio, getClosestInstreamAspectRatio, getPlayerAspectRatio };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { VideoAdsConfigParams, VideoStream } from 'features/interface/video';
2
+ declare const getAdsConfig: (videoParams: VideoAdsConfigParams) => (stream: VideoStream) => Promise<Record<string, unknown>>;
3
+ export { getAdsConfig };
@@ -0,0 +1,30 @@
1
+ import type { ValidPlayerAspectRatios, ValidInstreamAspectRatios } from 'features/interface/video';
2
+ declare const SE_GENERIC = "se-generic";
3
+ declare const MANDATORY_PREFIX = "aa-sch";
4
+ declare const KEY_PREFIX = "kv_";
5
+ declare const Positions: {
6
+ PAUSE: string;
7
+ };
8
+ declare const DEVICE_TYPE_PLACEHOLDER = "{deviceType}";
9
+ declare const POSITION_PLACEHOLDER = "{position}";
10
+ declare const AFP_PREFIX = "afp_";
11
+ declare const TV_SEGMENT = "tv-";
12
+ declare const AFP_UNDERSCORE = "-afp_";
13
+ declare const AFP_HYPHEN = "-afp-";
14
+ declare const ARTICLE_REPLACEMENT = "-article-";
15
+ declare const FrontpagePositions: {
16
+ readonly PREROLL: "preroll";
17
+ readonly BUMPER: "bumper";
18
+ readonly MIDROLL: "midroll";
19
+ };
20
+ declare const FRONTPAGE_POSITIONS: Set<string>;
21
+ declare const AspectRations: {
22
+ readonly '1:1': "1-1";
23
+ readonly '16:9': "16-9";
24
+ readonly '3:4': "3-4";
25
+ readonly '9:16': "9-16";
26
+ readonly RESPONSIVE: "responsive";
27
+ };
28
+ declare const playerAspectRatios: Record<ValidPlayerAspectRatios, number>;
29
+ declare const streamAspectRatios: Record<ValidInstreamAspectRatios, number>;
30
+ export { SE_GENERIC, MANDATORY_PREFIX, KEY_PREFIX, Positions, DEVICE_TYPE_PLACEHOLDER, POSITION_PLACEHOLDER, AFP_PREFIX, TV_SEGMENT, AFP_UNDERSCORE, AFP_HYPHEN, ARTICLE_REPLACEMENT, FrontpagePositions, FRONTPAGE_POSITIONS, playerAspectRatios, streamAspectRatios, AspectRations };
@@ -0,0 +1,5 @@
1
+ import { DeviceType, DevicesKeywordType } from 'core/interface/device';
2
+ import { ViewportInfo } from 'features/interface/video';
3
+ declare const getSupplyType: (deviceType: DeviceType) => DevicesKeywordType;
4
+ declare const getViewportInfo: () => ViewportInfo;
5
+ export { getSupplyType, getViewportInfo };
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
1
  export { getTcfConsentKeywords } from './tcf';
2
+ export { getAdsConfig } from './config';
@@ -0,0 +1,5 @@
1
+ import { AdFormationInvCodeCreator, AdFormatKeywordCreator, SiteVideoConfig, VideoAdParams } from 'features/interface/video';
2
+ import { DeviceType } from 'core/interface/device';
3
+ declare const adFormatKeywordCreator: (invCodeTemplate?: string) => AdFormatKeywordCreator;
4
+ declare const adFormatInvCodeCreator: (videoParams: VideoAdParams | null, siteConfig: SiteVideoConfig, deviceType: DeviceType, isUsedInOverlayVideoPlayer?: boolean) => AdFormationInvCodeCreator;
5
+ export { adFormatKeywordCreator, adFormatInvCodeCreator };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { GetVideoAdsKeywordsParams, SiteVideoConfig } from 'features/interface/video';
2
+ import { Keywords } from 'core/interface/ast';
3
+ declare const getVideoAdsKeywords: (params: GetVideoAdsKeywordsParams, siteConfig: SiteVideoConfig) => Promise<Keywords>;
4
+ export { getVideoAdsKeywords };
@@ -0,0 +1,8 @@
1
+ import { SiteVideoConfig } from 'features/interface/video';
2
+ import { Keywords } from 'core/interface/ast';
3
+ declare const SHARED_KEYS_TO_FILTER: string[];
4
+ declare const KEYS_TO_SEND_WITHOUT_KW_PREFIX: string[];
5
+ declare const KEYS_KW_PREFIX_BLOCKED: string[];
6
+ declare const filterAndAddKwPrefix: (adsKeywords: Keywords, siteConfig: SiteVideoConfig) => Record<string, unknown>;
7
+ declare const filterKeysWithoutKwPrefix: (adsKeywords: Keywords) => Record<string, unknown>;
8
+ export { filterAndAddKwPrefix, filterKeysWithoutKwPrefix, SHARED_KEYS_TO_FILTER, KEYS_TO_SEND_WITHOUT_KW_PREFIX, KEYS_KW_PREFIX_BLOCKED };
@@ -0,0 +1,2 @@
1
+ export { getVideoAdsKeywords } from './builder';
2
+ export { filterAndAddKwPrefix, filterKeysWithoutKwPrefix } from './filters';
@@ -0,0 +1,3 @@
1
+ declare const getVPlaybackMethod: (startMode: string) => number;
2
+ declare const videoPlaybackMethodMap: Map<number, string>;
3
+ export { getVPlaybackMethod, videoPlaybackMethodMap };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ declare const getPulseDataCookie: () => string;
2
+ declare const getGenericExternalIdSrc: () => number;
3
+ export { getPulseDataCookie, getGenericExternalIdSrc };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { VideoAdParams, SiteVideoConfig, VideoSection } from 'features/interface/video';
2
+ export declare const aftonbladetVideoConfig: SiteVideoConfig;
3
+ declare const createABVideoAdParams: (assetSection?: VideoSection, isLiveStudio?: boolean) => VideoAdParams | null;
4
+ export { createABVideoAdParams };
@@ -0,0 +1,4 @@
1
+ import { SiteVideoConfig, VideoParamsCreator } from 'features/interface/video';
2
+ declare const getSiteConfig: (publisher: string) => SiteVideoConfig;
3
+ declare const getParamsCreator: (publisher: string) => VideoParamsCreator;
4
+ export { getSiteConfig, getParamsCreator };
@@ -0,0 +1,3 @@
1
+ import { Tag } from 'features/interface/video';
2
+ declare const getVideoTags: (tags: Array<Tag>) => string;
3
+ export { getVideoTags };
@@ -0,0 +1,5 @@
1
+ import { Keywords } from 'core/interface/ast';
2
+ declare const getArticleId: () => string;
3
+ declare const adParamsInQueries: () => boolean;
4
+ declare const getKeywords: () => Keywords | undefined;
5
+ export { getArticleId, adParamsInQueries, getKeywords };
@@ -0,0 +1 @@
1
+ export {};