@guardian/support-dotcom-components 1.1.1 → 1.1.3

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 (29) hide show
  1. package/dist/dotcom/src/requests.d.ts +0 -1
  2. package/dist/dotcom/src/requests.d.ts.map +1 -1
  3. package/dist/index.esm.js +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/shared/src/lib/geolocation.d.ts +4 -1
  6. package/dist/shared/src/lib/geolocation.d.ts.map +1 -1
  7. package/dist/shared/src/lib/tracking.d.ts +1 -1
  8. package/dist/shared/src/lib/tracking.d.ts.map +1 -1
  9. package/dist/shared/src/types/abTests/banner.d.ts +1 -9
  10. package/dist/shared/src/types/abTests/banner.d.ts.map +1 -1
  11. package/dist/shared/src/types/abTests/epic.d.ts +889 -52
  12. package/dist/shared/src/types/abTests/epic.d.ts.map +1 -1
  13. package/dist/shared/src/types/abTests/header.d.ts +444 -13
  14. package/dist/shared/src/types/abTests/header.d.ts.map +1 -1
  15. package/dist/shared/src/types/abTests/shared.d.ts +76 -5
  16. package/dist/shared/src/types/abTests/shared.d.ts.map +1 -1
  17. package/dist/shared/src/types/props/banner.d.ts +105 -103
  18. package/dist/shared/src/types/props/banner.d.ts.map +1 -1
  19. package/dist/shared/src/types/props/design.d.ts +41 -42
  20. package/dist/shared/src/types/props/design.d.ts.map +1 -1
  21. package/dist/shared/src/types/props/epic.d.ts +1026 -213
  22. package/dist/shared/src/types/props/epic.d.ts.map +1 -1
  23. package/dist/shared/src/types/props/header.d.ts +94 -35
  24. package/dist/shared/src/types/props/header.d.ts.map +1 -1
  25. package/dist/shared/src/types/props/shared.d.ts +76 -73
  26. package/dist/shared/src/types/props/shared.d.ts.map +1 -1
  27. package/dist/shared/src/types/purchaseInfo.d.ts +8 -2
  28. package/dist/shared/src/types/purchaseInfo.d.ts.map +1 -1
  29. package/package.json +1 -1
@@ -1,43 +1,22 @@
1
- import { CountryGroupId, ReminderFields } from '../../lib';
2
- import { ArticlesViewedSettings, ControlProportionSettings, Test, TestStatus, UserCohort, Variant } from './shared';
1
+ import { CountryGroupId } from '../../lib';
3
2
  import { EpicTargeting } from '../targeting';
4
- import { ArticleCountType, BylineWithImage, Cta, Image, SecondaryCta, TickerSettings } from '../props';
3
+ import { variantSchema } from '../props';
4
+ import * as z from 'zod';
5
5
  export type EpicType = 'ARTICLE' | 'LIVEBLOG';
6
- export interface MaxViews {
6
+ export declare const maxViewsSchema: z.ZodObject<{
7
+ maxViewsCount: z.ZodNumber;
8
+ maxViewsDays: z.ZodNumber;
9
+ minDaysBetweenViews: z.ZodNumber;
10
+ }, "strip", z.ZodTypeAny, {
7
11
  maxViewsCount: number;
8
12
  maxViewsDays: number;
9
13
  minDaysBetweenViews: number;
10
- }
11
- export interface SeparateArticleCount {
12
- type: 'above';
13
- copy?: string;
14
- countType?: ArticleCountType;
15
- }
16
- export interface NewsletterSignup {
17
- url: string;
18
- }
19
- export interface EpicVariant extends Variant {
20
- name: string;
21
- heading?: string;
22
- paragraphs: string[];
23
- highlightedText?: string;
24
- tickerSettings?: TickerSettings;
25
- cta?: Cta;
26
- secondaryCta?: SecondaryCta;
27
- newsletterSignup?: NewsletterSignup;
28
- footer?: string;
29
- image?: Image;
30
- showReminderFields?: ReminderFields;
31
- modulePathBuilder?: (version?: string) => string;
32
- separateArticleCount?: SeparateArticleCount;
33
- showChoiceCards?: boolean;
34
- choiceCardAmounts?: SelectedAmountsVariant;
35
- defaultChoiceCardFrequency?: ContributionFrequency;
36
- bylineWithImage?: BylineWithImage;
37
- maxViews?: MaxViews;
38
- showSignInLink?: boolean;
39
- forceApplePay?: boolean;
40
- }
14
+ }, {
15
+ maxViewsCount: number;
16
+ maxViewsDays: number;
17
+ minDaysBetweenViews: number;
18
+ }>;
19
+ export type MaxViews = z.infer<typeof maxViewsSchema>;
41
20
  export type ContributionFrequency = 'ONE_OFF' | 'MONTHLY' | 'ANNUAL';
42
21
  export declare const contributionTabFrequencies: ContributionFrequency[];
