@guardian/support-dotcom-components 7.10.2 → 8.0.1
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.
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/shared/lib/geolocation.d.ts +20 -10
- package/dist/shared/lib/geolocation.d.ts.map +1 -1
- package/dist/shared/lib/history.d.ts.map +1 -1
- package/dist/shared/types/abTests/banner.d.ts +205 -2252
- package/dist/shared/types/abTests/banner.d.ts.map +1 -1
- package/dist/shared/types/abTests/epic.d.ts +156 -1560
- package/dist/shared/types/abTests/epic.d.ts.map +1 -1
- package/dist/shared/types/abTests/gutter.d.ts +80 -369
- package/dist/shared/types/abTests/gutter.d.ts.map +1 -1
- package/dist/shared/types/abTests/header.d.ts +95 -467
- package/dist/shared/types/abTests/header.d.ts.map +1 -1
- package/dist/shared/types/abTests/shared.d.ts +89 -155
- package/dist/shared/types/abTests/shared.d.ts.map +1 -1
- package/dist/shared/types/props/banner.d.ts +144 -1675
- package/dist/shared/types/props/banner.d.ts.map +1 -1
- package/dist/shared/types/props/choiceCards.d.ts +56 -586
- package/dist/shared/types/props/choiceCards.d.ts.map +1 -1
- package/dist/shared/types/props/design.d.ts +54 -514
- package/dist/shared/types/props/design.d.ts.map +1 -1
- package/dist/shared/types/props/epic.d.ts +192 -2501
- package/dist/shared/types/props/epic.d.ts.map +1 -1
- package/dist/shared/types/props/gutter.d.ts +25 -200
- package/dist/shared/types/props/gutter.d.ts.map +1 -1
- package/dist/shared/types/props/header.d.ts +29 -230
- package/dist/shared/types/props/header.d.ts.map +1 -1
- package/dist/shared/types/props/shared.d.ts +55 -212
- package/dist/shared/types/props/shared.d.ts.map +1 -1
- package/dist/shared/types/purchaseInfo.d.ts +11 -2
- package/dist/shared/types/purchaseInfo.d.ts.map +1 -1
- package/dist/shared/types/targeting/shared.d.ts +5 -15
- package/dist/shared/types/targeting/shared.d.ts.map +1 -1
- package/package.json +7 -5
|
@@ -8,18 +8,12 @@ export interface Cta {
|
|
|
8
8
|
export declare const ctaSchema: z.ZodObject<{
|
|
9
9
|
text: z.ZodString;
|
|
10
10
|
baseUrl: z.ZodString;
|
|
11
|
-
},
|
|
12
|
-
text: string;
|
|
13
|
-
baseUrl: string;
|
|
14
|
-
}, {
|
|
15
|
-
text: string;
|
|
16
|
-
baseUrl: string;
|
|
17
|
-
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
18
12
|
export declare enum SecondaryCtaType {
|
|
19
13
|
Custom = "CustomSecondaryCta",
|
|
20
14
|
ContributionsReminder = "ContributionsReminderSecondaryCta"
|
|
21
15
|
}
|
|
22
|
-
export declare const secondaryCtaTypeSchema: z.
|
|
16
|
+
export declare const secondaryCtaTypeSchema: z.ZodEnum<typeof SecondaryCtaType>;
|
|
23
17
|
interface CustomSecondaryCta {
|
|
24
18
|
type: SecondaryCtaType.Custom;
|
|
25
19
|
cta: Cta;
|
|
@@ -29,68 +23,24 @@ export declare const customSecondaryCtaSchema: z.ZodObject<{
|
|
|
29
23
|
cta: z.ZodObject<{
|
|
30
24
|
text: z.ZodString;
|
|
31
25
|
baseUrl: z.ZodString;
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
baseUrl: string;
|
|
35
|
-
}, {
|
|
36
|
-
text: string;
|
|
37
|
-
baseUrl: string;
|
|
38
|
-
}>;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
type: SecondaryCtaType.Custom;
|
|
41
|
-
cta: {
|
|
42
|
-
text: string;
|
|
43
|
-
baseUrl: string;
|
|
44
|
-
};
|
|
45
|
-
}, {
|
|
46
|
-
type: SecondaryCtaType.Custom;
|
|
47
|
-
cta: {
|
|
48
|
-
text: string;
|
|
49
|
-
baseUrl: string;
|
|
50
|
-
};
|
|
51
|
-
}>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
}, z.core.$strip>;
|
|
52
28
|
interface ContributionsReminderSecondaryCta {
|
|
53
29
|
type: SecondaryCtaType.ContributionsReminder;
|
|
54
30
|
}
|
|
55
31
|
export declare const contributionsReminderSecondaryCtaSchema: z.ZodObject<{
|
|
56
32
|
type: z.ZodLiteral<SecondaryCtaType.ContributionsReminder>;
|
|
57
|
-
},
|
|
58
|
-
type: SecondaryCtaType.ContributionsReminder;
|
|
59
|
-
}, {
|
|
60
|
-
type: SecondaryCtaType.ContributionsReminder;
|
|
61
|
-
}>;
|
|
33
|
+
}, z.core.$strip>;
|
|
62
34
|
export type SecondaryCta = CustomSecondaryCta | ContributionsReminderSecondaryCta;
|
|
63
|
-
export declare const secondaryCtaSchema: z.ZodDiscriminatedUnion<
|
|
35
|
+
export declare const secondaryCtaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
64
36
|
type: z.ZodLiteral<SecondaryCtaType.Custom>;
|
|
65
37
|
cta: z.ZodObject<{
|
|
66
38
|
text: z.ZodString;
|
|
67
39
|
baseUrl: z.ZodString;
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
baseUrl: string;
|
|
71
|
-
}, {
|
|
72
|
-
text: string;
|
|
73
|
-
baseUrl: string;
|
|
74
|
-
}>;
|
|
75
|
-
}, "strip", z.ZodTypeAny, {
|
|
76
|
-
type: SecondaryCtaType.Custom;
|
|
77
|
-
cta: {
|
|
78
|
-
text: string;
|
|
79
|
-
baseUrl: string;
|
|
80
|
-
};
|
|
81
|
-
}, {
|
|
82
|
-
type: SecondaryCtaType.Custom;
|
|
83
|
-
cta: {
|
|
84
|
-
text: string;
|
|
85
|
-
baseUrl: string;
|
|
86
|
-
};
|
|
87
|
-
}>, z.ZodObject<{
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
88
42
|
type: z.ZodLiteral<SecondaryCtaType.ContributionsReminder>;
|
|
89
|
-
},
|
|
90
|
-
type: SecondaryCtaType.ContributionsReminder;
|
|
91
|
-
}, {
|
|
92
|
-
type: SecondaryCtaType.ContributionsReminder;
|
|
93
|
-
}>]>;
|
|
43
|
+
}, z.core.$strip>], "type">;
|
|
94
44
|
interface TickerCopy {
|
|
95
45
|
countLabel: string;
|
|
96
46
|
goalCopy?: string;
|
|
@@ -98,13 +48,7 @@ interface TickerCopy {
|
|
|
98
48
|
export declare const tickerCopySchema: z.ZodObject<{
|
|
99
49
|
countLabel: z.ZodString;
|
|
100
50
|
goalCopy: z.ZodOptional<z.ZodString>;
|
|
101
|
-
},
|
|
102
|
-
countLabel: string;
|
|
103
|
-
goalCopy?: string | undefined;
|
|
104
|
-
}, {
|
|
105
|
-
countLabel: string;
|
|
106
|
-
goalCopy?: string | undefined;
|
|
107
|
-
}>;
|
|
51
|
+
}, z.core.$strip>;
|
|
108
52
|
export interface TickerData {
|
|
109
53
|
total: number;
|
|
110
54
|
goal: number;
|
|
@@ -112,13 +56,7 @@ export interface TickerData {
|
|
|
112
56
|
export declare const tickerDataSchema: z.ZodObject<{
|
|
113
57
|
total: z.ZodNumber;
|
|
114
58
|
goal: z.ZodNumber;
|
|
115
|
-
},
|
|
116
|
-
total: number;
|
|
117
|
-
goal: number;
|
|
118
|
-
}, {
|
|
119
|
-
total: number;
|
|
120
|
-
goal: number;
|
|
121
|
-
}>;
|
|
59
|
+
}, z.core.$strip>;
|
|
122
60
|
export type TickerName = 'US' | 'AU' | 'global';
|
|
123
61
|
export interface TickerSettings {
|
|
124
62
|
currencySymbol: string;
|
|
@@ -131,79 +69,49 @@ export declare const tickerSettingsSchema: z.ZodObject<{
|
|
|
131
69
|
copy: z.ZodObject<{
|
|
132
70
|
countLabel: z.ZodString;
|
|
133
71
|
goalCopy: z.ZodOptional<z.ZodString>;
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
goalCopy?: string | undefined;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
name: z.ZodEnum<{
|
|
74
|
+
global: "global";
|
|
75
|
+
US: "US";
|
|
76
|
+
AU: "AU";
|
|
140
77
|
}>;
|
|
141
|
-
name: z.ZodEnum<["US", "AU", "global"]>;
|
|
142
78
|
tickerData: z.ZodOptional<z.ZodObject<{
|
|
143
79
|
total: z.ZodNumber;
|
|
144
80
|
goal: z.ZodNumber;
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
goal: number;
|
|
148
|
-
}, {
|
|
149
|
-
total: number;
|
|
150
|
-
goal: number;
|
|
151
|
-
}>>;
|
|
152
|
-
}, "strip", z.ZodTypeAny, {
|
|
153
|
-
name: "global" | "US" | "AU";
|
|
154
|
-
copy: {
|
|
155
|
-
countLabel: string;
|
|
156
|
-
goalCopy?: string | undefined;
|
|
157
|
-
};
|
|
158
|
-
currencySymbol: string;
|
|
159
|
-
tickerData?: {
|
|
160
|
-
total: number;
|
|
161
|
-
goal: number;
|
|
162
|
-
} | undefined;
|
|
163
|
-
}, {
|
|
164
|
-
name: "global" | "US" | "AU";
|
|
165
|
-
copy: {
|
|
166
|
-
countLabel: string;
|
|
167
|
-
goalCopy?: string | undefined;
|
|
168
|
-
};
|
|
169
|
-
currencySymbol: string;
|
|
170
|
-
tickerData?: {
|
|
171
|
-
total: number;
|
|
172
|
-
goal: number;
|
|
173
|
-
} | undefined;
|
|
174
|
-
}>;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
}, z.core.$strip>;
|
|
175
83
|
export declare const articleCountsSchema: z.ZodObject<{
|
|
176
84
|
for52Weeks: z.ZodNumber;
|
|
177
85
|
forTargetedWeeks: z.ZodNumber;
|
|
178
|
-
},
|
|
179
|
-
for52Weeks: number;
|
|
180
|
-
forTargetedWeeks: number;
|
|
181
|
-
}, {
|
|
182
|
-
for52Weeks: number;
|
|
183
|
-
forTargetedWeeks: number;
|
|
184
|
-
}>;
|
|
86
|
+
}, z.core.$strip>;
|
|
185
87
|
export type ArticleCountType = 'for52Weeks' | 'forTargetedWeeks';
|
|
186
88
|
export type ArticleCounts = Record<ArticleCountType, number>;
|
|
187
89
|
export declare const separateArticleCountSchema: z.ZodObject<{
|
|
188
90
|
type: z.ZodLiteral<"above">;
|
|
189
91
|
copy: z.ZodOptional<z.ZodString>;
|
|
190
|
-
countType: z.ZodOptional<z.ZodEnum<
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}, {
|
|
196
|
-
type: "above";
|
|
197
|
-
copy?: string | undefined;
|
|
198
|
-
countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
|
|
199
|
-
}>;
|
|
92
|
+
countType: z.ZodOptional<z.ZodEnum<{
|
|
93
|
+
for52Weeks: "for52Weeks";
|
|
94
|
+
forTargetedWeeks: "forTargetedWeeks";
|
|
95
|
+
}>>;
|
|
96
|
+
}, z.core.$strip>;
|
|
200
97
|
export interface SeparateArticleCount {
|
|
201
98
|
type: 'above';
|
|
202
99
|
copy?: string;
|
|
203
100
|
countType?: ArticleCountType;
|
|
204
101
|
}
|
|
205
|
-
export declare const ophanProductSchema: z.ZodEnum<
|
|
206
|
-
|
|
102
|
+
export declare const ophanProductSchema: z.ZodEnum<{
|
|
103
|
+
CONTRIBUTION: "CONTRIBUTION";
|
|
104
|
+
MEMBERSHIP_SUPPORTER: "MEMBERSHIP_SUPPORTER";
|
|
105
|
+
DIGITAL_SUBSCRIPTION: "DIGITAL_SUBSCRIPTION";
|
|
106
|
+
PRINT_SUBSCRIPTION: "PRINT_SUBSCRIPTION";
|
|
107
|
+
}>;
|
|
108
|
+
export declare const ophanComponentTypeSchema: z.ZodEnum<{
|
|
109
|
+
ACQUISITIONS_EPIC: "ACQUISITIONS_EPIC";
|
|
110
|
+
ACQUISITIONS_ENGAGEMENT_BANNER: "ACQUISITIONS_ENGAGEMENT_BANNER";
|
|
111
|
+
ACQUISITIONS_HEADER: "ACQUISITIONS_HEADER";
|
|
112
|
+
ACQUISITIONS_OTHER: "ACQUISITIONS_OTHER";
|
|
113
|
+
ACQUISITIONS_SUBSCRIPTIONS_BANNER: "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
|
|
114
|
+
}>;
|
|
207
115
|
export type PageTracking = {
|
|
208
116
|
ophanPageId: string;
|
|
209
117
|
platformId: string;
|
|
@@ -214,33 +122,24 @@ export declare const trackingSchema: z.ZodObject<{
|
|
|
214
122
|
abTestName: z.ZodString;
|
|
215
123
|
abTestVariant: z.ZodString;
|
|
216
124
|
campaignCode: z.ZodString;
|
|
217
|
-
componentType: z.ZodEnum<
|
|
218
|
-
|
|
219
|
-
|
|
125
|
+
componentType: z.ZodEnum<{
|
|
126
|
+
ACQUISITIONS_EPIC: "ACQUISITIONS_EPIC";
|
|
127
|
+
ACQUISITIONS_ENGAGEMENT_BANNER: "ACQUISITIONS_ENGAGEMENT_BANNER";
|
|
128
|
+
ACQUISITIONS_HEADER: "ACQUISITIONS_HEADER";
|
|
129
|
+
ACQUISITIONS_OTHER: "ACQUISITIONS_OTHER";
|
|
130
|
+
ACQUISITIONS_SUBSCRIPTIONS_BANNER: "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
|
|
131
|
+
}>;
|
|
132
|
+
products: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
133
|
+
CONTRIBUTION: "CONTRIBUTION";
|
|
134
|
+
MEMBERSHIP_SUPPORTER: "MEMBERSHIP_SUPPORTER";
|
|
135
|
+
DIGITAL_SUBSCRIPTION: "DIGITAL_SUBSCRIPTION";
|
|
136
|
+
PRINT_SUBSCRIPTION: "PRINT_SUBSCRIPTION";
|
|
137
|
+
}>>>>;
|
|
138
|
+
labels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
220
139
|
ophanPageId: z.ZodString;
|
|
221
140
|
platformId: z.ZodString;
|
|
222
141
|
referrerUrl: z.ZodString;
|
|
223
|
-
},
|
|
224
|
-
abTestName: string;
|
|
225
|
-
abTestVariant: string;
|
|
226
|
-
campaignCode: string;
|
|
227
|
-
componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
|
|
228
|
-
ophanPageId: string;
|
|
229
|
-
platformId: string;
|
|
230
|
-
referrerUrl: string;
|
|
231
|
-
products?: ("CONTRIBUTION" | "MEMBERSHIP_SUPPORTER" | "DIGITAL_SUBSCRIPTION" | "PRINT_SUBSCRIPTION")[] | null | undefined;
|
|
232
|
-
labels?: string[] | null | undefined;
|
|
233
|
-
}, {
|
|
234
|
-
abTestName: string;
|
|
235
|
-
abTestVariant: string;
|
|
236
|
-
campaignCode: string;
|
|
237
|
-
componentType: "ACQUISITIONS_EPIC" | "ACQUISITIONS_ENGAGEMENT_BANNER" | "ACQUISITIONS_HEADER" | "ACQUISITIONS_OTHER" | "ACQUISITIONS_SUBSCRIPTIONS_BANNER";
|
|
238
|
-
ophanPageId: string;
|
|
239
|
-
platformId: string;
|
|
240
|
-
referrerUrl: string;
|
|
241
|
-
products?: ("CONTRIBUTION" | "MEMBERSHIP_SUPPORTER" | "DIGITAL_SUBSCRIPTION" | "PRINT_SUBSCRIPTION")[] | null | undefined;
|
|
242
|
-
labels?: string[] | null | undefined;
|
|
243
|
-
}>;
|
|
142
|
+
}, z.core.$strip>;
|
|
244
143
|
export interface Image {
|
|
245
144
|
mainUrl: string;
|
|
246
145
|
mobileUrl?: string;
|
|
@@ -258,23 +157,7 @@ export declare const imageSchema: z.ZodObject<{
|
|
|
258
157
|
leftColUrl: z.ZodOptional<z.ZodString>;
|
|
259
158
|
wideUrl: z.ZodOptional<z.ZodString>;
|
|
260
159
|
altText: z.ZodString;
|
|
261
|
-
},
|
|
262
|
-
altText: string;
|
|
263
|
-
mainUrl: string;
|
|
264
|
-
mobileUrl?: string | undefined;
|
|
265
|
-
tabletUrl?: string | undefined;
|
|
266
|
-
desktopUrl?: string | undefined;
|
|
267
|
-
leftColUrl?: string | undefined;
|
|
268
|
-
wideUrl?: string | undefined;
|
|
269
|
-
}, {
|
|
270
|
-
altText: string;
|
|
271
|
-
mainUrl: string;
|
|
272
|
-
mobileUrl?: string | undefined;
|
|
273
|
-
tabletUrl?: string | undefined;
|
|
274
|
-
desktopUrl?: string | undefined;
|
|
275
|
-
leftColUrl?: string | undefined;
|
|
276
|
-
wideUrl?: string | undefined;
|
|
277
|
-
}>;
|
|
160
|
+
}, z.core.$strip>;
|
|
278
161
|
export interface BylineWithImage {
|
|
279
162
|
name: string;
|
|
280
163
|
description?: string;
|
|
@@ -291,47 +174,7 @@ export declare const bylineWithImageSchema: z.ZodObject<{
|
|
|
291
174
|
leftColUrl: z.ZodOptional<z.ZodString>;
|
|
292
175
|
wideUrl: z.ZodOptional<z.ZodString>;
|
|
293
176
|
altText: z.ZodString;
|
|
294
|
-
},
|
|
295
|
-
|
|
296
|
-
mainUrl: string;
|
|
297
|
-
mobileUrl?: string | undefined;
|
|
298
|
-
tabletUrl?: string | undefined;
|
|
299
|
-
desktopUrl?: string | undefined;
|
|
300
|
-
leftColUrl?: string | undefined;
|
|
301
|
-
wideUrl?: string | undefined;
|
|
302
|
-
}, {
|
|
303
|
-
altText: string;
|
|
304
|
-
mainUrl: string;
|
|
305
|
-
mobileUrl?: string | undefined;
|
|
306
|
-
tabletUrl?: string | undefined;
|
|
307
|
-
desktopUrl?: string | undefined;
|
|
308
|
-
leftColUrl?: string | undefined;
|
|
309
|
-
wideUrl?: string | undefined;
|
|
310
|
-
}>>;
|
|
311
|
-
}, "strip", z.ZodTypeAny, {
|
|
312
|
-
name: string;
|
|
313
|
-
description?: string | undefined;
|
|
314
|
-
headshot?: {
|
|
315
|
-
altText: string;
|
|
316
|
-
mainUrl: string;
|
|
317
|
-
mobileUrl?: string | undefined;
|
|
318
|
-
tabletUrl?: string | undefined;
|
|
319
|
-
desktopUrl?: string | undefined;
|
|
320
|
-
leftColUrl?: string | undefined;
|
|
321
|
-
wideUrl?: string | undefined;
|
|
322
|
-
} | undefined;
|
|
323
|
-
}, {
|
|
324
|
-
name: string;
|
|
325
|
-
description?: string | undefined;
|
|
326
|
-
headshot?: {
|
|
327
|
-
altText: string;
|
|
328
|
-
mainUrl: string;
|
|
329
|
-
mobileUrl?: string | undefined;
|
|
330
|
-
tabletUrl?: string | undefined;
|
|
331
|
-
desktopUrl?: string | undefined;
|
|
332
|
-
leftColUrl?: string | undefined;
|
|
333
|
-
wideUrl?: string | undefined;
|
|
334
|
-
} | undefined;
|
|
335
|
-
}>;
|
|
177
|
+
}, z.core.$strip>>;
|
|
178
|
+
}, z.core.$strip>;
|
|
336
179
|
export {};
|
|
337
180
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/props/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAE5C,MAAM,WAAW,GAAG;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/props/shared.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
declare const purchaseInfoProduct: readonly ["Contribution", "SupporterPlus", "GuardianWeekly", "Paper"];
|
|
3
3
|
export type purchaseInfoProduct = (typeof purchaseInfoProduct)[number];
|
|
4
|
-
export declare const purchaseInfoProductSchema: z.ZodEnum<
|
|
4
|
+
export declare const purchaseInfoProductSchema: z.ZodEnum<{
|
|
5
|
+
Contribution: "Contribution";
|
|
6
|
+
SupporterPlus: "SupporterPlus";
|
|
7
|
+
GuardianWeekly: "GuardianWeekly";
|
|
8
|
+
Paper: "Paper";
|
|
9
|
+
}>;
|
|
5
10
|
declare const purchaseInfoUser: readonly ["new", "guest", "current"];
|
|
6
11
|
export type purchaseInfoUser = (typeof purchaseInfoUser)[number];
|
|
7
|
-
export declare const purchaseInfoUserSchema: z.ZodEnum<
|
|
12
|
+
export declare const purchaseInfoUserSchema: z.ZodEnum<{
|
|
13
|
+
new: "new";
|
|
14
|
+
guest: "guest";
|
|
15
|
+
current: "current";
|
|
16
|
+
}>;
|
|
8
17
|
export {};
|
|
9
18
|
//# sourceMappingURL=purchaseInfo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"purchaseInfo.d.ts","sourceRoot":"","sources":["../../../src/shared/types/purchaseInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,mBAAmB,uEAAwE,CAAC;AAElG,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AACvE,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"purchaseInfo.d.ts","sourceRoot":"","sources":["../../../src/shared/types/purchaseInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,mBAAmB,uEAAwE,CAAC;AAElG,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AACvE,eAAO,MAAM,yBAAyB;;;;;EAA8B,CAAC;AAErE,QAAA,MAAM,gBAAgB,sCAAuC,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AACjE,eAAO,MAAM,sBAAsB;;;;EAA2B,CAAC"}
|
|
@@ -21,20 +21,10 @@ export interface PurchaseInfo {
|
|
|
21
21
|
product: purchaseInfoProduct;
|
|
22
22
|
}
|
|
23
23
|
export declare const abandonedBasketSchema: z.ZodObject<{
|
|
24
|
-
amount: z.ZodUnion<[z.ZodNumber, z.ZodLiteral<"other">]>;
|
|
25
|
-
billingPeriod: z.ZodUnion<[z.ZodLiteral<"ONE_OFF">, z.ZodLiteral<"MONTHLY">, z.ZodLiteral<"ANNUAL">]>;
|
|
26
|
-
product: z.ZodUnion<[z.ZodLiteral<"Contribution">, z.ZodLiteral<"SupporterPlus">, z.ZodLiteral<"PremiumTier">, z.ZodLiteral<"DailyEdition">, z.ZodLiteral<"GuardianWeekly">, z.ZodLiteral<"Paper">, z.ZodLiteral<"PaperAndDigital">]>;
|
|
27
|
-
region: z.ZodUnion<[z.ZodLiteral<"uk">, z.ZodLiteral<"us">, z.ZodLiteral<"au">, z.ZodLiteral<"eu">, z.ZodLiteral<"int">, z.ZodLiteral<"nz">, z.ZodLiteral<"ca">]>;
|
|
28
|
-
},
|
|
29
|
-
product: "Contribution" | "SupporterPlus" | "GuardianWeekly" | "Paper" | "PremiumTier" | "DailyEdition" | "PaperAndDigital";
|
|
30
|
-
region: "int" | "uk" | "us" | "au" | "eu" | "nz" | "ca";
|
|
31
|
-
amount: number | "other";
|
|
32
|
-
billingPeriod: "ONE_OFF" | "MONTHLY" | "ANNUAL";
|
|
33
|
-
}, {
|
|
34
|
-
product: "Contribution" | "SupporterPlus" | "GuardianWeekly" | "Paper" | "PremiumTier" | "DailyEdition" | "PaperAndDigital";
|
|
35
|
-
region: "int" | "uk" | "us" | "au" | "eu" | "nz" | "ca";
|
|
36
|
-
amount: number | "other";
|
|
37
|
-
billingPeriod: "ONE_OFF" | "MONTHLY" | "ANNUAL";
|
|
38
|
-
}>;
|
|
24
|
+
amount: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"other">]>;
|
|
25
|
+
billingPeriod: z.ZodUnion<readonly [z.ZodLiteral<"ONE_OFF">, z.ZodLiteral<"MONTHLY">, z.ZodLiteral<"ANNUAL">]>;
|
|
26
|
+
product: z.ZodUnion<readonly [z.ZodLiteral<"Contribution">, z.ZodLiteral<"SupporterPlus">, z.ZodLiteral<"PremiumTier">, z.ZodLiteral<"DailyEdition">, z.ZodLiteral<"GuardianWeekly">, z.ZodLiteral<"Paper">, z.ZodLiteral<"PaperAndDigital">]>;
|
|
27
|
+
region: z.ZodUnion<readonly [z.ZodLiteral<"uk">, z.ZodLiteral<"us">, z.ZodLiteral<"au">, z.ZodLiteral<"eu">, z.ZodLiteral<"int">, z.ZodLiteral<"nz">, z.ZodLiteral<"ca">]>;
|
|
28
|
+
}, z.core.$strip>;
|
|
39
29
|
export type AbandonedBasket = z.infer<typeof abandonedBasketSchema>;
|
|
40
30
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/targeting/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE7E,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,EAAE,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IACzB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAEvC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IACzB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,mBAAmB,CAAC;CAChC;AAED,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/targeting/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE7E,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,EAAE,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IACzB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAEvC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IACzB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,mBAAmB,CAAC;CAChC;AAED,eAAO,MAAM,qBAAqB;;;;;iBAuBhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guardian/support-dotcom-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "Service to serve Reader Revenue components to dotcom",
|
|
5
|
-
"repository":
|
|
5
|
+
"repository": {
|
|
6
|
+
"url": "https://github.com/guardian/support-dotcom-components"
|
|
7
|
+
},
|
|
6
8
|
"author": "The Guardian",
|
|
7
9
|
"license": "MIT",
|
|
8
10
|
"main": "dist/index.js",
|
|
@@ -57,7 +59,7 @@
|
|
|
57
59
|
"webpack": "^5.94.0",
|
|
58
60
|
"webpack-cli": "^4.7.2",
|
|
59
61
|
"webpack-merge": "^5.8.0",
|
|
60
|
-
"zod": "
|
|
62
|
+
"zod": "4.1.12"
|
|
61
63
|
},
|
|
62
64
|
"dependencies": {
|
|
63
65
|
"@guardian/libs": "22.0.1",
|
|
@@ -77,12 +79,12 @@
|
|
|
77
79
|
"lodash.throttle": "^4.1.1",
|
|
78
80
|
"log4js": "^6.3.0",
|
|
79
81
|
"seedrandom": "^3.0.5",
|
|
80
|
-
"zod": "
|
|
82
|
+
"zod": "4.1.12"
|
|
81
83
|
},
|
|
82
84
|
"peerDependencies": {
|
|
83
85
|
"@guardian/libs": "^22.0.0",
|
|
84
86
|
"@guardian/ophan-tracker-js": "2.6.1",
|
|
85
|
-
"zod": "^
|
|
87
|
+
"zod": "^4.1.12"
|
|
86
88
|
},
|
|
87
89
|
"packageManager": "pnpm@8.15.7",
|
|
88
90
|
"scripts": {
|