@schibsted/pulse-sdk 8.0.0-alpha.8

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.
@@ -0,0 +1,13 @@
1
+ export * from '@schibsted/pulse-sdk-core';
2
+ export * from '@schibsted/tpaas-schemas';
3
+ import type { Builders, SDKConfigInput as CoreSDKConfigInput } from '@schibsted/pulse-sdk-core';
4
+ import CoreTracker from '@schibsted/pulse-sdk-core';
5
+ type RemoteConfig = CoreSDKConfigInput['remoteConfigurationUrl'];
6
+ export type SDKConfigInput = Omit<CoreSDKConfigInput, 'remoteConfigurationUrl' | 'fallbackCisBaseUrl' | 'fallbackCollectorBaseUrl' | 'schemaLocation'> & {
7
+ remoteConfigurationUrl?: RemoteConfig;
8
+ };
9
+ export declare class Tracker extends CoreTracker {
10
+ constructor(provider: string, input?: SDKConfigInput, builders?: Builders);
11
+ }
12
+ export default Tracker;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AAEzC,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAChG,OAAO,WAAW,MAAM,2BAA2B,CAAC;AAoBpD,KAAK,YAAY,GAAG,kBAAkB,CAAC,wBAAwB,CAAC,CAAC;AAEjE,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,kBAAkB,EAChB,wBAAwB,GACxB,oBAAoB,GACpB,0BAA0B,GAC1B,gBAAgB,CACnB,GAAG;IACF,sBAAsB,CAAC,EAAE,YAAY,CAAC;CACvC,CAAC;AAEF,qBAAa,OAAQ,SAAQ,WAAW;gBAC1B,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,QAAQ;CAc1E;AACD,eAAe,OAAO,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.Tracker = void 0;
21
+ __exportStar(require("@schibsted/pulse-sdk-core"), exports);
22
+ __exportStar(require("@schibsted/tpaas-schemas"), exports);
23
+ const pulse_sdk_core_1 = __importDefault(require("@schibsted/pulse-sdk-core"));
24
+ const collectorEndpoints = {
25
+ dev: 'https://collector.pulse-internal-dev.schibsted.io',
26
+ pre: 'https://collector.pulse-internal-pre.schibsted.io',
27
+ pro: 'https://dc.schibsted.io',
28
+ };
29
+ const CISEndpoints = {
30
+ dev: 'https://cis.pulse-internal-dev.schibsted.io',
31
+ pre: 'https://cis.pulse-internal-pre.schibsted.io',
32
+ pro: 'https://ncis.schibsted.com',
33
+ };
34
+ const remoteConfig = {
35
+ dev: 'https://sdkconfig.pulse-internal-dev.schibsted.io/js/config.json',
36
+ pre: 'https://sdkconfig.pulse-internal-pre.schibsted.io/js/config.json',
37
+ pro: 'https://sdkconfig.pulse.schibsted.io/js/config.json',
38
+ };
39
+ class Tracker extends pulse_sdk_core_1.default {
40
+ constructor(provider, input, builders) {
41
+ const deployStage = (input === null || input === void 0 ? void 0 : input.deployStage) || 'pro';
42
+ super(provider, Object.assign({ remoteConfigurationUrl: remoteConfig[deployStage], fallbackCisBaseUrl: CISEndpoints[deployStage], fallbackCollectorBaseUrl: collectorEndpoints[deployStage], schemaLocation: 'schema.schibsted.com' }, input), builders);
43
+ }
44
+ }
45
+ exports.Tracker = Tracker;
46
+ exports.default = Tracker;
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,2DAAyC;AAGzC,+EAAoD;AAEpD,MAAM,kBAAkB,GAAG;IACzB,GAAG,EAAE,mDAAmD;IACxD,GAAG,EAAE,mDAAmD;IACxD,GAAG,EAAE,yBAAyB;CAC/B,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,GAAG,EAAE,6CAA6C;IAClD,GAAG,EAAE,6CAA6C;IAClD,GAAG,EAAE,4BAA4B;CAClC,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,GAAG,EAAE,kEAAkE;IACvE,GAAG,EAAE,kEAAkE;IACvE,GAAG,EAAE,qDAAqD;CAC3D,CAAC;AAcF,MAAa,OAAQ,SAAQ,wBAAW;IACtC,YAAY,QAAgB,EAAE,KAAsB,EAAE,QAAmB;QACvE,MAAM,WAAW,GAAG,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,KAAI,KAAK,CAAC;QAChD,KAAK,CACH,QAAQ,kBAEN,sBAAsB,EAAE,YAAY,CAAC,WAAW,CAAC,EACjD,kBAAkB,EAAE,YAAY,CAAC,WAAW,CAAC,EAC7C,wBAAwB,EAAE,kBAAkB,CAAC,WAAW,CAAC,EACzD,cAAc,EAAE,sBAAsB,IACnC,KAAK,GAEV,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AAfD,0BAeC;AACD,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,340 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CATALOG_VERSION = exports.WatchVideoPlayer = exports.WatchAudioPlayer = exports.ViewWidget = exports.ViewWeather = exports.ViewVideoPlayer = exports.ViewVideoAd = exports.ViewVideo = exports.ViewUIElement = exports.ViewTitle = exports.ViewTeaser = exports.ViewPage = exports.ViewOffer = exports.ViewNotificationFlat = exports.ViewNotification = exports.ViewLockedVideo = exports.ViewLockedAudio = exports.ViewLockedArticle = exports.ViewListing = exports.ViewLandingpage = exports.ViewFrontpage = exports.ViewForm = exports.ViewError = exports.ViewAudioPlayer = exports.ViewAudio = exports.ViewArticle = exports.ViewAdSlot = exports.LeaveWeather = exports.LeaveVideo = exports.LeaveTitle = exports.LeavePage = exports.LeaveLockedVideo = exports.LeaveLockedAudio = exports.LeaveLockedArticle = exports.LeaveListing = exports.LeaveLandingpage = exports.LeaveFrontpage = exports.LeaveError = exports.LeaveAudio = exports.LeaveArticle = exports.InternalProbe = exports.EngagementWidget = exports.EngagementVideoPlayer = exports.EngagementUIElement = exports.EngagementTeaser = exports.EngagementOffer = exports.EngagementNotification = exports.EngagementForm = exports.EngagementAudioPlayer = void 0;
4
+ exports.EngagementAudioPlayer = {
5
+ object: {
6
+ type: 'AudioPlayer',
7
+ },
8
+ type: 'Engagement',
9
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/EngagementAudioPlayer.json',
10
+ };
11
+ exports.EngagementForm = {
12
+ object: {
13
+ type: 'Form',
14
+ },
15
+ type: 'Engagement',
16
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/EngagementForm.json',
17
+ };
18
+ exports.EngagementNotification = {
19
+ object: {
20
+ type: 'Notification',
21
+ },
22
+ type: 'Engagement',
23
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/EngagementNotification.json',
24
+ };
25
+ exports.EngagementOffer = {
26
+ object: {
27
+ type: 'Offer',
28
+ },
29
+ type: 'Engagement',
30
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/EngagementOffer.json',
31
+ };
32
+ exports.EngagementTeaser = {
33
+ object: {
34
+ type: 'Teaser',
35
+ },
36
+ type: 'Engagement',
37
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/EngagementTeaser.json',
38
+ };
39
+ exports.EngagementUIElement = {
40
+ object: {
41
+ type: 'UIElement',
42
+ },
43
+ type: 'Engagement',
44
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/EngagementUIElement.json',
45
+ };
46
+ exports.EngagementVideoPlayer = {
47
+ object: {
48
+ type: 'VideoPlayer',
49
+ },
50
+ type: 'Engagement',
51
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/EngagementVideoPlayer.json',
52
+ };
53
+ exports.EngagementWidget = {
54
+ object: {
55
+ type: 'Widget',
56
+ },
57
+ type: 'Engagement',
58
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/EngagementWidget.json',
59
+ };
60
+ exports.InternalProbe = {
61
+ object: {
62
+ type: 'Probe',
63
+ },
64
+ type: 'Internal',
65
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/InternalProbe.json',
66
+ };
67
+ exports.LeaveArticle = {
68
+ object: {
69
+ type: 'Article',
70
+ },
71
+ type: 'Leave',
72
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/LeaveArticle.json',
73
+ };
74
+ exports.LeaveAudio = {
75
+ object: {
76
+ type: 'Audio',
77
+ },
78
+ type: 'Leave',
79
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/LeaveAudio.json',
80
+ };
81
+ exports.LeaveError = {
82
+ object: {
83
+ type: 'Error',
84
+ },
85
+ type: 'Leave',
86
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/LeaveError.json',
87
+ };
88
+ exports.LeaveFrontpage = {
89
+ object: {
90
+ type: 'Frontpage',
91
+ },
92
+ type: 'Leave',
93
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/LeaveFrontpage.json',
94
+ };
95
+ exports.LeaveLandingpage = {
96
+ object: {
97
+ type: 'Landingpage',
98
+ },
99
+ type: 'Leave',
100
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/LeaveLandingpage.json',
101
+ };
102
+ exports.LeaveListing = {
103
+ object: {
104
+ type: 'Listing',
105
+ },
106
+ type: 'Leave',
107
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/LeaveListing.json',
108
+ };
109
+ exports.LeaveLockedArticle = {
110
+ object: {
111
+ type: 'LockedArticle',
112
+ },
113
+ type: 'Leave',
114
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/LeaveLockedArticle.json',
115
+ };
116
+ exports.LeaveLockedAudio = {
117
+ object: {
118
+ type: 'LockedAudio',
119
+ },
120
+ type: 'Leave',
121
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/LeaveLockedAudio.json',
122
+ };
123
+ exports.LeaveLockedVideo = {
124
+ object: {
125
+ type: 'LockedVideo',
126
+ },
127
+ type: 'Leave',
128
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/LeaveLockedVideo.json',
129
+ };
130
+ exports.LeavePage = {
131
+ object: {
132
+ type: 'Page',
133
+ },
134
+ type: 'Leave',
135
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/LeavePage.json',
136
+ };
137
+ exports.LeaveTitle = {
138
+ object: {
139
+ type: 'Title',
140
+ },
141
+ type: 'Leave',
142
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/LeaveTitle.json',
143
+ };
144
+ exports.LeaveVideo = {
145
+ object: {
146
+ type: 'Video',
147
+ },
148
+ type: 'Leave',
149
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/LeaveVideo.json',
150
+ };
151
+ exports.LeaveWeather = {
152
+ object: {
153
+ type: 'Weather',
154
+ },
155
+ type: 'Leave',
156
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/LeaveWeather.json',
157
+ };
158
+ exports.ViewAdSlot = {
159
+ object: {
160
+ type: 'AdSlot',
161
+ },
162
+ type: 'View',
163
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewAdSlot.json',
164
+ };
165
+ exports.ViewArticle = {
166
+ object: {
167
+ type: 'Article',
168
+ },
169
+ type: 'View',
170
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewArticle.json',
171
+ };
172
+ exports.ViewAudio = {
173
+ object: {
174
+ type: 'Audio',
175
+ },
176
+ type: 'View',
177
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewAudio.json',
178
+ };
179
+ exports.ViewAudioPlayer = {
180
+ object: {
181
+ type: 'AudioPlayer',
182
+ },
183
+ type: 'View',
184
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewAudioPlayer.json',
185
+ };
186
+ exports.ViewError = {
187
+ object: {
188
+ type: 'Error',
189
+ },
190
+ type: 'View',
191
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewError.json',
192
+ };
193
+ exports.ViewForm = {
194
+ object: {
195
+ type: 'Form',
196
+ },
197
+ type: 'View',
198
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewForm.json',
199
+ };
200
+ exports.ViewFrontpage = {
201
+ object: {
202
+ type: 'Frontpage',
203
+ },
204
+ type: 'View',
205
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewFrontpage.json',
206
+ };
207
+ exports.ViewLandingpage = {
208
+ object: {
209
+ type: 'Landingpage',
210
+ },
211
+ type: 'View',
212
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewLandingpage.json',
213
+ };
214
+ exports.ViewListing = {
215
+ object: {
216
+ type: 'Listing',
217
+ },
218
+ type: 'View',
219
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewListing.json',
220
+ };
221
+ exports.ViewLockedArticle = {
222
+ object: {
223
+ type: 'LockedArticle',
224
+ },
225
+ type: 'View',
226
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewLockedArticle.json',
227
+ };
228
+ exports.ViewLockedAudio = {
229
+ object: {
230
+ type: 'LockedAudio',
231
+ },
232
+ type: 'View',
233
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewLockedAudio.json',
234
+ };
235
+ exports.ViewLockedVideo = {
236
+ object: {
237
+ type: 'LockedVideo',
238
+ },
239
+ type: 'View',
240
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewLockedVideo.json',
241
+ };
242
+ exports.ViewNotification = {
243
+ object: {
244
+ name: 'PushNotification',
245
+ type: 'Notification',
246
+ },
247
+ type: 'View',
248
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewNotification.json',
249
+ };
250
+ exports.ViewNotificationFlat = {
251
+ 'object.name': 'PushNotification',
252
+ 'object.type': 'Notification',
253
+ type: 'View',
254
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewNotification.json',
255
+ };
256
+ exports.ViewOffer = {
257
+ object: {
258
+ type: 'Offer',
259
+ },
260
+ type: 'View',
261
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewOffer.json',
262
+ };
263
+ exports.ViewPage = {
264
+ object: {
265
+ type: 'Page',
266
+ },
267
+ type: 'View',
268
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewPage.json',
269
+ };
270
+ exports.ViewTeaser = {
271
+ object: {
272
+ type: 'Teaser',
273
+ },
274
+ type: 'View',
275
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewTeaser.json',
276
+ };
277
+ exports.ViewTitle = {
278
+ object: {
279
+ type: 'Title',
280
+ },
281
+ type: 'View',
282
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewTitle.json',
283
+ };
284
+ exports.ViewUIElement = {
285
+ object: {
286
+ type: 'UIElement',
287
+ },
288
+ type: 'View',
289
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewUIElement.json',
290
+ };
291
+ exports.ViewVideo = {
292
+ object: {
293
+ type: 'Video',
294
+ },
295
+ type: 'View',
296
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewVideo.json',
297
+ };
298
+ exports.ViewVideoAd = {
299
+ object: {
300
+ type: 'VideoAd',
301
+ },
302
+ type: 'View',
303
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewVideoAd.json',
304
+ };
305
+ exports.ViewVideoPlayer = {
306
+ object: {
307
+ type: 'VideoPlayer',
308
+ },
309
+ type: 'View',
310
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewVideoPlayer.json',
311
+ };
312
+ exports.ViewWeather = {
313
+ object: {
314
+ type: 'Weather',
315
+ },
316
+ type: 'View',
317
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewWeather.json',
318
+ };
319
+ exports.ViewWidget = {
320
+ object: {
321
+ type: 'Widget',
322
+ },
323
+ type: 'View',
324
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/ViewWidget.json',
325
+ };
326
+ exports.WatchAudioPlayer = {
327
+ object: {
328
+ type: 'AudioPlayer',
329
+ },
330
+ type: 'Watch',
331
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/WatchAudioPlayer.json',
332
+ };
333
+ exports.WatchVideoPlayer = {
334
+ object: {
335
+ type: 'VideoPlayer',
336
+ },
337
+ type: 'Watch',
338
+ schema: 'https://tpaas-schemas.schibsted.media/catalogs/versions/1.0.11/schemas/WatchVideoPlayer.json',
339
+ };
340
+ exports.CATALOG_VERSION = '1.0.11';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./constants"), exports);