@guardian/commercial-core 27.0.0 → 27.1.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.
@@ -1,5 +1,6 @@
1
1
  import type { AdSize, SizeMapping } from './ad-sizes';
2
2
  import type { PageTargeting } from './targeting/build-page-targeting';
3
+ import 'googletag';
3
4
  type HeaderBiddingSize = AdSize;
4
5
  interface Advert {
5
6
  id: string;
@@ -76,6 +77,9 @@ type AdsConfigTCFV2 = AdsConfigBasic & {
76
77
  };
77
78
  nonPersonalizedAd: boolean;
78
79
  };
80
+ type AdsConfigEnabled = AdsConfigBasic | AdsConfigUSNATorAus | AdsConfigTCFV2;
81
+ type AdsConfig = AdsConfigEnabled | AdsConfigDisabled;
82
+ type AdTargetingBuilder = () => Promise<AdsConfig>;
79
83
  interface Ophan {
80
84
  trackComponentAttention: (name: string, el: Element, visiblityThreshold: number) => void;
81
85
  record: OphanRecordFunction;
@@ -420,4 +424,4 @@ type GoogleTrackConversionObject = {
420
424
  google_custom_params: GoogleTagParams;
421
425
  google_remarketing_only: boolean;
422
426
  };
423
- export type { Advert, DfpEnv, ConnectionType, NetworkInformation, OphanRecordFunction, Indices, Edition, AdsConfigDisabled, AdsConfigBasic, AdsConfigUSNATorAus, AdsConfigTCFV2, Ophan, Config, AdBlockers, ArticleCounts, FetchBidResponse, HeaderNotification, OptOutInitializeOptions, OptOutAdSlot, Confiant, Permutive, Apstag, ComscoreGlobals, IasPET, TeadsAnalytics, SafeFrameAPI, NSdkInstance, Trac, GoogleTagParams, GoogleTrackConversionObject, };
427
+ export type { Advert, DfpEnv, ConnectionType, NetworkInformation, OphanRecordFunction, Indices, Edition, AdsConfigDisabled, AdsConfigEnabled, AdsConfigBasic, AdsConfigUSNATorAus, AdsConfigTCFV2, AdsConfig, AdTargetingBuilder, Ophan, Config, AdBlockers, ArticleCounts, FetchBidResponse, HeaderNotification, OptOutInitializeOptions, OptOutAdSlot, Confiant, Permutive, Apstag, ComscoreGlobals, IasPET, TeadsAnalytics, SafeFrameAPI, NSdkInstance, Trac, GoogleTagParams, GoogleTrackConversionObject, };
package/dist/cjs/types.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("googletag");
3
4
  var BlockingType;
4
5
  (function (BlockingType) {
5
6
  BlockingType[BlockingType["Manual"] = 1] = "Manual";
@@ -1,5 +1,6 @@
1
1
  import type { AdSize, SizeMapping } from './ad-sizes';
2
2
  import type { PageTargeting } from './targeting/build-page-targeting';
3
+ import 'googletag';
3
4
  type HeaderBiddingSize = AdSize;
4
5
  interface Advert {
5
6
  id: string;
@@ -76,6 +77,9 @@ type AdsConfigTCFV2 = AdsConfigBasic & {
76
77
  };
77
78
  nonPersonalizedAd: boolean;
78
79
  };
80
+ type AdsConfigEnabled = AdsConfigBasic | AdsConfigUSNATorAus | AdsConfigTCFV2;
81
+ type AdsConfig = AdsConfigEnabled | AdsConfigDisabled;
82
+ type AdTargetingBuilder = () => Promise<AdsConfig>;
79
83
  interface Ophan {
80
84
  trackComponentAttention: (name: string, el: Element, visiblityThreshold: number) => void;
81
85
  record: OphanRecordFunction;
@@ -420,4 +424,4 @@ type GoogleTrackConversionObject = {
420
424
  google_custom_params: GoogleTagParams;
421
425
  google_remarketing_only: boolean;
422
426
  };
423
- export type { Advert, DfpEnv, ConnectionType, NetworkInformation, OphanRecordFunction, Indices, Edition, AdsConfigDisabled, AdsConfigBasic, AdsConfigUSNATorAus, AdsConfigTCFV2, Ophan, Config, AdBlockers, ArticleCounts, FetchBidResponse, HeaderNotification, OptOutInitializeOptions, OptOutAdSlot, Confiant, Permutive, Apstag, ComscoreGlobals, IasPET, TeadsAnalytics, SafeFrameAPI, NSdkInstance, Trac, GoogleTagParams, GoogleTrackConversionObject, };
427
+ export type { Advert, DfpEnv, ConnectionType, NetworkInformation, OphanRecordFunction, Indices, Edition, AdsConfigDisabled, AdsConfigEnabled, AdsConfigBasic, AdsConfigUSNATorAus, AdsConfigTCFV2, AdsConfig, AdTargetingBuilder, Ophan, Config, AdBlockers, ArticleCounts, FetchBidResponse, HeaderNotification, OptOutInitializeOptions, OptOutAdSlot, Confiant, Permutive, Apstag, ComscoreGlobals, IasPET, TeadsAnalytics, SafeFrameAPI, NSdkInstance, Trac, GoogleTagParams, GoogleTrackConversionObject, };
package/dist/esm/types.js CHANGED
@@ -1,3 +1,4 @@
1
+ import 'googletag';
1
2
  var BlockingType;
2
3
  (function (BlockingType) {
3
4
  BlockingType[BlockingType["Manual"] = 1] = "Manual";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guardian/commercial-core",
3
- "version": "27.0.0",
3
+ "version": "27.1.0",
4
4
  "description": "Guardian advertising business logic",
5
5
  "homepage": "https://github.com/guardian/commercial#readme",
6
6
  "bugs": {
@@ -35,11 +35,11 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@guardian/ab-core": "8.0.1",
38
- "@guardian/libs": "22.5.0"
38
+ "@guardian/libs": "22.5.0",
39
+ "@types/googletag": "~3.3.0"
39
40
  },
40
41
  "devDependencies": {
41
42
  "@types/node": "24.0.12",
42
- "@types/googletag": "~3.3.0",
43
43
  "typescript": "5.5.4",
44
44
  "@types/jest": "30.0.0",
45
45
  "jest": "^30.0.1",