43
22
  interface ContributionTypeItem {
@@ -82,31 +61,889 @@ export interface AmountsTest {
82
61
  variants: AmountsVariant[];
83
62
  }
84
63
  export type AmountsTests = AmountsTest[];
85
- export interface EpicTest extends Test<EpicVariant> {
64
+ export type EpicTestDB = z.infer<typeof epicTestDBSchema>;
65
+ export interface EpicTest extends EpicTestDB {
66
+ hasArticleCountInCopy: boolean;
67
+ isSuperMode?: boolean;
68
+ canShow?: (targeting: EpicTargeting) => boolean;
69
+ campaignId?: string;
70
+ expiry?: string;
71
+ }
72
+ export declare const epicTestDBSchema: z.ZodObject<{
73
+ controlProportionSettings: z.ZodOptional<z.ZodObject<{
74
+ proportion: z.ZodNumber;
75
+ offset: z.ZodNumber;
76
+ }, "strip", z.ZodTypeAny, {
77
+ offset: number;
78
+ proportion: number;
79
+ }, {
80
+ offset: number;
81
+ proportion: number;
82
+ }>>;
83
+ deviceType: z.ZodOptional<z.ZodEnum<["Mobile", "Desktop", "All"]>>;
84
+ signedInStatus: z.ZodOptional<z.ZodEnum<["SignedIn", "SignedOut", "All"]>>;
85
+ name: z.ZodString;
86
+ status: z.ZodEnum<["Live", "Draft", "Archived"]>;
87
+ locations: z.ZodArray<z.ZodEnum<["GBPCountries", "UnitedStates", "AUDCountries", "EURCountries", "International", "NZDCountries", "Canada"]>, "many">;
88
+ tagIds: z.ZodArray<z.ZodString, "many">;
89
+ sections: z.ZodArray<z.ZodString, "many">;
90
+ excludedTagIds: z.ZodArray<z.ZodString, "many">;
91
+ excludedSections: z.ZodArray<z.ZodString, "many">;
92
+ alwaysAsk: z.ZodBoolean;
93
+ maxViews: z.ZodOptional<z.ZodObject<{
94
+ maxViewsCount: z.ZodNumber;
95
+ maxViewsDays: z.ZodNumber;
96
+ minDaysBetweenViews: z.ZodNumber;
97
+ }, "strip", z.ZodTypeAny, {
98
+ maxViewsCount: number;
99
+ maxViewsDays: number;
100
+ minDaysBetweenViews: number;
101
+ }, {
102
+ maxViewsCount: number;
103
+ maxViewsDays: number;
104
+ minDaysBetweenViews: number;
105
+ }>>;
106
+ userCohort: z.ZodEnum<["AllExistingSupporters", "AllNonSupporters", "Everyone", "PostAskPauseSingleContributors"]>;
107
+ hasCountryName: z.ZodBoolean;
108
+ highPriority: z.ZodBoolean;
109
+ useLocalViewLog: z.ZodBoolean;
110
+ articlesViewedSettings: z.ZodOptional<z.ZodObject<{
111
+ minViews: z.ZodNumber;
112
+ maxViews: z.ZodOptional<z.ZodNumber>;
113
+ periodInWeeks: z.ZodNumber;
114
+ tagId: z.ZodOptional<z.ZodString>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ minViews: number;
117
+ periodInWeeks: number;
118
+ maxViews?: number | undefined;
119
+ tagId?: string | undefined;
120
+ }, {
121
+ minViews: number;
122
+ periodInWeeks: number;
123
+ maxViews?: number | undefined;
124
+ tagId?: string | undefined;
125
+ }>>;
126
+ priority: z.ZodNumber;
127
+ variants: z.ZodArray<z.ZodObject<{
128
+ name: z.ZodString;
129
+ heading: z.ZodOptional<z.ZodString>;
130
+ paragraphs: z.ZodArray<z.ZodString, "many">;
131
+ highlightedText: z.ZodOptional<z.ZodString>;
132
+ tickerSettings: z.ZodOptional<z.ZodObject<{
133
+ endType: z.ZodNativeEnum<typeof import("../props").TickerEndType>;
134
+ countType: z.ZodNativeEnum<typeof import("../props").TickerCountType>;
135
+ currencySymbol: z.ZodString;
136
+ copy: z.ZodObject<{
137
+ countLabel: z.ZodString;
138
+ goalReachedPrimary: z.ZodString;
139
+ goalReachedSecondary: z.ZodString;
140
+ }, "strip", z.ZodTypeAny, {
141
+ countLabel: string;
142
+ goalReachedPrimary: string;
143
+ goalReachedSecondary: string;
144
+ }, {
145
+ countLabel: string;
146
+ goalReachedPrimary: string;
147
+ goalReachedSecondary: string;
148
+ }>;
149
+ name: z.ZodEnum<["US", "AU"]>;
150
+ tickerData: z.ZodOptional<z.ZodObject<{
151
+ total: z.ZodNumber;
152
+ goal: z.ZodNumber;
153
+ }, "strip", z.ZodTypeAny, {
154
+ total: number;
155
+ goal: number;
156
+ }, {
157
+ total: number;
158
+ goal: number;
159
+ }>>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ name: "US" | "AU";
162
+ copy: {
163
+ countLabel: string;
164
+ goalReachedPrimary: string;
165
+ goalReachedSecondary: string;
166
+ };
167
+ endType: import("../props").TickerEndType;
168
+ countType: import("../props").TickerCountType;
169
+ currencySymbol: string;
170
+ tickerData?: {
171
+ total: number;
172
+ goal: number;
173
+ } | undefined;
174
+ }, {
175
+ name: "US" | "AU";
176
+ copy: {
177
+ countLabel: string;
178
+ goalReachedPrimary: string;
179
+ goalReachedSecondary: string;
180
+ };
181
+ endType: import("../props").TickerEndType;
182
+ countType: import("../props").TickerCountType;
183
+ currencySymbol: string;
184
+ tickerData?: {
185
+ total: number;
186
+ goal: number;
187
+ } | undefined;
188
+ }>>;
189
+ cta: z.ZodOptional<z.ZodObject<{
190
+ text: z.ZodString;
191
+ baseUrl: z.ZodString;
192
+ }, "strip", z.ZodTypeAny, {
193
+ text: string;
194
+ baseUrl: string;
195
+ }, {
196
+ text: string;
197
+ baseUrl: string;
198
+ }>>;
199
+ secondaryCta: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
200
+ type: z.ZodLiteral<import("../props").SecondaryCtaType.Custom>;
201
+ cta: z.ZodObject<{
202
+ text: z.ZodString;
203
+ baseUrl: z.ZodString;
204
+ }, "strip", z.ZodTypeAny, {
205
+ text: string;
206
+ baseUrl: string;
207
+ }, {
208
+ text: string;
209
+ baseUrl: string;
210
+ }>;
211
+ }, "strip", z.ZodTypeAny, {
212
+ type: import("../props").SecondaryCtaType.Custom;
213
+ cta: {
214
+ text: string;
215
+ baseUrl: string;
216
+ };
217
+ }, {
218
+ type: import("../props").SecondaryCtaType.Custom;
219
+ cta: {
220
+ text: string;
221
+ baseUrl: string;
222
+ };
223
+ }>, z.ZodObject<{
224
+ type: z.ZodLiteral<import("../props").SecondaryCtaType.ContributionsReminder>;
225
+ }, "strip", z.ZodTypeAny, {
226
+ type: import("../props").SecondaryCtaType.ContributionsReminder;
227
+ }, {
228
+ type: import("../props").SecondaryCtaType.ContributionsReminder;
229
+ }>]>>;
230
+ newsletterSignup: z.ZodOptional<z.ZodObject<{
231
+ url: z.ZodString;
232
+ }, "strip", z.ZodTypeAny, {
233
+ url: string;
234
+ }, {
235
+ url: string;
236
+ }>>;
237
+ footer: z.ZodOptional<z.ZodString>;
238
+ image: z.ZodOptional<z.ZodObject<{
239
+ mainUrl: z.ZodString;
240
+ mobileUrl: z.ZodOptional<z.ZodString>;
241
+ tabletUrl: z.ZodOptional<z.ZodString>;
242
+ desktopUrl: z.ZodOptional<z.ZodString>;
243
+ leftColUrl: z.ZodOptional<z.ZodString>;
244
+ wideUrl: z.ZodOptional<z.ZodString>;
245
+ altText: z.ZodString;
246
+ }, "strip", z.ZodTypeAny, {
247
+ mainUrl: string;
248
+ altText: string;
249
+ mobileUrl?: string | undefined;
250
+ tabletUrl?: string | undefined;
251
+ desktopUrl?: string | undefined;
252
+ leftColUrl?: string | undefined;
253
+ wideUrl?: string | undefined;
254
+ }, {
255
+ mainUrl: string;
256
+ altText: string;
257
+ mobileUrl?: string | undefined;
258
+ tabletUrl?: string | undefined;
259
+ desktopUrl?: string | undefined;
260
+ leftColUrl?: string | undefined;
261
+ wideUrl?: string | undefined;
262
+ }>>;
263
+ showReminderFields: z.ZodOptional<z.ZodObject<{
264
+ reminderCta: z.ZodString;
265
+ reminderLabel: z.ZodString;
266
+ reminderPeriod: z.ZodString;
267
+ }, "strip", z.ZodTypeAny, {
268
+ reminderCta: string;
269
+ reminderLabel: string;
270
+ reminderPeriod: string;
271
+ }, {
272
+ reminderCta: string;
273
+ reminderLabel: string;
274
+ reminderPeriod: string;
275
+ }>>;
276
+ separateArticleCount: z.ZodOptional<z.ZodObject<{
277
+ type: z.ZodLiteral<"above">;
278
+ copy: z.ZodOptional<z.ZodString>;
279
+ countType: z.ZodOptional<z.ZodEnum<["for52Weeks", "forTargetedWeeks"]>>;
280
+ }, "strip", z.ZodTypeAny, {
281
+ type: "above";
282
+ copy?: string | undefined;
283
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
284
+ }, {
285
+ type: "above";
286
+ copy?: string | undefined;
287
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
288
+ }>>;
289
+ maxViews: z.ZodOptional<z.ZodObject<{
290
+ maxViewsCount: z.ZodNumber;
291
+ maxViewsDays: z.ZodNumber;
292
+ minDaysBetweenViews: z.ZodNumber;
293
+ }, "strip", z.ZodTypeAny, {
294
+ maxViewsCount: number;
295
+ maxViewsDays: number;
296
+ minDaysBetweenViews: number;
297
+ }, {
298
+ maxViewsCount: number;
299
+ maxViewsDays: number;
300
+ minDaysBetweenViews: number;
301
+ }>>;
302
+ showSignInLink: z.ZodOptional<z.ZodBoolean>;
303
+ bylineWithImage: z.ZodOptional<z.ZodObject<{
304
+ name: z.ZodString;
305
+ description: z.ZodOptional<z.ZodString>;
306
+ headshot: z.ZodOptional<z.ZodObject<{
307
+ mainUrl: z.ZodString;
308
+ mobileUrl: z.ZodOptional<z.ZodString>;
309
+ tabletUrl: z.ZodOptional<z.ZodString>;
310
+ desktopUrl: z.ZodOptional<z.ZodString>;
311
+ leftColUrl: z.ZodOptional<z.ZodString>;
312
+ wideUrl: z.ZodOptional<z.ZodString>;
313
+ altText: z.ZodString;
314
+ }, "strip", z.ZodTypeAny, {
315
+ mainUrl: string;
316
+ altText: string;
317
+ mobileUrl?: string | undefined;
318
+ tabletUrl?: string | undefined;
319
+ desktopUrl?: string | undefined;
320
+ leftColUrl?: string | undefined;
321
+ wideUrl?: string | undefined;
322
+ }, {
323
+ mainUrl: string;
324
+ altText: string;
325
+ mobileUrl?: string | undefined;
326
+ tabletUrl?: string | undefined;
327
+ desktopUrl?: string | undefined;
328
+ leftColUrl?: string | undefined;
329
+ wideUrl?: string | undefined;
330
+ }>>;
331
+ }, "strip", z.ZodTypeAny, {
332
+ name: string;
333
+ description?: string | undefined;
334
+ headshot?: {
335
+ mainUrl: string;
336
+ altText: string;
337
+ mobileUrl?: string | undefined;
338
+ tabletUrl?: string | undefined;
339
+ desktopUrl?: string | undefined;
340
+ leftColUrl?: string | undefined;
341
+ wideUrl?: string | undefined;
342
+ } | undefined;
343
+ }, {
344
+ name: string;
345
+ description?: string | undefined;
346
+ headshot?: {
347
+ mainUrl: string;
348
+ altText: string;
349
+ mobileUrl?: string | undefined;
350
+ tabletUrl?: string | undefined;
351
+ desktopUrl?: string | undefined;
352
+ leftColUrl?: string | undefined;
353
+ wideUrl?: string | undefined;
354
+ } | undefined;
355
+ }>>;
356
+ showChoiceCards: z.ZodOptional<z.ZodBoolean>;
357
+ choiceCardAmounts: z.ZodOptional<z.ZodObject<{
358
+ testName: z.ZodString;
359
+ variantName: z.ZodString;
360
+ defaultContributionType: z.ZodEnum<["ONE_OFF", "MONTHLY", "ANNUAL"]>;
361
+ displayContributionType: z.ZodArray<z.ZodEnum<["ONE_OFF", "MONTHLY", "ANNUAL"]>, "many">;
362
+ amountsCardData: z.ZodObject<{
363
+ ONE_OFF: z.ZodObject<{
364
+ amounts: z.ZodArray<z.ZodNumber, "many">;
365
+ defaultAmount: z.ZodNumber;
366
+ hideChooseYourAmount: z.ZodOptional<z.ZodBoolean>;
367
+ }, "strip", z.ZodTypeAny, {
368
+ amounts: number[];
369
+ defaultAmount: number;
370
+ hideChooseYourAmount?: boolean | undefined;
371
+ }, {
372
+ amounts: number[];
373
+ defaultAmount: number;
374
+ hideChooseYourAmount?: boolean | undefined;
375
+ }>;
376
+ MONTHLY: z.ZodObject<{
377
+ amounts: z.ZodArray<z.ZodNumber, "many">;
378
+ defaultAmount: z.ZodNumber;
379
+ hideChooseYourAmount: z.ZodOptional<z.ZodBoolean>;
380
+ }, "strip", z.ZodTypeAny, {
381
+ amounts: number[];
382
+ defaultAmount: number;
383
+ hideChooseYourAmount?: boolean | undefined;
384
+ }, {
385
+ amounts: number[];
386
+ defaultAmount: number;
387
+ hideChooseYourAmount?: boolean | undefined;
388
+ }>;
389
+ ANNUAL: z.ZodObject<{
390
+ amounts: z.ZodArray<z.ZodNumber, "many">;
391
+ defaultAmount: z.ZodNumber;
392
+ hideChooseYourAmount: z.ZodOptional<z.ZodBoolean>;
393
+ }, "strip", z.ZodTypeAny, {
394
+ amounts: number[];
395
+ defaultAmount: number;
396
+ hideChooseYourAmount?: boolean | undefined;
397
+ }, {
398
+ amounts: number[];
399
+ defaultAmount: number;
400
+ hideChooseYourAmount?: boolean | undefined;
401
+ }>;
402
+ }, "strip", z.ZodTypeAny, {
403
+ ONE_OFF: {
404
+ amounts: number[];
405
+ defaultAmount: number;
406
+ hideChooseYourAmount?: boolean | undefined;
407
+ };
408
+ MONTHLY: {
409
+ amounts: number[];
410
+ defaultAmount: number;
411
+ hideChooseYourAmount?: boolean | undefined;
412
+ };
413
+ ANNUAL: {
414
+ amounts: number[];
415
+ defaultAmount: number;
416
+ hideChooseYourAmount?: boolean | undefined;
417
+ };
418
+ }, {
419
+ ONE_OFF: {
420
+ amounts: number[];
421
+ defaultAmount: number;
422
+ hideChooseYourAmount?: boolean | undefined;
423
+ };
424
+ MONTHLY: {
425
+ amounts: number[];
426
+ defaultAmount: number;
427
+ hideChooseYourAmount?: boolean | undefined;
428
+ };
429
+ ANNUAL: {
430
+ amounts: number[];
431
+ defaultAmount: number;
432
+ hideChooseYourAmount?: boolean | undefined;
433
+ };
434
+ }>;
435
+ }, "strip", z.ZodTypeAny, {
436
+ testName: string;
437
+ variantName: string;
438
+ defaultContributionType: "ONE_OFF" | "MONTHLY" | "ANNUAL";
439
+ displayContributionType: ("ONE_OFF" | "MONTHLY" | "ANNUAL")[];
440
+ amountsCardData: {
441
+ ONE_OFF: {
442
+ amounts: number[];
443
+ defaultAmount: number;
444
+ hideChooseYourAmount?: boolean | undefined;
445
+ };
446
+ MONTHLY: {
447
+ amounts: number[];
448
+ defaultAmount: number;
449
+ hideChooseYourAmount?: boolean | undefined;
450
+ };
451
+ ANNUAL: {
452
+ amounts: number[];
453
+ defaultAmount: number;
454
+ hideChooseYourAmount?: boolean | undefined;
455
+ };
456
+ };
457
+ }, {
458
+ testName: string;
459
+ variantName: string;
460
+ defaultContributionType: "ONE_OFF" | "MONTHLY" | "ANNUAL";
461
+ displayContributionType: ("ONE_OFF" | "MONTHLY" | "ANNUAL")[];
462
+ amountsCardData: {
463
+ ONE_OFF: {
464
+ amounts: number[];
465
+ defaultAmount: number;
466
+ hideChooseYourAmount?: boolean | undefined;
467
+ };
468
+ MONTHLY: {
469
+ amounts: number[];
470
+ defaultAmount: number;
471
+ hideChooseYourAmount?: boolean | undefined;
472
+ };
473
+ ANNUAL: {
474
+ amounts: number[];
475
+ defaultAmount: number;
476
+ hideChooseYourAmount?: boolean | undefined;
477
+ };
478
+ };
479
+ }>>;
480
+ defaultChoiceCardFrequency: z.ZodOptional<z.ZodEnum<["ONE_OFF", "MONTHLY", "ANNUAL"]>>;
481
+ }, "strip", z.ZodTypeAny, {
482
+ name: string;
483
+ paragraphs: string[];
484
+ heading?: string | undefined;
485
+ highlightedText?: string | undefined;
486
+ tickerSettings?: {
487
+ name: "US" | "AU";
488
+ copy: {
489
+ countLabel: string;
490
+ goalReachedPrimary: string;
491
+ goalReachedSecondary: string;
492
+ };
493
+ endType: import("../props").TickerEndType;
494
+ countType: import("../props").TickerCountType;
495
+ currencySymbol: string;
496
+ tickerData?: {
497
+ total: number;
498
+ goal: number;
499
+ } | undefined;
500
+ } | undefined;
501
+ cta?: {
502
+ text: string;
503
+ baseUrl: string;
504
+ } | undefined;
505
+ secondaryCta?: {
506
+ type: import("../props").SecondaryCtaType.Custom;
507
+ cta: {
508
+ text: string;
509
+ baseUrl: string;
510
+ };
511
+ } | {
512
+ type: import("../props").SecondaryCtaType.ContributionsReminder;
513
+ } | undefined;
514
+ newsletterSignup?: {
515
+ url: string;
516
+ } | undefined;
517
+ footer?: string | undefined;
518
+ image?: {
519
+ mainUrl: string;
520
+ altText: string;
521
+ mobileUrl?: string | undefined;
522
+ tabletUrl?: string | undefined;
523
+ desktopUrl?: string | undefined;
524
+ leftColUrl?: string | undefined;
525
+ wideUrl?: string | undefined;
526
+ } | undefined;
527
+ showReminderFields?: {
528
+ reminderCta: string;
529
+ reminderLabel: string;
530
+ reminderPeriod: string;
531
+ } | undefined;
532
+ separateArticleCount?: {
533
+ type: "above";
534
+ copy?: string | undefined;
535
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
536
+ } | undefined;
537
+ maxViews?: {
538
+ maxViewsCount: number;
539
+ maxViewsDays: number;
540
+ minDaysBetweenViews: number;
541
+ } | undefined;
542
+ showSignInLink?: boolean | undefined;
543
+ bylineWithImage?: {
544
+ name: string;
545
+ description?: string | undefined;
546
+ headshot?: {
547
+ mainUrl: string;
548
+ altText: string;
549
+ mobileUrl?: string | undefined;
550
+ tabletUrl?: string | undefined;
551
+ desktopUrl?: string | undefined;
552
+ leftColUrl?: string | undefined;
553
+ wideUrl?: string | undefined;
554
+ } | undefined;
555
+ } | undefined;
556
+ showChoiceCards?: boolean | undefined;
557
+ choiceCardAmounts?: {
558
+ testName: string;
559
+ variantName: string;
560
+ defaultContributionType: "ONE_OFF" | "MONTHLY" | "ANNUAL";
561
+ displayContributionType: ("ONE_OFF" | "MONTHLY" | "ANNUAL")[];
562
+ amountsCardData: {
563
+ ONE_OFF: {
564
+ amounts: number[];
565
+ defaultAmount: number;
566
+ hideChooseYourAmount?: boolean | undefined;
567
+ };
568
+ MONTHLY: {
569
+ amounts: number[];
570
+ defaultAmount: number;
571
+ hideChooseYourAmount?: boolean | undefined;
572
+ };
573
+ ANNUAL: {
574
+ amounts: number[];
575
+ defaultAmount: number;
576
+ hideChooseYourAmount?: boolean | undefined;
577
+ };
578
+ };
579
+ } | undefined;
580
+ defaultChoiceCardFrequency?: "ONE_OFF" | "MONTHLY" | "ANNUAL" | undefined;
581
+ }, {
582
+ name: string;
583
+ paragraphs: string[];
584
+ heading?: string | undefined;
585
+ highlightedText?: string | undefined;
586
+ tickerSettings?: {
587
+ name: "US" | "AU";
588
+ copy: {
589
+ countLabel: string;
590
+ goalReachedPrimary: string;
591
+ goalReachedSecondary: string;
592
+ };
593
+ endType: import("../props").TickerEndType;
594
+ countType: import("../props").TickerCountType;
595
+ currencySymbol: string;
596
+ tickerData?: {
597
+ total: number;
598
+ goal: number;
599
+ } | undefined;
600
+ } | undefined;
601
+ cta?: {
602
+ text: string;
603
+ baseUrl: string;
604
+ } | undefined;
605
+ secondaryCta?: {
606
+ type: import("../props").SecondaryCtaType.Custom;
607
+ cta: {
608
+ text: string;
609
+ baseUrl: string;
610
+ };
611
+ } | {
612
+ type: import("../props").SecondaryCtaType.ContributionsReminder;
613
+ } | undefined;
614
+ newsletterSignup?: {
615
+ url: string;
616
+ } | undefined;
617
+ footer?: string | undefined;
618
+ image?: {
619
+ mainUrl: string;
620
+ altText: string;
621
+ mobileUrl?: string | undefined;
622
+ tabletUrl?: string | undefined;
623
+ desktopUrl?: string | undefined;
624
+ leftColUrl?: string | undefined;
625
+ wideUrl?: string | undefined;
626
+ } | undefined;
627
+ showReminderFields?: {
628
+ reminderCta: string;
629
+ reminderLabel: string;
630
+ reminderPeriod: string;
631
+ } | undefined;
632
+ separateArticleCount?: {
633
+ type: "above";
634
+ copy?: string | undefined;
635
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
636
+ } | undefined;
637
+ maxViews?: {
638
+ maxViewsCount: number;
639
+ maxViewsDays: number;
640
+ minDaysBetweenViews: number;
641
+ } | undefined;
642
+ showSignInLink?: boolean | undefined;
643
+ bylineWithImage?: {
644
+ name: string;
645
+ description?: string | undefined;
646
+ headshot?: {
647
+ mainUrl: string;
648
+ altText: string;
649
+ mobileUrl?: string | undefined;
650
+ tabletUrl?: string | undefined;
651
+ desktopUrl?: string | undefined;
652
+ leftColUrl?: string | undefined;
653
+ wideUrl?: string | undefined;
654
+ } | undefined;
655
+ } | undefined;
656
+ showChoiceCards?: boolean | undefined;
657
+ choiceCardAmounts?: {
658
+ testName: string;
659
+ variantName: string;
660
+ defaultContributionType: "ONE_OFF" | "MONTHLY" | "ANNUAL";
661
+ displayContributionType: ("ONE_OFF" | "MONTHLY" | "ANNUAL")[];
662
+ amountsCardData: {
663
+ ONE_OFF: {
664
+ amounts: number[];
665
+ defaultAmount: number;
666
+ hideChooseYourAmount?: boolean | undefined;
667
+ };
668
+ MONTHLY: {
669
+ amounts: number[];
670
+ defaultAmount: number;
671
+ hideChooseYourAmount?: boolean | undefined;
672
+ };
673
+ ANNUAL: {
674
+ amounts: number[];
675
+ defaultAmount: number;
676
+ hideChooseYourAmount?: boolean | undefined;
677
+ };
678
+ };
679
+ } | undefined;
680
+ defaultChoiceCardFrequency?: "ONE_OFF" | "MONTHLY" | "ANNUAL" | undefined;
681
+ }>, "many">;
682
+ }, "strip", z.ZodTypeAny, {
683
+ priority: number;
86
684
  name: string;
87
- status: TestStatus;
88
- locations: CountryGroupId[];
685
+ status: "Live" | "Draft" | "Archived";
686
+ locations: ("GBPCountries" | "UnitedStates" | "AUDCountries" | "EURCountries" | "International" | "NZDCountries" | "Canada")[];
89
687
  tagIds: string[];
90
688
  sections: string[];
91
689
  excludedTagIds: string[];
92
690
  excludedSections: string[];
93
691
  alwaysAsk: boolean;
94
- maxViews?: MaxViews;
95
- userCohort: UserCohort;
96
- isLiveBlog: boolean;
692
+ userCohort: "AllExistingSupporters" | "AllNonSupporters" | "Everyone" | "PostAskPauseSingleContributors";
97
693
  hasCountryName: boolean;
98
- variants: EpicVariant[];
99
694
  highPriority: boolean;
100
695
  useLocalViewLog: boolean;
101
- articlesViewedSettings?: ArticlesViewedSettings;
102
- hasArticleCountInCopy: boolean;
103
- audience?: number;
104
- audienceOffset?: number;
105
- expiry?: string;
106
- campaignId?: string;
107
- controlProportionSettings?: ControlProportionSettings;
108
- isSuperMode?: boolean;
109
- canShow?: (targeting: EpicTargeting) => boolean;
110
- }
696
+ variants: {
697
+ name: string;
698
+ paragraphs: string[];
699
+ heading?: string | undefined;
700
+ highlightedText?: string | undefined;
701
+ tickerSettings?: {
702
+ name: "US" | "AU";
703
+ copy: {
704
+ countLabel: string;
705
+ goalReachedPrimary: string;
706
+ goalReachedSecondary: string;
707
+ };
708
+ endType: import("../props").TickerEndType;
709
+ countType: import("../props").TickerCountType;
710
+ currencySymbol: string;
711
+ tickerData?: {
712
+ total: number;
713
+ goal: number;
714
+ } | undefined;
715
+ } | undefined;
716
+ cta?: {
717
+ text: string;
718
+ baseUrl: string;
719
+ } | undefined;
720
+ secondaryCta?: {
721
+ type: import("../props").SecondaryCtaType.Custom;
722
+ cta: {
723
+ text: string;
724
+ baseUrl: string;
725
+ };
726
+ } | {
727
+ type: import("../props").SecondaryCtaType.ContributionsReminder;
728
+ } | undefined;
729
+ newsletterSignup?: {
730
+ url: string;
731
+ } | undefined;
732
+ footer?: string | undefined;
733
+ image?: {
734
+ mainUrl: string;
735
+ altText: string;
736
+ mobileUrl?: string | undefined;
737
+ tabletUrl?: string | undefined;
738
+ desktopUrl?: string | undefined;
739
+ leftColUrl?: string | undefined;
740
+ wideUrl?: string | undefined;
741
+ } | undefined;
742
+ showReminderFields?: {
743
+ reminderCta: string;
744
+ reminderLabel: string;
745
+ reminderPeriod: string;
746
+ } | undefined;
747
+ separateArticleCount?: {
748
+ type: "above";
749
+ copy?: string | undefined;
750
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
751
+ } | undefined;
752
+ maxViews?: {
753
+ maxViewsCount: number;
754
+ maxViewsDays: number;
755
+ minDaysBetweenViews: number;
756
+ } | undefined;
757
+ showSignInLink?: boolean | undefined;
758
+ bylineWithImage?: {
759
+ name: string;
760
+ description?: string | undefined;
761
+ headshot?: {
762
+ mainUrl: string;
763
+ altText: string;
764
+ mobileUrl?: string | undefined;
765
+ tabletUrl?: string | undefined;
766
+ desktopUrl?: string | undefined;
767
+ leftColUrl?: string | undefined;
768
+ wideUrl?: string | undefined;
769
+ } | undefined;
770
+ } | undefined;
771
+ showChoiceCards?: boolean | undefined;
772
+ choiceCardAmounts?: {
773
+ testName: string;
774
+ variantName: string;
775
+ defaultContributionType: "ONE_OFF" | "MONTHLY" | "ANNUAL";
776
+ displayContributionType: ("ONE_OFF" | "MONTHLY" | "ANNUAL")[];
777
+ amountsCardData: {
778
+ ONE_OFF: {
779
+ amounts: number[];
780
+ defaultAmount: number;
781
+ hideChooseYourAmount?: boolean | undefined;
782
+ };
783
+ MONTHLY: {
784
+ amounts: number[];
785
+ defaultAmount: number;
786
+ hideChooseYourAmount?: boolean | undefined;
787
+ };
788
+ ANNUAL: {
789
+ amounts: number[];
790
+ defaultAmount: number;
791
+ hideChooseYourAmount?: boolean | undefined;
792
+ };
793
+ };
794
+ } | undefined;
795
+ defaultChoiceCardFrequency?: "ONE_OFF" | "MONTHLY" | "ANNUAL" | undefined;
796
+ }[];
797
+ controlProportionSettings?: {
798
+ offset: number;
799
+ proportion: number;
800
+ } | undefined;
801
+ deviceType?: "Mobile" | "Desktop" | "All" | undefined;
802
+ signedInStatus?: "All" | "SignedIn" | "SignedOut" | undefined;
803
+ maxViews?: {
804
+ maxViewsCount: number;
805
+ maxViewsDays: number;
806
+ minDaysBetweenViews: number;
807
+ } | undefined;
808
+ articlesViewedSettings?: {
809
+ minViews: number;
810
+ periodInWeeks: number;
811
+ maxViews?: number | undefined;
812
+ tagId?: string | undefined;
813
+ } | undefined;
814
+ }, {
815
+ priority: number;
816
+ name: string;
817
+ status: "Live" | "Draft" | "Archived";
818
+ locations: ("GBPCountries" | "UnitedStates" | "AUDCountries" | "EURCountries" | "International" | "NZDCountries" | "Canada")[];
819
+ tagIds: string[];
820
+ sections: string[];
821
+ excludedTagIds: string[];
822
+ excludedSections: string[];
823
+ alwaysAsk: boolean;
824
+ userCohort: "AllExistingSupporters" | "AllNonSupporters" | "Everyone" | "PostAskPauseSingleContributors";
825
+ hasCountryName: boolean;
826
+ highPriority: boolean;
827
+ useLocalViewLog: boolean;
828
+ variants: {
829
+ name: string;
830
+ paragraphs: string[];
831
+ heading?: string | undefined;
832
+ highlightedText?: string | undefined;
833
+ tickerSettings?: {
834
+ name: "US" | "AU";
835
+ copy: {
836
+ countLabel: string;
837
+ goalReachedPrimary: string;
838
+ goalReachedSecondary: string;
839
+ };
840
+ endType: import("../props").TickerEndType;
841
+ countType: import("../props").TickerCountType;
842
+ currencySymbol: string;
843
+ tickerData?: {
844
+ total: number;
845
+ goal: number;
846
+ } | undefined;
847
+ } | undefined;
848
+ cta?: {
849
+ text: string;
850
+ baseUrl: string;
851
+ } | undefined;
852
+ secondaryCta?: {
853
+ type: import("../props").SecondaryCtaType.Custom;
854
+ cta: {
855
+ text: string;
856
+ baseUrl: string;
857
+ };
858
+ } | {
859
+ type: import("../props").SecondaryCtaType.ContributionsReminder;
860
+ } | undefined;
861
+ newsletterSignup?: {
862
+ url: string;
863
+ } | undefined;
864
+ footer?: string | undefined;
865
+ image?: {
866
+ mainUrl: string;
867
+ altText: string;
868
+ mobileUrl?: string | undefined;
869
+ tabletUrl?: string | undefined;
870
+ desktopUrl?: string | undefined;
871
+ leftColUrl?: string | undefined;
872
+ wideUrl?: string | undefined;
873
+ } | undefined;
874
+ showReminderFields?: {
875
+ reminderCta: string;
876
+ reminderLabel: string;
877
+ reminderPeriod: string;
878
+ } | undefined;
879
+ separateArticleCount?: {
880
+ type: "above";
881
+ copy?: string | undefined;
882
+ countType?: "for52Weeks" | "forTargetedWeeks" | undefined;
883
+ } | undefined;
884
+ maxViews?: {
885
+ maxViewsCount: number;
886
+ maxViewsDays: number;
887
+ minDaysBetweenViews: number;
888
+ } | undefined;
889
+ showSignInLink?: boolean | undefined;
890
+ bylineWithImage?: {
891
+ name: string;
892
+ description?: string | undefined;
893
+ headshot?: {
894
+ mainUrl: string;
895
+ altText: string;
896
+ mobileUrl?: string | undefined;
897
+ tabletUrl?: string | undefined;
898
+ desktopUrl?: string | undefined;
899
+ leftColUrl?: string | undefined;
900
+ wideUrl?: string | undefined;
901
+ } | undefined;
902
+ } | undefined;
903
+ showChoiceCards?: boolean | undefined;
904
+ choiceCardAmounts?: {
905
+ testName: string;
906
+ variantName: string;
907
+ defaultContributionType: "ONE_OFF" | "MONTHLY" | "ANNUAL";
908
+ displayContributionType: ("ONE_OFF" | "MONTHLY" | "ANNUAL")[];
909
+ amountsCardData: {
910
+ ONE_OFF: {
911
+ amounts: number[];
912
+ defaultAmount: number;
913
+ hideChooseYourAmount?: boolean | undefined;
914
+ };
915
+ MONTHLY: {
916
+ amounts: number[];
917
+ defaultAmount: number;
918
+ hideChooseYourAmount?: boolean | undefined;
919
+ };
920
+ ANNUAL: {
921
+ amounts: number[];
922
+ defaultAmount: number;
923
+ hideChooseYourAmount?: boolean | undefined;
924
+ };
925
+ };
926
+ } | undefined;
927
+ defaultChoiceCardFrequency?: "ONE_OFF" | "MONTHLY" | "ANNUAL" | undefined;
928
+ }[];
929
+ controlProportionSettings?: {
930
+ offset: number;
931
+ proportion: number;
932
+ } | undefined;
933
+ deviceType?: "Mobile" | "Desktop" | "All" | undefined;
934
+ signedInStatus?: "All" | "SignedIn" | "SignedOut" | undefined;
935
+ maxViews?: {
936
+ maxViewsCount: number;
937
+ maxViewsDays: number;
938
+ minDaysBetweenViews: number;
939
+ } | undefined;
940
+ articlesViewedSettings?: {
941
+ minViews: number;
942
+ periodInWeeks: number;
943
+ maxViews?: number | undefined;
944
+ tagId?: string | undefined;
945
+ } | undefined;
946
+ }>;
947
+ export type EpicVariant = z.infer<typeof variantSchema>;
111
948
  export {};
112
949
  //# sourceMappingURL=epic.d.ts.map