@schibsted/pulse-sdk 8.0.0-rc.8 → 8.0.0-rc.9

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.
@@ -239,6 +239,9 @@ class Tracker {
239
239
  if (!providerId || !(typeof providerId === 'string')) {
240
240
  throw new Error('Required parameter `providerId` missing');
241
241
  }
242
+ if (config?.componentVersion !== undefined && config?.component === undefined) {
243
+ throw new Error('`componentVersion` cannot be provided without `component`');
244
+ }
242
245
  let includeAdvertising;
243
246
  if (pulse_utils_1.isBrowser && config?.autoCreateConsents) {
244
247
  config.consents = (0, consent_manager_1.getConsentsWaitForAnalytics)((consents) => {
@@ -282,6 +285,8 @@ class Tracker {
282
285
  this.builders = (0, pulse_utils_1.pulseMerge)({}, builders, {
283
286
  provider: {
284
287
  id: providerId,
288
+ ...(config?.component !== undefined && { component: config.component }),
289
+ ...(config?.componentVersion !== undefined && { componentVersion: config.componentVersion }),
285
290
  },
286
291
  tracker: {
287
292
  version: version_1.SDK_VERSION,
@@ -498,6 +503,8 @@ class Tracker {
498
503
  isHybrid: !!this.state.isHybrid,
499
504
  pageviewId: this.state.pageViewId,
500
505
  providerId: this.state.providerId,
506
+ component: this.state.component,
507
+ componentVersion: this.state.componentVersion,
501
508
  experiments: await this.adaptExperiments(this.builders.experiments),
502
509
  };
503
510
  }
@@ -575,6 +582,8 @@ class Tracker {
575
582
  user: adaptActorToNewFormat(actor),
576
583
  consents: adaptConsentsToNewFormat(consents),
577
584
  providerId: this.state.providerId,
585
+ component: this.state.component,
586
+ componentVersion: this.state.componentVersion,
578
587
  pageviewId: this.state.pageViewId,
579
588
  currentPage,
580
589
  experiments,
@@ -37,8 +37,6 @@ const ARTICLE_PAYLOAD = {
37
37
  },
38
38
  },
39
39
  provider: {
40
- component: 'test-component',
41
- componentVersion: '1.0.0',
42
40
  product: 'test-product',
43
41
  stage: 'Dev',
44
42
  version: '1.0.0',
@@ -14,7 +14,7 @@ const pulse_utils_1 = require("@schibsted/pulse-utils");
14
14
  const warnOnce_1 = __importDefault(require("../warnOnce"));
15
15
  const consent_manager_1 = require("./consent-manager");
16
16
  /**
17
- * @enum ConsentCategory
17
+ * @enum ConsentsCategory
18
18
  */
19
19
  var ConsentsCategory;
20
20
  (function (ConsentsCategory) {
@@ -23,7 +23,7 @@ var ConsentsCategory;
23
23
  ConsentsCategory["CMP_ADVERTISING"] = "CMP_ADVERTISING";
24
24
  ConsentsCategory["CMP_PERSONALIZATION"] = "CMP_PERSONALIZATION";
25
25
  })(ConsentsCategory || (exports.ConsentsCategory = ConsentsCategory = {}));
26
- exports.ConsentsSourceValues = ['default', 'cmp', 'cache'];
26
+ exports.ConsentsSourceValues = ['default', 'cmp', 'cache', 'url'];
27
27
  exports.ConsentsPurposeCategoryStatusValues = ['accepted', 'rejected', 'unknown'];
28
28
  const isLegacyConsentsPurpose = (consentsPurposeCategory) => {
29
29
  return !consentsPurposeCategory?.status;
@@ -65,7 +65,7 @@ function routableEventDefaults(eventInput) {
65
65
  function routableEvent({ eventInput, sdkConfig } = {}) {
66
66
  return Object.assign({}, eventInput, {
67
67
  schema: eventInput?.schema ||
68
- `http://${sdkConfig?.schemaLocation || exports.DEFAULT_SCHEMA_LOCATION}/events/base-routable-event.json/246.json#`,
68
+ `http://${sdkConfig?.schemaLocation || exports.DEFAULT_SCHEMA_LOCATION}/events/base-routable-event.json/248.json#`,
69
69
  provider: (0, provider_1.default)(eventInput),
70
70
  actor: (0, actor_1.default)(eventInput),
71
71
  });
@@ -98,7 +98,7 @@ function trackerEvent({ eventInput, sdkConfig } = {}) {
98
98
  '@type': eventInput?.type || 'View',
99
99
  pageViewId: pageViewIdInput || pageViewIdSdk,
100
100
  schema: eventInput?.schema ||
101
- `http://${sdkConfig?.schemaLocation || exports.DEFAULT_SCHEMA_LOCATION}/events/tracker-event.json/360.json`,
101
+ `http://${sdkConfig?.schemaLocation || exports.DEFAULT_SCHEMA_LOCATION}/events/tracker-event.json/361.json`,
102
102
  actor: (0, actor_1.default)(parentInput),
103
103
  consents: (0, consents_1.default)(parentInput),
104
104
  experiments: (0, experiments_1.default)(parentInput),
@@ -116,7 +116,7 @@ trackerEvent.defaults = trackerEventInput;
116
116
  function engagementEvent({ eventInput, sdkConfig } = {}) {
117
117
  return Object.assign(trackerEvent({ eventInput, sdkConfig }), {
118
118
  schema: eventInput?.schema ||
119
- `http://${sdkConfig?.schemaLocation || exports.DEFAULT_SCHEMA_LOCATION}/events/engagement-event.json/386.json`,
119
+ `http://${sdkConfig?.schemaLocation || exports.DEFAULT_SCHEMA_LOCATION}/events/engagement-event.json/388.json`,
120
120
  '@type': 'Engagement',
121
121
  });
122
122
  }
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
4
  // This file is auto-generated by bin/generate-version.js. Do not edit manually.
5
- exports.SDK_VERSION = '8.0.0-rc.8';
5
+ exports.SDK_VERSION = '8.0.0-rc.9';
@@ -196,6 +196,9 @@ export default class Tracker {
196
196
  if (!providerId || !(typeof providerId === 'string')) {
197
197
  throw new Error('Required parameter `providerId` missing');
198
198
  }
199
+ if (config?.componentVersion !== undefined && config?.component === undefined) {
200
+ throw new Error('`componentVersion` cannot be provided without `component`');
201
+ }
199
202
  let includeAdvertising;
200
203
  if (isBrowser && config?.autoCreateConsents) {
201
204
  config.consents = getConsentsWaitForAnalytics((consents) => {
@@ -239,6 +242,8 @@ export default class Tracker {
239
242
  this.builders = pulseMerge({}, builders, {
240
243
  provider: {
241
244
  id: providerId,
245
+ ...(config?.component !== undefined && { component: config.component }),
246
+ ...(config?.componentVersion !== undefined && { componentVersion: config.componentVersion }),
242
247
  },
243
248
  tracker: {
244
249
  version: SDK_VERSION,
@@ -455,6 +460,8 @@ export default class Tracker {
455
460
  isHybrid: !!this.state.isHybrid,
456
461
  pageviewId: this.state.pageViewId,
457
462
  providerId: this.state.providerId,
463
+ component: this.state.component,
464
+ componentVersion: this.state.componentVersion,
458
465
  experiments: await this.adaptExperiments(this.builders.experiments),
459
466
  };
460
467
  }
@@ -532,6 +539,8 @@ export default class Tracker {
532
539
  user: adaptActorToNewFormat(actor),
533
540
  consents: adaptConsentsToNewFormat(consents),
534
541
  providerId: this.state.providerId,
542
+ component: this.state.component,
543
+ componentVersion: this.state.componentVersion,
535
544
  pageviewId: this.state.pageViewId,
536
545
  currentPage,
537
546
  experiments,
@@ -32,8 +32,6 @@ const ARTICLE_PAYLOAD = {
32
32
  },
33
33
  },
34
34
  provider: {
35
- component: 'test-component',
36
- componentVersion: '1.0.0',
37
35
  product: 'test-product',
38
36
  stage: 'Dev',
39
37
  version: '1.0.0',
@@ -3,7 +3,7 @@ import { isPromise } from '@schibsted/pulse-utils';
3
3
  import warnOnce from '../warnOnce';
4
4
  import { getFallbackConsents } from './consent-manager';
5
5
  /**
6
- * @enum ConsentCategory
6
+ * @enum ConsentsCategory
7
7
  */
8
8
  export var ConsentsCategory;
9
9
  (function (ConsentsCategory) {
@@ -12,7 +12,7 @@ export var ConsentsCategory;
12
12
  ConsentsCategory["CMP_ADVERTISING"] = "CMP_ADVERTISING";
13
13
  ConsentsCategory["CMP_PERSONALIZATION"] = "CMP_PERSONALIZATION";
14
14
  })(ConsentsCategory || (ConsentsCategory = {}));
15
- export const ConsentsSourceValues = ['default', 'cmp', 'cache'];
15
+ export const ConsentsSourceValues = ['default', 'cmp', 'cache', 'url'];
16
16
  export const ConsentsPurposeCategoryStatusValues = ['accepted', 'rejected', 'unknown'];
17
17
  const isLegacyConsentsPurpose = (consentsPurposeCategory) => {
18
18
  return !consentsPurposeCategory?.status;
@@ -22,7 +22,7 @@ function routableEventDefaults(eventInput) {
22
22
  export function routableEvent({ eventInput, sdkConfig } = {}) {
23
23
  return Object.assign({}, eventInput, {
24
24
  schema: eventInput?.schema ||
25
- `http://${sdkConfig?.schemaLocation || DEFAULT_SCHEMA_LOCATION}/events/base-routable-event.json/246.json#`,
25
+ `http://${sdkConfig?.schemaLocation || DEFAULT_SCHEMA_LOCATION}/events/base-routable-event.json/248.json#`,
26
26
  provider: providerBuilder(eventInput),
27
27
  actor: actorBuilder(eventInput),
28
28
  });
@@ -55,7 +55,7 @@ export function trackerEvent({ eventInput, sdkConfig } = {}) {
55
55
  '@type': eventInput?.type || 'View',
56
56
  pageViewId: pageViewIdInput || pageViewIdSdk,
57
57
  schema: eventInput?.schema ||
58
- `http://${sdkConfig?.schemaLocation || DEFAULT_SCHEMA_LOCATION}/events/tracker-event.json/360.json`,
58
+ `http://${sdkConfig?.schemaLocation || DEFAULT_SCHEMA_LOCATION}/events/tracker-event.json/361.json`,
59
59
  actor: actorBuilder(parentInput),
60
60
  consents: consentsBuilder(parentInput),
61
61
  experiments: experimentsBuilder(parentInput),
@@ -73,7 +73,7 @@ trackerEvent.defaults = trackerEventInput;
73
73
  export function engagementEvent({ eventInput, sdkConfig } = {}) {
74
74
  return Object.assign(trackerEvent({ eventInput, sdkConfig }), {
75
75
  schema: eventInput?.schema ||
76
- `http://${sdkConfig?.schemaLocation || DEFAULT_SCHEMA_LOCATION}/events/engagement-event.json/386.json`,
76
+ `http://${sdkConfig?.schemaLocation || DEFAULT_SCHEMA_LOCATION}/events/engagement-event.json/388.json`,
77
77
  '@type': 'Engagement',
78
78
  });
79
79
  }
@@ -1,2 +1,2 @@
1
1
  // This file is auto-generated by bin/generate-version.js. Do not edit manually.
2
- export const SDK_VERSION = '8.0.0-rc.8';
2
+ export const SDK_VERSION = '8.0.0-rc.9';
@@ -1,5 +1,5 @@
1
1
  import { type AdvertisingIdentifiers, type AdvertisingVendor } from '@schibsted/pulse-cis-sync';
2
- import { type IAnonymousViewUIElement, type ICompletedHealthAction, type IEngagementAudio, type IEngagementForm, type IEngagementHealthUIElement, type IEngagementOffer, type IEngagementTeaser, type IEngagementUIElement, type IEngagementVideo, type IEngagementVideoAd, type IEngagementWidget, type IImpressionAdSlot, type IImpressionForm, type IImpressionHealthUIElement, type IImpressionOffer, type IImpressionPlayer, type IImpressionTeaser, type IImpressionUIElement, type IImpressionWidget, type ILeave, type ILeaveArticle, type ILeaveAudioPage, type ILeaveError, type ILeaveFrontpage, type ILeaveLandingpage, type ILeaveListing, type ILeaveLockedArticle, type ILeaveLockedAudioPage, type ILeaveLockedVideoPage, type ILeavePage, type ILeaveSportsPage, type ILeaveVideoPage, type ILeaveWeather, type InputParams, type ITpaasEvent, type IViewArticle, type IViewAudioPage, type IViewError, type IViewFrontpage, type IViewHealthPage, type IViewLandingpage, type IViewListing, type IViewLockedArticle, type IViewLockedAudioPage, type IViewLockedVideoPage, type IViewPage, type IViewSportsPage, type IViewTitle, type IViewVideoPage, type IViewWeather } from '@schibsted/tpaas-schemas';
2
+ import { type IAnonymousViewUIElement, type ICompletedHealthAction, type IEngagementAudio, type IEngagementForm, type IEngagementHealthUIElement, type IEngagementOffer, type IEngagementTeaser, type IEngagementUIElement, type IEngagementVideo, type IEngagementVideoAd, type IEngagementWidget, type IImpressionAdSlot, type IImpressionForm, type IImpressionHealthUIElement, type IImpressionOffer, type IImpressionPlayer, type IImpressionTeaser, type IImpressionUIElement, type IImpressionWidget, type ILeave, type ILeaveArticle, type ILeaveAudioPage, type ILeaveError, type ILeaveFrontpage, type ILeaveLandingpage, type ILeaveListing, type ILeaveLockedArticle, type ILeaveLockedAudioPage, type ILeaveLockedVideoPage, type ILeavePage, type ILeaveSportsPage, type ILeaveVideoPage, type ILeaveWeather, type InputParams, type IProvider, type ITpaasEvent, type IViewArticle, type IViewAudioPage, type IViewError, type IViewFrontpage, type IViewHealthPage, type IViewLandingpage, type IViewListing, type IViewLockedArticle, type IViewLockedAudioPage, type IViewLockedVideoPage, type IViewPage, type IViewSportsPage, type IViewTitle, type IViewVideoPage, type IViewWeather } from '@schibsted/tpaas-schemas';
3
3
  import logger from 'loglevel';
4
4
  import type { ActorInput, Consents, ConsentsInput, DeviceInput, LocationInput, ObjectInput, OriginInput, ProviderInput, TrackerInput } from './builders';
5
5
  import { engagementEvent, identityEvent, routableEvent, trackerEvent } from './builders/events';
@@ -81,6 +81,16 @@ export interface SDKConfigInput {
81
81
  * @see requireAdvertisingOptIn
82
82
  */
83
83
  adChoicesEnabled?: boolean;
84
+ /**
85
+ * The component name to include in tracked events.
86
+ * Automatically populated as `.provider.component` for both TPaaS and legacy events.
87
+ */
88
+ component?: IProvider['component'];
89
+ /**
90
+ * The component version to include in tracked events.
91
+ * Automatically populated as `.provider.componentVersion` for both TPaaS and legacy events.
92
+ */
93
+ componentVersion?: IProvider['componentVersion'];
84
94
  /**
85
95
  * Function handler to call in place of the built-in tracker call.
86
96
  * @function
@@ -1,6 +1,6 @@
1
1
  import type { TrackerEventInput } from './events';
2
2
  /**
3
- * @enum ConsentCategory
3
+ * @enum ConsentsCategory
4
4
  */
5
5
  export declare enum ConsentsCategory {
6
6
  CMP_ANALYTICS = "CMP_ANALYTICS",
@@ -8,7 +8,7 @@ export declare enum ConsentsCategory {
8
8
  CMP_ADVERTISING = "CMP_ADVERTISING",
9
9
  CMP_PERSONALIZATION = "CMP_PERSONALIZATION"
10
10
  }
11
- export declare const ConsentsSourceValues: readonly ["default", "cmp", "cache"];
11
+ export declare const ConsentsSourceValues: readonly ["default", "cmp", "cache", "url"];
12
12
  export type ConsentsSource = (typeof ConsentsSourceValues)[number];
13
13
  export declare const ConsentsPurposeCategoryStatusValues: readonly ["accepted", "rejected", "unknown"];
14
14
  export type ConsentsPurposeCategoryStatus = (typeof ConsentsPurposeCategoryStatusValues)[number];
@@ -1,6 +1,6 @@
1
1
  export type { ActorInput } from './actor';
2
2
  export * as actor from './actor';
3
- export type { ConsentCategory, ConsentedToPurposeInput, ConsentPurposeCategory, Consents, ConsentsInput, ConsentsOutput, } from './consents';
3
+ export type { ConsentCategory, ConsentedToPurposeInput, ConsentPurposeCategory, Consents, ConsentsCategory, ConsentsInput, ConsentsOutput, ConsentsPurposeCategory, } from './consents';
4
4
  export * as consents from './consents';
5
5
  export type { DeviceInput } from './device';
6
6
  export * as device from './device';
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "8.0.0-rc.8";
1
+ export declare const SDK_VERSION = "8.0.0-rc.9";
@@ -2,11 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.builder = builder;
4
4
  const generateProviderSDRN = (providerId) => `sdrn:schibsted:client:${providerId}`;
5
- function builder(providerId) {
5
+ function builder(providerId, component, componentVersion) {
6
6
  return {
7
7
  provider: {
8
8
  providerId,
9
9
  providerSdrn: generateProviderSDRN(providerId),
10
+ ...(component !== undefined && { component }),
11
+ ...(componentVersion !== undefined && { componentVersion }),
10
12
  },
11
13
  };
12
14
  }
@@ -73,9 +73,9 @@ const utm_1 = require("./builders/utm");
73
73
  * @private
74
74
  */
75
75
  const getCommonBuildersOutput = (createdAt, dependencies, input) => {
76
- const { autoTrackerVersion, isHybrid, version, environmentId, jwe, user, consents, providerId, pageviewId, currentPage, } = dependencies;
76
+ const { autoTrackerVersion, isHybrid, version, environmentId, jwe, user, consents, providerId, component, componentVersion, pageviewId, currentPage, } = dependencies;
77
77
  const { experiments } = input;
78
- return (0, ts_deepmerge_1.merge)((0, trackerBuilder_1.builder)(autoTrackerVersion, isHybrid, version), (0, time_1.builder)(createdAt), (0, session_1.builder)(createdAt), (0, device_1.builder)(environmentId, jwe), (0, user_1.builder)(user), (0, baseEvent_1.builder)(), (0, consents_1.builder)(consents), (0, provider_1.builder)(providerId), (0, pageInfo_1.builder)(currentPage), (0, pageviewId_1.builder)(pageviewId), (0, utm_1.builder)(), (0, referrer_1.builder)(), (0, catalogVersion_1.builder)(), (0, experiments_1.builder)(dependencies.experiments, experiments));
78
+ return (0, ts_deepmerge_1.merge)((0, trackerBuilder_1.builder)(autoTrackerVersion, isHybrid, version), (0, time_1.builder)(createdAt), (0, session_1.builder)(createdAt), (0, device_1.builder)(environmentId, jwe), (0, user_1.builder)(user), (0, baseEvent_1.builder)(), (0, consents_1.builder)(consents), (0, provider_1.builder)(providerId, component, componentVersion), (0, pageInfo_1.builder)(currentPage), (0, pageviewId_1.builder)(pageviewId), (0, utm_1.builder)(), (0, referrer_1.builder)(), (0, catalogVersion_1.builder)(), (0, experiments_1.builder)(dependencies.experiments, experiments));
79
79
  };
80
80
  exports.getCommonBuildersOutput = getCommonBuildersOutput;
81
81
  // there's a bug in the ts-deepmerge library that doesn't properly resolve merging optionals with required properties
@@ -107,157 +107,157 @@ const normalizePageInput = (input) => {
107
107
  // #region AnonymousView Event Builders
108
108
  function buildAnonymousViewUIElementEvent(input, dependencies) {
109
109
  const createdAt = new Date();
110
- const { autoTrackerVersion, isHybrid, version, pageviewId, providerId } = dependencies;
111
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.AnonymousViewUIElement, (0, baseEvent_1.builder)(), (0, trackerBuilder_1.builder)(autoTrackerVersion, isHybrid, version), (0, time_1.builder)(createdAt), (0, pageviewId_1.builder)(pageviewId), (0, utm_1.builder)(), (0, anonymous_1.builder)(), (0, provider_1.builder)(providerId), (0, referrer_1.builder)(), (0, experiments_1.builder)(dependencies.experiments, input.experiments), (0, catalogVersion_1.builder)());
110
+ const { autoTrackerVersion, isHybrid, version, pageviewId, providerId, component, componentVersion } = dependencies;
111
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.AnonymousViewUIElement, (0, baseEvent_1.builder)(), (0, trackerBuilder_1.builder)(autoTrackerVersion, isHybrid, version), (0, time_1.builder)(createdAt), (0, pageviewId_1.builder)(pageviewId), (0, utm_1.builder)(), (0, anonymous_1.builder)(), (0, provider_1.builder)(providerId, component, componentVersion), (0, referrer_1.builder)(), (0, experiments_1.builder)(dependencies.experiments, input.experiments), (0, catalogVersion_1.builder)(), normalizePageInput(input));
112
112
  }
113
113
  // #endregion
114
114
  // #region View Event Builders
115
115
  function buildViewArticleEvent(input, dependencies) {
116
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewArticle, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
116
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewArticle, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
117
117
  }
118
118
  function buildViewAudioPageEvent(input, dependencies) {
119
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewAudioPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
119
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewAudioPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
120
120
  }
121
121
  function buildViewErrorEvent(input, dependencies) {
122
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewError, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
122
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewError, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
123
123
  }
124
124
  function buildViewFrontpageEvent(input, dependencies) {
125
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewFrontpage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
125
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewFrontpage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
126
126
  }
127
127
  function buildViewLandingpageEvent(input, dependencies) {
128
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewLandingpage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
128
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewLandingpage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
129
129
  }
130
130
  function buildViewListingEvent(input, dependencies) {
131
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewListing, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
131
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewListing, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
132
132
  }
133
133
  function buildViewLockedArticleEvent(input, dependencies) {
134
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewLockedArticle, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
134
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewLockedArticle, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
135
135
  }
136
136
  function buildViewLockedAudioPageEvent(input, dependencies) {
137
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewLockedAudioPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
137
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewLockedAudioPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
138
138
  }
139
139
  function buildViewLockedVideoPageEvent(input, dependencies) {
140
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewLockedVideoPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
140
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewLockedVideoPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
141
141
  }
142
142
  function buildLeaveLockedVideoPageEvent(input, dependencies) {
143
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeaveLockedVideoPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
143
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.LeaveLockedVideoPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
144
144
  }
145
145
  function buildViewPageEvent(input, dependencies) {
146
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
146
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
147
147
  }
148
148
  function buildViewSportsPageEvent(input, dependencies) {
149
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewSportsPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
149
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewSportsPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
150
150
  }
151
151
  function buildViewTitleEvent(input, dependencies) {
152
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewTitle, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
152
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewTitle, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
153
153
  }
154
154
  function buildViewVideoPageEvent(input, dependencies) {
155
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewVideoPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
155
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewVideoPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
156
156
  }
157
157
  function buildViewWeatherEvent(input, dependencies) {
158
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewWeather, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
158
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewWeather, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
159
159
  }
160
160
  // #endregion
161
161
  // #region Leave Event Builders
162
162
  function buildLeaveArticleEvent(input, dependencies) {
163
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeaveArticle, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
163
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.LeaveArticle, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
164
164
  }
165
165
  function buildLeaveAudioPageEvent(input, dependencies) {
166
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeaveAudioPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
166
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.LeaveAudioPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
167
167
  }
168
168
  function buildLeaveErrorEvent(input, dependencies) {
169
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeaveError, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
169
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.LeaveError, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
170
170
  }
171
171
  function buildLeaveFrontpageEvent(input, dependencies) {
172
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeaveFrontpage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
172
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.LeaveFrontpage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
173
173
  }
174
174
  function buildLeaveLandingpageEvent(input, dependencies) {
175
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeaveLandingpage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
175
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.LeaveLandingpage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
176
176
  }
177
177
  function buildLeaveListingEvent(input, dependencies) {
178
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeaveListing, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
178
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.LeaveListing, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
179
179
  }
180
180
  function buildLeaveLockedArticleEvent(input, dependencies) {
181
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeaveLockedArticle, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
181
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.LeaveLockedArticle, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
182
182
  }
183
183
  function buildLeaveLockedAudioPageEvent(input, dependencies) {
184
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeaveLockedAudioPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
184
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.LeaveLockedAudioPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
185
185
  }
186
186
  function buildLeavePageEvent(input, dependencies) {
187
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeavePage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
187
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.LeavePage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
188
188
  }
189
189
  function buildLeaveSportsPageEvent(input, dependencies) {
190
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeaveSportsPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
190
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.LeaveSportsPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
191
191
  }
192
192
  function buildLeaveVideoPageEvent(input, dependencies) {
193
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeaveVideoPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
193
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.LeaveVideoPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
194
194
  }
195
195
  function buildLeaveWeatherEvent(input, dependencies) {
196
196
  const createdAt = new Date();
197
- const { autoTrackerVersion, isHybrid, version, providerId, user, experiments } = dependencies;
198
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeaveWeather, (0, time_1.builder)(createdAt), (0, trackerBuilder_1.builder)(autoTrackerVersion, isHybrid, version), (0, baseEvent_1.builder)(), (0, provider_1.builder)(providerId), (0, user_1.builder)(user), (0, experiments_1.builder)(experiments, input.experiments), (0, consents_1.builder)(dependencies.consents), (0, device_1.builder)(dependencies.environmentId, dependencies.jwe), (0, catalogVersion_1.builder)(), (0, navigationType_1.builder)(input.page?.navigationType), (0, pageviewId_1.builder)(dependencies.pageviewId), (0, pageInfo_1.builder)(dependencies.currentPage));
197
+ const { autoTrackerVersion, isHybrid, version, providerId, component, componentVersion, user, experiments } = dependencies;
198
+ return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.LeaveWeather, (0, time_1.builder)(createdAt), (0, trackerBuilder_1.builder)(autoTrackerVersion, isHybrid, version), (0, baseEvent_1.builder)(), (0, provider_1.builder)(providerId, component, componentVersion), (0, user_1.builder)(user), (0, experiments_1.builder)(experiments, input.experiments), (0, consents_1.builder)(dependencies.consents), (0, device_1.builder)(dependencies.environmentId, dependencies.jwe), (0, catalogVersion_1.builder)(), (0, navigationType_1.builder)(input.page?.navigationType), (0, pageviewId_1.builder)(dependencies.pageviewId), (0, pageInfo_1.builder)(dependencies.currentPage));
199
199
  }
200
200
  // #endregion
201
201
  // #region Engagement Event Builders
202
202
  function buildEngagementAudioEvent(input, dependencies) {
203
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.EngagementAudio, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
203
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.EngagementAudio, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
204
204
  }
205
205
  function buildEngagementFormEvent(input, dependencies) {
206
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.EngagementForm, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
206
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.EngagementForm, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
207
207
  }
208
208
  function buildEngagementOfferEvent(input, dependencies) {
209
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.EngagementOffer, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
209
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.EngagementOffer, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
210
210
  }
211
211
  function buildEngagementTeaserEvent(input, dependencies) {
212
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.EngagementTeaser, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
212
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.EngagementTeaser, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
213
213
  }
214
214
  function buildEngagementUIElementEvent(input, dependencies) {
215
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.EngagementUIElement, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
215
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.EngagementUIElement, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
216
216
  }
217
217
  function buildEngagementVideoEvent(input, dependencies) {
218
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.EngagementVideo, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
218
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.EngagementVideo, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
219
219
  }
220
220
  function buildEngagementVideoAdEvent(input, dependencies) {
221
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.EngagementVideoAd, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
221
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.EngagementVideoAd, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
222
222
  }
223
223
  function buildEngagementWidgetEvent(input, dependencies) {
224
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.EngagementWidget, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
224
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.EngagementWidget, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
225
225
  }
226
226
  // #endregion
227
227
  // #region Health Event Builders
228
228
  function buildCompletedHealthActionEvent(input, dependencies) {
229
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.CompletedHealthAction, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
229
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.CompletedHealthAction, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
230
230
  }
231
231
  function buildEngagementHealthUIElementEvent(input, dependencies) {
232
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.EngagementHealthUIElement, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
232
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.EngagementHealthUIElement, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
233
233
  }
234
234
  function buildViewHealthPageEvent(input, dependencies) {
235
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ViewHealthPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), (0, navigationType_1.builder)(input.page?.navigationType));
235
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ViewHealthPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input), (0, navigationType_1.builder)(input.page?.navigationType));
236
236
  }
237
237
  function buildImpressionHealthUIElementEvent(input, dependencies) {
238
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ImpressionHealthUIElement, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
238
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ImpressionHealthUIElement, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
239
239
  }
240
240
  // #endregion
241
241
  // #region Impression Event Builders
242
242
  function buildImpressionAdSlotEvent(input, dependencies) {
243
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ImpressionAdSlot, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
243
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ImpressionAdSlot, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
244
244
  }
245
245
  function buildImpressionFormEvent(input, dependencies) {
246
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ImpressionForm, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
246
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ImpressionForm, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
247
247
  }
248
248
  function buildImpressionOfferEvent(input, dependencies) {
249
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ImpressionOffer, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
249
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ImpressionOffer, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
250
250
  }
251
251
  function buildImpressionPlayerEvent(input, dependencies) {
252
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ImpressionPlayer, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
252
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ImpressionPlayer, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
253
253
  }
254
254
  function buildImpressionTeaserEvent(input, dependencies) {
255
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ImpressionTeaser, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
255
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ImpressionTeaser, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
256
256
  }
257
257
  function buildImpressionUIElementEvent(input, dependencies) {
258
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ImpressionUIElement, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
258
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ImpressionUIElement, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
259
259
  }
260
260
  function buildImpressionWidgetEvent(input, dependencies) {
261
- return (0, ts_deepmerge_1.merge)(normalizePageInput(input), tpaas_schemas_1.ImpressionWidget, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input));
261
+ return (0, ts_deepmerge_1.merge)(tpaas_schemas_1.ImpressionWidget, (0, exports.getCommonBuildersOutput)(new Date(), dependencies, input), normalizePageInput(input));
262
262
  }
263
263
  // #endregion
@@ -1,9 +1,11 @@
1
1
  const generateProviderSDRN = (providerId) => `sdrn:schibsted:client:${providerId}`;
2
- export function builder(providerId) {
2
+ export function builder(providerId, component, componentVersion) {
3
3
  return {
4
4
  provider: {
5
5
  providerId,
6
6
  providerSdrn: generateProviderSDRN(providerId),
7
+ ...(component !== undefined && { component }),
8
+ ...(componentVersion !== undefined && { componentVersion }),
7
9
  },
8
10
  };
9
11
  }