@guardian/ophan-tracker-js 4.0.2 → 5.0.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 (210) hide show
  1. package/NPM-dist/adblock-detection.js +17 -11
  2. package/NPM-dist/adblock-detection.js.map +1 -0
  3. package/NPM-dist/attention.js +32 -19
  4. package/NPM-dist/attention.js.map +1 -0
  5. package/NPM-dist/campaign.js +6 -2
  6. package/NPM-dist/campaign.js.map +1 -0
  7. package/NPM-dist/click-path-capture.js +5 -2
  8. package/NPM-dist/click-path-capture.js.map +1 -0
  9. package/NPM-dist/components.js +1 -0
  10. package/NPM-dist/components.js.map +1 -0
  11. package/NPM-dist/contribution.js +1 -0
  12. package/NPM-dist/contribution.js.map +1 -0
  13. package/NPM-dist/core.js +40 -10
  14. package/NPM-dist/core.js.map +1 -0
  15. package/NPM-dist/embed.js +1 -0
  16. package/NPM-dist/embed.js.map +1 -0
  17. package/NPM-dist/fb-instant.js +1 -0
  18. package/NPM-dist/fb-instant.js.map +1 -0
  19. package/NPM-dist/heatmap.js +4 -0
  20. package/NPM-dist/heatmap.js.map +1 -0
  21. package/NPM-dist/holidays.js +1 -0
  22. package/NPM-dist/holidays.js.map +1 -0
  23. package/NPM-dist/http-status.js +1 -0
  24. package/NPM-dist/http-status.js.map +1 -0
  25. package/NPM-dist/iframe-tracking.js +16 -3
  26. package/NPM-dist/iframe-tracking.js.map +1 -0
  27. package/NPM-dist/index.js +285 -0
  28. package/NPM-dist/index.js.map +1 -0
  29. package/NPM-dist/interactive.js +1 -0
  30. package/NPM-dist/interactive.js.map +1 -0
  31. package/NPM-dist/jobs-courses.js +1 -0
  32. package/NPM-dist/jobs-courses.js.map +1 -0
  33. package/NPM-dist/jobs.js +1 -0
  34. package/NPM-dist/jobs.js.map +1 -0
  35. package/NPM-dist/membership.js +1 -0
  36. package/NPM-dist/membership.js.map +1 -0
  37. package/NPM-dist/ng.js +10 -33
  38. package/NPM-dist/ng.js.map +1 -0
  39. package/NPM-dist/perf.js +3 -2
  40. package/NPM-dist/perf.js.map +1 -0
  41. package/NPM-dist/privatebrowsing.js +1 -0
  42. package/NPM-dist/privatebrowsing.js.map +1 -0
  43. package/NPM-dist/r2.js +8 -4
  44. package/NPM-dist/r2.js.map +1 -0
  45. package/NPM-dist/smart-news.js +10 -3
  46. package/NPM-dist/smart-news.js.map +1 -0
  47. package/NPM-dist/tests/attention.test.js +1 -0
  48. package/NPM-dist/tests/attention.test.js.map +1 -0
  49. package/NPM-dist/tests/click-path-capture.test.js +1 -0
  50. package/NPM-dist/tests/click-path-capture.test.js.map +1 -0
  51. package/NPM-dist/tests/components.test.js +1 -0
  52. package/NPM-dist/tests/components.test.js.map +1 -0
  53. package/NPM-dist/tests/core.test.js +1 -0
  54. package/NPM-dist/tests/core.test.js.map +1 -0
  55. package/NPM-dist/tests/heatmap.test.js +1 -0
  56. package/NPM-dist/tests/heatmap.test.js.map +1 -0
  57. package/NPM-dist/tests/index.test.js +18 -0
  58. package/NPM-dist/tests/index.test.js.map +1 -0
  59. package/NPM-dist/tests/transmit.test.js +1 -0
  60. package/NPM-dist/tests/transmit.test.js.map +1 -0
  61. package/NPM-dist/transmit.js +23 -5
  62. package/NPM-dist/transmit.js.map +1 -0
  63. package/NPM-dist/types/abtest.js +1 -0
  64. package/NPM-dist/types/abtest.js.map +1 -0
  65. package/NPM-dist/types/adblock-detection.d.ts +1 -0
  66. package/NPM-dist/types/adblock-detection.d.ts.map +1 -0
  67. package/NPM-dist/types/attention.d.ts +1 -0
  68. package/NPM-dist/types/attention.d.ts.map +1 -0
  69. package/NPM-dist/types/campaign.d.ts +1 -0
  70. package/NPM-dist/types/campaign.d.ts.map +1 -0
  71. package/NPM-dist/types/click-path-capture.d.ts +1 -0
  72. package/NPM-dist/types/click-path-capture.d.ts.map +1 -0
  73. package/NPM-dist/types/component-event.js +1 -0
  74. package/NPM-dist/types/component-event.js.map +1 -0
  75. package/NPM-dist/types/component-type.js +1 -0
  76. package/NPM-dist/types/component-type.js.map +1 -0
  77. package/NPM-dist/types/components.d.ts +1 -0
  78. package/NPM-dist/types/components.d.ts.map +1 -0
  79. package/NPM-dist/types/consent.js +1 -0
  80. package/NPM-dist/types/consent.js.map +1 -0
  81. package/NPM-dist/types/contribution.d.ts +2 -1
  82. package/NPM-dist/types/contribution.d.ts.map +1 -0
  83. package/NPM-dist/types/core.d.ts +1 -0
  84. package/NPM-dist/types/core.d.ts.map +1 -0
  85. package/NPM-dist/types/embed.d.ts +2 -1
  86. package/NPM-dist/types/embed.d.ts.map +1 -0
  87. package/NPM-dist/types/event.js +1 -0
  88. package/NPM-dist/types/event.js.map +1 -0
  89. package/NPM-dist/types/fb-instant.d.ts +1 -0
  90. package/NPM-dist/types/fb-instant.d.ts.map +1 -0
  91. package/NPM-dist/types/heatmap.d.ts +1 -0
  92. package/NPM-dist/types/heatmap.d.ts.map +1 -0
  93. package/NPM-dist/types/holidays.d.ts +2 -1
  94. package/NPM-dist/types/holidays.d.ts.map +1 -0
  95. package/NPM-dist/types/http-status.d.ts +1 -0
  96. package/NPM-dist/types/http-status.d.ts.map +1 -0
  97. package/NPM-dist/types/iframe-tracking.d.ts +1 -0
  98. package/NPM-dist/types/iframe-tracking.d.ts.map +1 -0
  99. package/NPM-dist/types/index.d.ts +199 -0
  100. package/NPM-dist/types/index.d.ts.map +1 -0
  101. package/NPM-dist/types/inpageclick.js +1 -0
  102. package/NPM-dist/types/inpageclick.js.map +1 -0
  103. package/NPM-dist/types/interaction.js +1 -0
  104. package/NPM-dist/types/interaction.js.map +1 -0
  105. package/NPM-dist/types/interactive.d.ts +1 -0
  106. package/NPM-dist/types/interactive.d.ts.map +1 -0
  107. package/NPM-dist/types/jobs-courses.d.ts +2 -1
  108. package/NPM-dist/types/jobs-courses.d.ts.map +1 -0
  109. package/NPM-dist/types/jobs.d.ts +2 -1
  110. package/NPM-dist/types/jobs.d.ts.map +1 -0
  111. package/NPM-dist/types/link.js +1 -0
  112. package/NPM-dist/types/link.js.map +1 -0
  113. package/NPM-dist/types/media.js +1 -0
  114. package/NPM-dist/types/media.js.map +1 -0
  115. package/NPM-dist/types/membership.d.ts +2 -1
  116. package/NPM-dist/types/membership.d.ts.map +1 -0
  117. package/NPM-dist/types/ng.d.ts +2 -13
  118. package/NPM-dist/types/ng.d.ts.map +1 -0
  119. package/NPM-dist/types/perf.d.ts +2 -1
  120. package/NPM-dist/types/perf.d.ts.map +1 -0
  121. package/NPM-dist/types/platform.js +1 -0
  122. package/NPM-dist/types/platform.js.map +1 -0
  123. package/NPM-dist/types/printproduct.js +1 -0
  124. package/NPM-dist/types/printproduct.js.map +1 -0
  125. package/NPM-dist/types/privatebrowsing.d.ts +1 -0
  126. package/NPM-dist/types/privatebrowsing.d.ts.map +1 -0
  127. package/NPM-dist/types/product.js +1 -0
  128. package/NPM-dist/types/product.js.map +1 -0
  129. package/NPM-dist/types/r2.d.ts +1 -0
  130. package/NPM-dist/types/r2.d.ts.map +1 -0
  131. package/NPM-dist/types/smart-news.d.ts +2 -1
  132. package/NPM-dist/types/smart-news.d.ts.map +1 -0
  133. package/NPM-dist/types/subscription.js +1 -0
  134. package/NPM-dist/types/subscription.js.map +1 -0
  135. package/NPM-dist/types/tests/attention.test.d.ts +1 -0
  136. package/NPM-dist/types/tests/attention.test.d.ts.map +1 -0
  137. package/NPM-dist/types/tests/click-path-capture.test.d.ts +1 -0
  138. package/NPM-dist/types/tests/click-path-capture.test.d.ts.map +1 -0
  139. package/NPM-dist/types/tests/components.test.d.ts +1 -0
  140. package/NPM-dist/types/tests/components.test.d.ts.map +1 -0
  141. package/NPM-dist/types/tests/core.test.d.ts +1 -0
  142. package/NPM-dist/types/tests/core.test.d.ts.map +1 -0
  143. package/NPM-dist/types/tests/heatmap.test.d.ts +1 -0
  144. package/NPM-dist/types/tests/heatmap.test.d.ts.map +1 -0
  145. package/NPM-dist/types/tests/index.test.d.ts +2 -0
  146. package/NPM-dist/types/tests/index.test.d.ts.map +1 -0
  147. package/NPM-dist/types/tests/transmit.test.d.ts +1 -0
  148. package/NPM-dist/types/tests/transmit.test.d.ts.map +1 -0
  149. package/NPM-dist/types/transmit.d.ts +1 -0
  150. package/NPM-dist/types/transmit.d.ts.map +1 -0
  151. package/NPM-dist/types/types/abtest.d.ts +1 -0
  152. package/NPM-dist/types/types/abtest.d.ts.map +1 -0
  153. package/NPM-dist/types/types/component-event.d.ts +15 -0
  154. package/NPM-dist/types/types/component-event.d.ts.map +1 -0
  155. package/NPM-dist/types/types/component-type.d.ts +7 -0
  156. package/NPM-dist/types/types/component-type.d.ts.map +1 -0
  157. package/NPM-dist/types/types/consent.d.ts +1 -0
  158. package/NPM-dist/types/types/consent.d.ts.map +1 -0
  159. package/NPM-dist/types/types/event.d.ts +11 -0
  160. package/NPM-dist/types/types/event.d.ts.map +1 -0
  161. package/NPM-dist/types/types/inpageclick.d.ts +1 -0
  162. package/NPM-dist/types/types/inpageclick.d.ts.map +1 -0
  163. package/NPM-dist/types/types/interaction.d.ts +1 -0
  164. package/NPM-dist/types/types/interaction.d.ts.map +1 -0
  165. package/NPM-dist/types/types/link.d.ts +1 -0
  166. package/NPM-dist/types/types/link.d.ts.map +1 -0
  167. package/NPM-dist/types/types/media.d.ts +1 -0
  168. package/NPM-dist/types/types/media.d.ts.map +1 -0
  169. package/NPM-dist/types/types/platform.d.ts +1 -0
  170. package/NPM-dist/types/types/platform.d.ts.map +1 -0
  171. package/NPM-dist/types/types/printproduct.d.ts +1 -0
  172. package/NPM-dist/types/types/printproduct.d.ts.map +1 -0
  173. package/NPM-dist/types/types/product.d.ts +7 -0
  174. package/NPM-dist/types/types/product.d.ts.map +1 -0
  175. package/NPM-dist/types/types/subscription.d.ts +1 -0
  176. package/NPM-dist/types/types/subscription.d.ts.map +1 -0
  177. package/NPM-dist/types/vendor/adBlockDetectionLib.d.ts +3 -1
  178. package/NPM-dist/types/vendor/adBlockDetectionLib.d.ts.map +1 -0
  179. package/NPM-dist/types/visibility.d.ts +2 -1
  180. package/NPM-dist/types/visibility.d.ts.map +1 -0
  181. package/NPM-dist/types/witness.d.ts +2 -1
  182. package/NPM-dist/types/witness.d.ts.map +1 -0
  183. package/NPM-dist/vendor/adBlockDetectionLib.js +19 -6
  184. package/NPM-dist/vendor/adBlockDetectionLib.js.map +1 -0
  185. package/NPM-dist/visibility.js +14 -5
  186. package/NPM-dist/visibility.js.map +1 -0
  187. package/NPM-dist/witness.js +1 -0
  188. package/NPM-dist/witness.js.map +1 -0
  189. package/package.json +12 -26
  190. package/readme.md +112 -53
  191. package/src/index.ts +360 -0
  192. package/src/ng.ts +33 -0
  193. package/src/transmit.ts +176 -0
  194. package/src/types/abtest.ts +45 -0
  195. package/src/types/component-event.ts +121 -0
  196. package/src/types/component-type.ts +70 -0
  197. package/src/types/consent.ts +49 -0
  198. package/src/types/event.ts +116 -0
  199. package/src/types/inpageclick.ts +13 -0
  200. package/src/types/interaction.ts +19 -0
  201. package/src/types/link.ts +14 -0
  202. package/src/types/media.ts +184 -0
  203. package/src/types/platform.ts +32 -0
  204. package/src/types/printproduct.ts +53 -0
  205. package/src/types/product.ts +72 -0
  206. package/src/types/subscription.ts +70 -0
  207. package/NPM-dist/manage-my-account.js +0 -46
  208. package/NPM-dist/support.js +0 -45
  209. package/NPM-dist/types/manage-my-account.d.ts +0 -28
  210. package/NPM-dist/types/support.d.ts +0 -28
@@ -0,0 +1,184 @@
1
+ export type TVideoEventType =
2
+ /**
3
+ * The media has been requested.
4
+ * Currently, it appears this event is only received for pre-roll videos.
5
+ */
6
+ | "video:content:request"
7
+
8
+ /**
9
+ * The media is ready to play.
10
+ */
11
+ | "video:content:ready"
12
+
13
+ /**
14
+ * The media has started playing.
15
+ */
16
+ | "video:content:play"
17
+
18
+ /**
19
+ * The media has played a quarter of the way through.
20
+ * Currently, it appears that pre-roll videos do not send this event.
21
+ */
22
+ | "video:content:25"
23
+
24
+ /**
25
+ * The media has played half way though.
26
+ * Currently, it appears that pre-roll videos do not send this event.
27
+ */
28
+ | "video:content:50"
29
+
30
+ /**
31
+ * The media has played three quarters of the way though.
32
+ * Currently, it appears that pre-roll videos do not send this event.
33
+ */
34
+ | "video:content:75"
35
+
36
+ /**
37
+ * The media has played to the end.
38
+ * NB: "END" is a reserved word in thrift apparently
39
+ */
40
+ | "video:content:end"
41
+
42
+ /**
43
+ * The media has been paused before the end.
44
+ **/
45
+ | "video:content:pause"
46
+
47
+ /**
48
+ * The media player has resumed playing from a paused state.
49
+ **/
50
+ | "video:content:resume"
51
+ | "video:content:skip"
52
+ | "video:content:cued"
53
+
54
+ /**
55
+ * The media has been muted.
56
+ */
57
+ | "video:content:mute"
58
+
59
+ /**
60
+ * The media has been unmuted.
61
+ */
62
+ | "video:content:unmute"
63
+
64
+ /**
65
+ * The media has been displayed in fullscreen mode.
66
+ */
67
+ | "video:content:enter_fullscreen"
68
+
69
+ /**
70
+ * The media has left fullscreen mode.
71
+ */
72
+ | "video:content:exit_fullscreen"
73
+
74
+ /**
75
+ * The media player has been displayed on the screen.
76
+ * This is separate to the media being played, but may coincide if the player autoplays.
77
+ */
78
+ | "video:content:view";
79
+
80
+ /**
81
+ * Details about media playback progress
82
+ * Note: currently only guardian-hosted videos are reported.
83
+ */
84
+ export interface AudioEvent {
85
+ /**
86
+ * The id of the media asset, e.g. gu-audio-454297906
87
+ * This matches up with the media id within the content api.
88
+ */
89
+ id: string;
90
+
91
+ /**
92
+ * The event type.
93
+ */
94
+ eventType: TAudioEventType;
95
+ }
96
+
97
+ export type TAudioEventType =
98
+ /**
99
+ * The media has been requested.
100
+ * Currently, it appears this event is only received for pre-roll videos.
101
+ */
102
+ | "audio:content:request"
103
+
104
+ /**
105
+ * The media is ready to play.
106
+ */
107
+ | "audio:content:ready"
108
+
109
+ /**
110
+ * The media has started playing.
111
+ */
112
+ | "audio:content:play"
113
+
114
+ /**
115
+ * The media has played a quarter of the way through.
116
+ * Currently, it appears that pre-roll videos do not send this event.
117
+ */
118
+ | "audio:content:25"
119
+
120
+ /**
121
+ * The media has played half way though.
122
+ * Currently, it appears that pre-roll videos do not send this event.
123
+ */
124
+ | "audio:content:50"
125
+
126
+ /**
127
+ * The media has played three quarters of the way though.
128
+ * Currently, it appears that pre-roll videos do not send this event.
129
+ */
130
+ | "audio:content:75"
131
+
132
+ /**
133
+ * The media has played to the end.
134
+ * NB: "END" is a reserved word in thrift apparently
135
+ */
136
+ | "audio:content:end"
137
+
138
+ /**
139
+ * The media has been paused before the end.
140
+ **/
141
+ | "audio:content:pause"
142
+
143
+ /**
144
+ * The media has been muted.
145
+ */
146
+ | "audio:content:mute"
147
+
148
+ /**
149
+ * The media has been unmuted.
150
+ */
151
+ | "audio:content:unmute"
152
+
153
+ /**
154
+ * The media has been displayed in fullscreen mode.
155
+ */
156
+ | "audio:content:enter_fullscreen"
157
+
158
+ /**
159
+ * The media has left fullscreen mode.
160
+ */
161
+ | "audio:content:exit_fullscreen"
162
+
163
+ /**
164
+ * The media player has been displayed on the screen.
165
+ * This is separate to the media being played, but may coincide if the player autoplays.
166
+ */
167
+ | "audio:content:view";
168
+
169
+ /**
170
+ * Details about media playback progress
171
+ * Note: currently only guardian-hosted videos are reported.
172
+ */
173
+ export interface VideoEvent {
174
+ /**
175
+ * The id of the media asset, e.g. gu-video-454297906
176
+ * This matches up with the media id within the content api.
177
+ */
178
+ id: string;
179
+
180
+ /**
181
+ * The event type.
182
+ */
183
+ eventType: TVideoEventType;
184
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The platform that served this request to the reader.
3
+ **/
4
+ export type TPlatform =
5
+ | "r2"
6
+ | "next-gen"
7
+ | "ios-native-app"
8
+ | "android-native-app"
9
+ /**
10
+ * Served as a result of embedding a media item on a third party site.
11
+ * Note therefore you should not typically include this as a guardian
12
+ * "page view".
13
+ **/
14
+ | "embed"
15
+ | "membership"
16
+ | "facebook-instant-article"
17
+ /* https://www.ampproject.org/ */
18
+ | "amp"
19
+ | "witness"
20
+ | "jobs"
21
+ | "contribution"
22
+ | "yahoo"
23
+ | "amazon-echo"
24
+ | "apple-news"
25
+ | "windows-native-app"
26
+ | "scribd"
27
+ | "support"
28
+ | "subscribe"
29
+ | "manage-my-account"
30
+ | "smart-news"
31
+ /* also called "The Daily Edition" and other names */
32
+ | "editions";
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Differentiates between the (many) different types of print product
3
+ **/
4
+ export type TPrintProduct =
5
+ | "voucher-saturday"
6
+ | "voucher-saturday-plus"
7
+ | "voucher-weekly-and-saturday"
8
+ | "voucher-weekly-and-saturday-plus"
9
+ | "voucher-sunday"
10
+ | "voucher-sunday-plus"
11
+ /**
12
+ * DEPRECATED DO NOT USE
13
+ * This enum has a spelling mistake. Use VOUCHER_WEEKEND (27) instead
14
+ **/
15
+ | "voucher-weekend" // Original: VOUCER_WEEKEND - Corrected spelling and adapted to TS syntax
16
+ /**
17
+ * DEPRECATED DO NOT USE
18
+ * This enum has a spelling mistake. Use VOUCHER_WEEKEND_PLUS (28) instead
19
+ **/
20
+ | "voucher-weekend-plus" // Original: VOUCER_WEEKEND_PLUS - Corrected spelling and adapted to TS syntax
21
+ | "voucher-sixday"
22
+ | "voucher-sixday-plus"
23
+ | "voucher-everyday"
24
+ | "voucher-everyday-plus"
25
+ | "home-delivery-saturday"
26
+ | "home-delivery-saturday-plus"
27
+ | "home-delivery-weekly-and-saturday"
28
+ | "home-delivery-weekly-and-saturday-plus"
29
+ | "home-delivery-sunday"
30
+ | "home-delivery-sunday-plus"
31
+ | "home-delivery-weekend"
32
+ | "home-delivery-weekend-plus"
33
+ | "home-delivery-sixday"
34
+ | "home-delivery-sixday-plus"
35
+ | "home-delivery-everyday"
36
+ | "home-delivery-everyday-plus"
37
+ | "guardian-weekly"
38
+ | "guardian-weekly-plus";
39
+
40
+ /**
41
+ * Extra parameters only applicable to print products
42
+ */
43
+ export interface PrintOptions {
44
+ /**
45
+ * Differentiates between the (many) different types of print product
46
+ */
47
+ product: TPrintProduct;
48
+
49
+ /**
50
+ * The delivery country of the print subscription
51
+ */
52
+ deliveryCountryCode: string;
53
+ }
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Guardian product associated with an acquisition or subscription component.
3
+ *
4
+ * Product values are intentionally constrained because they are used for
5
+ * downstream reporting. Additions should be coordinated with the Ophan model.
6
+ */
7
+ export type Product =
8
+ /**
9
+ * A one-off contribution
10
+ */
11
+ | "CONTRIBUTION"
12
+
13
+ /**
14
+ * A recurring contribution
15
+ */
16
+ | "RECURRING_CONTRIBUTION"
17
+
18
+ /**
19
+ * A Membership Supporter signup
20
+ */
21
+ | "MEMBERSHIP_SUPPORTER"
22
+
23
+ /**
24
+ * A Membership Patron signup
25
+ */
26
+ | "MEMBERSHIP_PATRON"
27
+
28
+ /**
29
+ * A Membership Partner signup
30
+ */
31
+ | "MEMBERSHIP_PARTNER"
32
+
33
+ /**
34
+ * A digital subscription
35
+ */
36
+ | "DIGITAL_SUBSCRIPTION"
37
+
38
+ /**
39
+ * DEPRECATED DO NOT USE
40
+ */
41
+ | "PAPER_SUBSCRIPTION_EVERYDAY"
42
+
43
+ /**
44
+ * DEPRECATED DO NOT USE
45
+ */
46
+ | "PAPER_SUBSCRIPTION_SIXDAY"
47
+
48
+ /**
49
+ * DEPRECATED DO NOT USE
50
+ */
51
+ | "PAPER_SUBSCRIPTION_WEEKEND"
52
+
53
+ /**
54
+ * DEPRECATED DO NOT USE
55
+ */
56
+ | "PAPER_SUBSCRIPTION_SUNDAY"
57
+
58
+ /**
59
+ * A paper subscription
60
+ */
61
+ | "PRINT_SUBSCRIPTION"
62
+
63
+ /**
64
+ * An app premium tier signup
65
+ */
66
+ | "APP_PREMIUM_TIER"
67
+
68
+ /**
69
+ * Supporter plus tier.
70
+ */
71
+ | "GUARDIAN_PATRON"
72
+ | "SUPPORTER_PLUS";
@@ -0,0 +1,70 @@
1
+ /**
2
+ * What type of subscription the user has (or had) for the app
3
+ */
4
+ export type TSubscriptionType =
5
+ /**
6
+ * No subscription in place, and no previous record of a subscription on this device.
7
+ */
8
+ | 1 // FREE
9
+
10
+ /**
11
+ * User has an active subscription via the device's store.
12
+ *
13
+ * In json, "play" or "apple" are supported as synonyms of this value.
14
+ */
15
+ | 2 // STORE
16
+
17
+ /**
18
+ * User has an active subscription as part of a print bundle.
19
+ */
20
+ | 4 // PRINT
21
+
22
+ /**
23
+ * No subscription in place, but user did previously have a subscription via the
24
+ * device's store which is now expired.
25
+ *
26
+ * In json, "play:expired" and "apple:expired" are supported as synonyms of this value.
27
+ */
28
+ | 3 // FREE_WITH_EXPIRED_STORE
29
+
30
+ /**
31
+ * No subscription in place, but user did previously have a subscription as
32
+ * part of a print bundle which is now expired.
33
+ *
34
+ * In json, "print:expired" is supported as a synonym of this value.
35
+ */
36
+ | 5 // FREE_WITH_EXPIRED_PRINT
37
+
38
+ /**
39
+ * User has an active digital pack subscription.
40
+ */
41
+ | 6; // DIGITAL_PACK
42
+
43
+ /**
44
+ * What tier of membership the user is currently part of.
45
+ */
46
+ export type TMembershipTier =
47
+ /**
48
+ * The user is a friend.
49
+ */
50
+ | 1 // FRIEND
51
+
52
+ /**
53
+ * The user is a Guardian employee.
54
+ */
55
+ | 2 // STAFF
56
+
57
+ /**
58
+ * The user is a supporter.
59
+ */
60
+ | 3 // SUPPORTER
61
+
62
+ /**
63
+ * The user is a partner.
64
+ */
65
+ | 4 // PARTNER
66
+
67
+ /**
68
+ * The user is a patron.
69
+ */
70
+ | 5; // PATRON
@@ -1,46 +0,0 @@
1
- // Generated by CoffeeScript 2.7.0
2
- import core from './core.js';
3
- import transmit from './transmit.js';
4
- import attention from './attention.js';
5
- import visibility from './visibility.js';
6
- import './click-path-capture.js';
7
- import './perf.js';
8
- import './campaign.js';
9
- export const init = () => {
10
- core.init('manage-my-account');
11
- if (window.addEventListener) {
12
- attention.init(visibility);
13
- }
14
- };
15
- export const sendInitialEvent = (url = location.href, referrer = document.referrer) => {
16
- try {
17
- transmit.bumpViewId();
18
- core.sendInitialEvent(null, url, referrer);
19
- }
20
- catch (error) {
21
- console.log(error);
22
- }
23
- };
24
- const exports = {
25
- init,
26
- sendInitialEvent,
27
- record: transmit.sendMore,
28
- get viewId() { return transmit.viewId; },
29
- };
30
- export default exports;
31
- // Named exports for convenience
32
- export const record = exports.record;
33
- export const viewId = exports.viewId;
34
- // Type exports
35
- export * from './types/abtest.js';
36
- export * from './types/subscription.js';
37
- export * from './types/interaction.js';
38
- export * from './types/inpageclick.js';
39
- export * from './types/printproduct.js';
40
- export * from './types/product.js';
41
- export * from './types/platform.js';
42
- export * from './types/media.js';
43
- export * from './types/consent.js';
44
- export * from './types/component-type.js';
45
- export * from './types/component-event.js';
46
- export * from './types/event.js';
@@ -1,45 +0,0 @@
1
- import core from './core.js';
2
- import transmit from './transmit.js';
3
- import attention from './attention.js';
4
- import visibility from './visibility.js';
5
- import './click-path-capture.js';
6
- import './perf.js';
7
- import './campaign.js';
8
- export const init = () => {
9
- core.init('support');
10
- if (window.addEventListener) {
11
- attention.init(visibility);
12
- }
13
- };
14
- export const sendInitialEvent = (url = location.href, referrer = document.referrer) => {
15
- try {
16
- transmit.bumpViewId();
17
- core.sendInitialEvent(null, url, referrer);
18
- }
19
- catch (error) {
20
- console.log(error);
21
- }
22
- };
23
- const supportExports = {
24
- init,
25
- sendInitialEvent,
26
- record: transmit.sendMore,
27
- get viewId() { return transmit.viewId; },
28
- };
29
- export default supportExports;
30
- // Named exports for convenience
31
- export const record = supportExports.record;
32
- export const viewId = supportExports.viewId;
33
- // Type exports
34
- export * from './types/abtest.js';
35
- export * from './types/subscription.js';
36
- export * from './types/interaction.js';
37
- export * from './types/inpageclick.js';
38
- export * from './types/printproduct.js';
39
- export * from './types/product.js';
40
- export * from './types/platform.js';
41
- export * from './types/media.js';
42
- export * from './types/consent.js';
43
- export * from './types/component-type.js';
44
- export * from './types/component-event.js';
45
- export * from './types/event.js';
@@ -1,28 +0,0 @@
1
- import './click-path-capture.js';
2
- import './perf.js';
3
- import './campaign.js';
4
- import { EventPayload } from './types/event.js';
5
- export declare const init: () => void;
6
- export declare const sendInitialEvent: (url?: string, referrer?: string) => void;
7
- interface MMAExports {
8
- init: () => void;
9
- sendInitialEvent: (url?: string, referrer?: string) => void;
10
- record: (event: EventPayload, callback?: () => void) => void;
11
- viewId: string;
12
- }
13
- declare const exports: MMAExports;
14
- export default exports;
15
- export declare const record: (event: EventPayload, callback?: () => void) => void;
16
- export declare const viewId: string;
17
- export * from './types/abtest.js';
18
- export * from './types/subscription.js';
19
- export * from './types/interaction.js';
20
- export * from './types/inpageclick.js';
21
- export * from './types/printproduct.js';
22
- export * from './types/product.js';
23
- export * from './types/platform.js';
24
- export * from './types/media.js';
25
- export * from './types/consent.js';
26
- export * from './types/component-type.js';
27
- export * from './types/component-event.js';
28
- export * from './types/event.js';
@@ -1,28 +0,0 @@
1
- import './click-path-capture.js';
2
- import './perf.js';
3
- import './campaign.js';
4
- import { EventPayload } from './types/event.js';
5
- export declare const init: () => void;
6
- export declare const sendInitialEvent: (url?: string, referrer?: string) => void;
7
- interface SupportExports {
8
- init: () => void;
9
- sendInitialEvent: (url?: string, referrer?: string) => void;
10
- record: (event: EventPayload, callback?: () => void) => void;
11
- viewId: string;
12
- }
13
- declare const supportExports: SupportExports;
14
- export default supportExports;
15
- export declare const record: (event: EventPayload, callback?: () => void) => void;
16
- export declare const viewId: string;
17
- export * from './types/abtest.js';
18
- export * from './types/subscription.js';
19
- export * from './types/interaction.js';
20
- export * from './types/inpageclick.js';
21
- export * from './types/printproduct.js';
22
- export * from './types/product.js';
23
- export * from './types/platform.js';
24
- export * from './types/media.js';
25
- export * from './types/consent.js';
26
- export * from './types/component-type.js';
27
- export * from './types/component-event.js';
28
- export * from './types/event.js';