@guardian/support-dotcom-components 1.1.0 → 1.1.2

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.
@@ -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,863 @@ 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
+ footer: z.ZodOptional<z.ZodString>;
231
+ image: z.ZodOptional<z.ZodObject<{
232
+ mainUrl: z.ZodString;
233
+ mobileUrl: z.ZodOptional<z.ZodString>;
234
+ tabletUrl: z.ZodOptional<z.ZodString>;
235
+ desktopUrl: z.ZodOptional<z.ZodString>;
236
+ leftColUrl: z.ZodOptional<z.ZodString>;
237
+ wideUrl: z.ZodOptional<z.ZodString>;
238
+ altText: z.ZodString;
239
+ }, "strip", z.ZodTypeAny, {
240
+ mainUrl: string;
241
+ altText: string;
242
+ mobileUrl?: string | undefined;
243
+ tabletUrl?: string | undefined;
244
+ desktopUrl?: string | undefined;
245
+ leftColUrl?: string | undefined;
246
+ wideUrl?: string | undefined;
247
+ }, {
248
+ mainUrl: string;
249
+ altText: string;
250
+ mobileUrl?: string | undefined;
251
+ tabletUrl?: string | undefined;
252
+ desktopUrl?: string | undefined;
253
+ leftColUrl?: string | undefined;
254
+ wideUrl?: string | undefined;
255
+ }>>;
256
+ showReminderFields: z.ZodOptional<z.ZodObject<{
257
+ reminderCta: z.ZodString;
258
+ reminderLabel: z.ZodString;
259
+ reminderPeriod: z.ZodString;
260
+ }, "strip", z.ZodTypeAny, {
261
+ reminderCta: string;
262
+ reminderLabel: string;
263
+ reminderPeriod: string;
264
+ }, {
265
+ reminderCta: string;
266
+ reminderLabel: string;
267
+ reminderPeriod: string;
268
+ }>>;
269
+ separateArticleCount: z.ZodOptional<z.ZodObject<{
270
+ type: z.ZodLiteral<"above">;
271
+ copy: z.ZodOptional<z.ZodString>;
272
+ }, "strip", z.ZodTypeAny, {
273
+ type: "above";
274
+ copy?: string | undefined;
275
+ }, {
276
+ type: "above";
277
+ copy?: string | undefined;
278
+ }>>;
279
+ maxViews: z.ZodOptional<z.ZodObject<{
280
+ maxViewsCount: z.ZodNumber;
281
+ maxViewsDays: z.ZodNumber;
282
+ minDaysBetweenViews: z.ZodNumber;
283
+ }, "strip", z.ZodTypeAny, {
284
+ maxViewsCount: number;
285
+ maxViewsDays: number;
286
+ minDaysBetweenViews: number;
287
+ }, {
288
+ maxViewsCount: number;
289
+ maxViewsDays: number;
290
+ minDaysBetweenViews: number;
291
+ }>>;
292
+ showSignInLink: z.ZodOptional<z.ZodBoolean>;
293
+ bylineWithImage: z.ZodOptional<z.ZodObject<{
294
+ name: z.ZodString;
295
+ description: z.ZodOptional<z.ZodString>;
296
+ headshot: z.ZodOptional<z.ZodObject<{
297
+ mainUrl: z.ZodString;
298
+ mobileUrl: z.ZodOptional<z.ZodString>;
299
+ tabletUrl: z.ZodOptional<z.ZodString>;
300
+ desktopUrl: z.ZodOptional<z.ZodString>;
301
+ leftColUrl: z.ZodOptional<z.ZodString>;
302
+ wideUrl: z.ZodOptional<z.ZodString>;
303
+ altText: z.ZodString;
304
+ }, "strip", z.ZodTypeAny, {
305
+ mainUrl: string;
306
+ altText: string;
307
+ mobileUrl?: string | undefined;
308
+ tabletUrl?: string | undefined;
309
+ desktopUrl?: string | undefined;
310
+ leftColUrl?: string | undefined;
311
+ wideUrl?: string | undefined;
312
+ }, {
313
+ mainUrl: string;
314
+ altText: string;
315
+ mobileUrl?: string | undefined;
316
+ tabletUrl?: string | undefined;
317
+ desktopUrl?: string | undefined;
318
+ leftColUrl?: string | undefined;
319
+ wideUrl?: string | undefined;
320
+ }>>;
321
+ }, "strip", z.ZodTypeAny, {
322
+ name: string;
323
+ description?: string | undefined;
324
+ headshot?: {
325
+ mainUrl: string;
326
+ altText: string;
327
+ mobileUrl?: string | undefined;
328
+ tabletUrl?: string | undefined;
329
+ desktopUrl?: string | undefined;
330
+ leftColUrl?: string | undefined;
331
+ wideUrl?: string | undefined;
332
+ } | undefined;
333
+ }, {
334
+ name: string;
335
+ description?: string | undefined;
336
+ headshot?: {
337
+ mainUrl: string;
338
+ altText: string;
339
+ mobileUrl?: string | undefined;
340
+ tabletUrl?: string | undefined;
341
+ desktopUrl?: string | undefined;
342
+ leftColUrl?: string | undefined;
343
+ wideUrl?: string | undefined;
344
+ } | undefined;
345
+ }>>;
346
+ showChoiceCards: z.ZodOptional<z.ZodBoolean>;
347
+ choiceCardAmounts: z.ZodOptional<z.ZodObject<{
348
+ testName: z.ZodString;
349
+ variantName: z.ZodString;
350
+ defaultContributionType: z.ZodEnum<["ONE_OFF", "MONTHLY", "ANNUAL"]>;
351
+ displayContributionType: z.ZodArray<z.ZodEnum<["ONE_OFF", "MONTHLY", "ANNUAL"]>, "many">;
352
+ amountsCardData: z.ZodObject<{
353
+ ONE_OFF: z.ZodObject<{
354
+ amounts: z.ZodArray<z.ZodNumber, "many">;
355
+ defaultAmount: z.ZodNumber;
356
+ hideChooseYourAmount: z.ZodOptional<z.ZodBoolean>;
357
+ }, "strip", z.ZodTypeAny, {
358
+ amounts: number[];
359
+ defaultAmount: number;
360
+ hideChooseYourAmount?: boolean | undefined;
361
+ }, {
362
+ amounts: number[];
363
+ defaultAmount: number;
364
+ hideChooseYourAmount?: boolean | undefined;
365
+ }>;
366
+ MONTHLY: z.ZodObject<{
367
+ amounts: z.ZodArray<z.ZodNumber, "many">;
368
+ defaultAmount: z.ZodNumber;
369
+ hideChooseYourAmount: z.ZodOptional<z.ZodBoolean>;
370
+ }, "strip", z.ZodTypeAny, {
371
+ amounts: number[];
372
+ defaultAmount: number;
373
+ hideChooseYourAmount?: boolean | undefined;
374
+ }, {
375
+ amounts: number[];
376
+ defaultAmount: number;
377
+ hideChooseYourAmount?: boolean | undefined;
378
+ }>;
379
+ ANNUAL: z.ZodObject<{
380
+ amounts: z.ZodArray<z.ZodNumber, "many">;
381
+ defaultAmount: z.ZodNumber;
382
+ hideChooseYourAmount: z.ZodOptional<z.ZodBoolean>;
383
+ }, "strip", z.ZodTypeAny, {
384
+ amounts: number[];
385
+ defaultAmount: number;
386
+ hideChooseYourAmount?: boolean | undefined;
387
+ }, {
388
+ amounts: number[];
389
+ defaultAmount: number;
390
+ hideChooseYourAmount?: boolean | undefined;
391
+ }>;
392
+ }, "strip", z.ZodTypeAny, {
393
+ ONE_OFF: {
394
+ amounts: number[];
395
+ defaultAmount: number;
396
+ hideChooseYourAmount?: boolean | undefined;
397
+ };
398
+ MONTHLY: {
399
+ amounts: number[];
400
+ defaultAmount: number;
401
+ hideChooseYourAmount?: boolean | undefined;
402
+ };
403
+ ANNUAL: {
404
+ amounts: number[];
405
+ defaultAmount: number;
406
+ hideChooseYourAmount?: boolean | undefined;
407
+ };
408
+ }, {
409
+ ONE_OFF: {
410
+ amounts: number[];
411
+ defaultAmount: number;
412
+ hideChooseYourAmount?: boolean | undefined;
413
+ };
414
+ MONTHLY: {
415
+ amounts: number[];
416
+ defaultAmount: number;
417
+ hideChooseYourAmount?: boolean | undefined;
418
+ };
419
+ ANNUAL: {
420
+ amounts: number[];
421
+ defaultAmount: number;
422
+ hideChooseYourAmount?: boolean | undefined;
423
+ };
424
+ }>;
425
+ }, "strip", z.ZodTypeAny, {
426
+ testName: string;
427
+ variantName: string;
428
+ defaultContributionType: "ONE_OFF" | "MONTHLY" | "ANNUAL";
429
+ displayContributionType: ("ONE_OFF" | "MONTHLY" | "ANNUAL")[];
430
+ amountsCardData: {
431
+ ONE_OFF: {
432
+ amounts: number[];
433
+ defaultAmount: number;
434
+ hideChooseYourAmount?: boolean | undefined;
435
+ };
436
+ MONTHLY: {
437
+ amounts: number[];
438
+ defaultAmount: number;
439
+ hideChooseYourAmount?: boolean | undefined;
440
+ };
441
+ ANNUAL: {
442
+ amounts: number[];
443
+ defaultAmount: number;
444
+ hideChooseYourAmount?: boolean | undefined;
445
+ };
446
+ };
447
+ }, {
448
+ testName: string;
449
+ variantName: string;
450
+ defaultContributionType: "ONE_OFF" | "MONTHLY" | "ANNUAL";
451
+ displayContributionType: ("ONE_OFF" | "MONTHLY" | "ANNUAL")[];
452
+ amountsCardData: {
453
+ ONE_OFF: {
454
+ amounts: number[];
455
+ defaultAmount: number;
456
+ hideChooseYourAmount?: boolean | undefined;
457
+ };
458
+ MONTHLY: {
459
+ amounts: number[];
460
+ defaultAmount: number;
461
+ hideChooseYourAmount?: boolean | undefined;
462
+ };
463
+ ANNUAL: {
464
+ amounts: number[];
465
+ defaultAmount: number;
466
+ hideChooseYourAmount?: boolean | undefined;
467
+ };
468
+ };
469
+ }>>;
470
+ defaultChoiceCardFrequency: z.ZodOptional<z.ZodEnum<["ONE_OFF", "MONTHLY", "ANNUAL"]>>;
471
+ }, "strip", z.ZodTypeAny, {
472
+ name: string;
473
+ paragraphs: string[];
474
+ heading?: string | undefined;
475
+ highlightedText?: string | undefined;
476
+ tickerSettings?: {
477
+ name: "US" | "AU";
478
+ copy: {
479
+ countLabel: string;
480
+ goalReachedPrimary: string;
481
+ goalReachedSecondary: string;
482
+ };
483
+ endType: import("../props").TickerEndType;
484
+ countType: import("../props").TickerCountType;
485
+ currencySymbol: string;
486
+ tickerData?: {
487
+ total: number;
488
+ goal: number;
489
+ } | undefined;
490
+ } | undefined;
491
+ cta?: {
492
+ text: string;
493
+ baseUrl: string;
494
+ } | undefined;
495
+ secondaryCta?: {
496
+ type: import("../props").SecondaryCtaType.Custom;
497
+ cta: {
498
+ text: string;
499
+ baseUrl: string;
500
+ };
501
+ } | {
502
+ type: import("../props").SecondaryCtaType.ContributionsReminder;
503
+ } | undefined;
504
+ footer?: string | undefined;
505
+ image?: {
506
+ mainUrl: string;
507
+ altText: string;
508
+ mobileUrl?: string | undefined;
509
+ tabletUrl?: string | undefined;
510
+ desktopUrl?: string | undefined;
511
+ leftColUrl?: string | undefined;
512
+ wideUrl?: string | undefined;
513
+ } | undefined;
514
+ showReminderFields?: {
515
+ reminderCta: string;
516
+ reminderLabel: string;
517
+ reminderPeriod: string;
518
+ } | undefined;
519
+ separateArticleCount?: {
520
+ type: "above";
521
+ copy?: string | undefined;
522
+ } | undefined;
523
+ maxViews?: {
524
+ maxViewsCount: number;
525
+ maxViewsDays: number;
526
+ minDaysBetweenViews: number;
527
+ } | undefined;
528
+ showSignInLink?: boolean | undefined;
529
+ bylineWithImage?: {
530
+ name: string;
531
+ description?: string | undefined;
532
+ headshot?: {
533
+ mainUrl: string;
534
+ altText: string;
535
+ mobileUrl?: string | undefined;
536
+ tabletUrl?: string | undefined;
537
+ desktopUrl?: string | undefined;
538
+ leftColUrl?: string | undefined;
539
+ wideUrl?: string | undefined;
540
+ } | undefined;
541
+ } | undefined;
542
+ showChoiceCards?: boolean | undefined;
543
+ choiceCardAmounts?: {
544
+ testName: string;
545
+ variantName: string;
546
+ defaultContributionType: "ONE_OFF" | "MONTHLY" | "ANNUAL";
547
+ displayContributionType: ("ONE_OFF" | "MONTHLY" | "ANNUAL")[];
548
+ amountsCardData: {
549
+ ONE_OFF: {
550
+ amounts: number[];
551
+ defaultAmount: number;
552
+ hideChooseYourAmount?: boolean | undefined;
553
+ };
554
+ MONTHLY: {
555
+ amounts: number[];
556
+ defaultAmount: number;
557
+ hideChooseYourAmount?: boolean | undefined;
558
+ };
559
+ ANNUAL: {
560
+ amounts: number[];
561
+ defaultAmount: number;
562
+ hideChooseYourAmount?: boolean | undefined;
563
+ };
564
+ };
565
+ } | undefined;
566
+ defaultChoiceCardFrequency?: "ONE_OFF" | "MONTHLY" | "ANNUAL" | undefined;
567
+ }, {
568
+ name: string;
569
+ paragraphs: string[];
570
+ heading?: string | undefined;
571
+ highlightedText?: string | undefined;
572
+ tickerSettings?: {
573
+ name: "US" | "AU";
574
+ copy: {
575
+ countLabel: string;
576
+ goalReachedPrimary: string;
577
+ goalReachedSecondary: string;
578
+ };
579
+ endType: import("../props").TickerEndType;
580
+ countType: import("../props").TickerCountType;
581
+ currencySymbol: string;
582
+ tickerData?: {
583
+ total: number;
584
+ goal: number;
585
+ } | undefined;
586
+ } | undefined;
587
+ cta?: {
588
+ text: string;
589
+ baseUrl: string;
590
+ } | undefined;
591
+ secondaryCta?: {
592
+ type: import("../props").SecondaryCtaType.Custom;
593
+ cta: {
594
+ text: string;
595
+ baseUrl: string;
596
+ };
597
+ } | {
598
+ type: import("../props").SecondaryCtaType.ContributionsReminder;
599
+ } | undefined;
600
+ footer?: string | undefined;
601
+ image?: {
602
+ mainUrl: string;
603
+ altText: string;
604
+ mobileUrl?: string | undefined;
605
+ tabletUrl?: string | undefined;
606
+ desktopUrl?: string | undefined;
607
+ leftColUrl?: string | undefined;
608
+ wideUrl?: string | undefined;
609
+ } | undefined;
610
+ showReminderFields?: {
611
+ reminderCta: string;
612
+ reminderLabel: string;
613
+ reminderPeriod: string;
614
+ } | undefined;
615
+ separateArticleCount?: {
616
+ type: "above";
617
+ copy?: string | undefined;
618
+ } | undefined;
619
+ maxViews?: {
620
+ maxViewsCount: number;
621
+ maxViewsDays: number;
622
+ minDaysBetweenViews: number;
623
+ } | undefined;
624
+ showSignInLink?: boolean | undefined;
625
+ bylineWithImage?: {
626
+ name: string;
627
+ description?: string | undefined;
628
+ headshot?: {
629
+ mainUrl: string;
630
+ altText: string;
631
+ mobileUrl?: string | undefined;
632
+ tabletUrl?: string | undefined;
633
+ desktopUrl?: string | undefined;
634
+ leftColUrl?: string | undefined;
635
+ wideUrl?: string | undefined;
636
+ } | undefined;
637
+ } | undefined;
638
+ showChoiceCards?: boolean | undefined;
639
+ choiceCardAmounts?: {
640
+ testName: string;
641
+ variantName: string;
642
+ defaultContributionType: "ONE_OFF" | "MONTHLY" | "ANNUAL";
643
+ displayContributionType: ("ONE_OFF" | "MONTHLY" | "ANNUAL")[];
644
+ amountsCardData: {
645
+ ONE_OFF: {
646
+ amounts: number[];
647
+ defaultAmount: number;
648
+ hideChooseYourAmount?: boolean | undefined;
649
+ };
650
+ MONTHLY: {
651
+ amounts: number[];
652
+ defaultAmount: number;
653
+ hideChooseYourAmount?: boolean | undefined;
654
+ };
655
+ ANNUAL: {
656
+ amounts: number[];
657
+ defaultAmount: number;
658
+ hideChooseYourAmount?: boolean | undefined;
659
+ };
660
+ };
661
+ } | undefined;
662
+ defaultChoiceCardFrequency?: "ONE_OFF" | "MONTHLY" | "ANNUAL" | undefined;
663
+ }>, "many">;
664
+ }, "strip", z.ZodTypeAny, {
665
+ priority: number;
86
666
  name: string;
87
- status: TestStatus;
88
- locations: CountryGroupId[];
667
+ status: "Live" | "Draft" | "Archived";
668
+ locations: ("GBPCountries" | "UnitedStates" | "AUDCountries" | "EURCountries" | "International" | "NZDCountries" | "Canada")[];
89
669
  tagIds: string[];
90
670
  sections: string[];
91
671
  excludedTagIds: string[];
92
672
  excludedSections: string[];
93
673
  alwaysAsk: boolean;
94
- maxViews?: MaxViews;
95
- userCohort: UserCohort;
96
- isLiveBlog: boolean;
674
+ userCohort: "AllExistingSupporters" | "AllNonSupporters" | "Everyone" | "PostAskPauseSingleContributors";
97
675
  hasCountryName: boolean;
98
- variants: EpicVariant[];
99
676
  highPriority: boolean;
100
677
  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
- }
678
+ variants: {
679
+ name: string;
680
+ paragraphs: string[];
681
+ heading?: string | undefined;
682
+ highlightedText?: string | undefined;
683
+ tickerSettings?: {
684
+ name: "US" | "AU";
685
+ copy: {
686
+ countLabel: string;
687
+ goalReachedPrimary: string;
688
+ goalReachedSecondary: string;
689
+ };
690
+ endType: import("../props").TickerEndType;
691
+ countType: import("../props").TickerCountType;
692
+ currencySymbol: string;
693
+ tickerData?: {
694
+ total: number;
695
+ goal: number;
696
+ } | undefined;
697
+ } | undefined;
698
+ cta?: {
699
+ text: string;
700
+ baseUrl: string;
701
+ } | undefined;
702
+ secondaryCta?: {
703
+ type: import("../props").SecondaryCtaType.Custom;
704
+ cta: {
705
+ text: string;
706
+ baseUrl: string;
707
+ };
708
+ } | {
709
+ type: import("../props").SecondaryCtaType.ContributionsReminder;
710
+ } | undefined;
711
+ footer?: string | undefined;
712
+ image?: {
713
+ mainUrl: string;
714
+ altText: string;
715
+ mobileUrl?: string | undefined;
716
+ tabletUrl?: string | undefined;
717
+ desktopUrl?: string | undefined;
718
+ leftColUrl?: string | undefined;
719
+ wideUrl?: string | undefined;
720
+ } | undefined;
721
+ showReminderFields?: {
722
+ reminderCta: string;
723
+ reminderLabel: string;
724
+ reminderPeriod: string;
725
+ } | undefined;
726
+ separateArticleCount?: {
727
+ type: "above";
728
+ copy?: string | undefined;
729
+ } | undefined;
730
+ maxViews?: {
731
+ maxViewsCount: number;
732
+ maxViewsDays: number;
733
+ minDaysBetweenViews: number;
734
+ } | undefined;
735
+ showSignInLink?: boolean | undefined;
736
+ bylineWithImage?: {
737
+ name: string;
738
+ description?: string | undefined;
739
+ headshot?: {
740
+ mainUrl: string;
741
+ altText: string;
742
+ mobileUrl?: string | undefined;
743
+ tabletUrl?: string | undefined;
744
+ desktopUrl?: string | undefined;
745
+ leftColUrl?: string | undefined;
746
+ wideUrl?: string | undefined;
747
+ } | undefined;
748
+ } | undefined;
749
+ showChoiceCards?: boolean | undefined;
750
+ choiceCardAmounts?: {
751
+ testName: string;
752
+ variantName: string;
753
+ defaultContributionType: "ONE_OFF" | "MONTHLY" | "ANNUAL";
754
+ displayContributionType: ("ONE_OFF" | "MONTHLY" | "ANNUAL")[];
755
+ amountsCardData: {
756
+ ONE_OFF: {
757
+ amounts: number[];
758
+ defaultAmount: number;
759
+ hideChooseYourAmount?: boolean | undefined;
760
+ };
761
+ MONTHLY: {
762
+ amounts: number[];
763
+ defaultAmount: number;
764
+ hideChooseYourAmount?: boolean | undefined;
765
+ };
766
+ ANNUAL: {
767
+ amounts: number[];
768
+ defaultAmount: number;
769
+ hideChooseYourAmount?: boolean | undefined;
770
+ };
771
+ };
772
+ } | undefined;
773
+ defaultChoiceCardFrequency?: "ONE_OFF" | "MONTHLY" | "ANNUAL" | undefined;
774
+ }[];
775
+ controlProportionSettings?: {
776
+ offset: number;
777
+ proportion: number;
778
+ } | undefined;
779
+ deviceType?: "Mobile" | "Desktop" | "All" | undefined;
780
+ signedInStatus?: "All" | "SignedIn" | "SignedOut" | undefined;
781
+ maxViews?: {
782
+ maxViewsCount: number;
783
+ maxViewsDays: number;
784
+ minDaysBetweenViews: number;
785
+ } | undefined;
786
+ articlesViewedSettings?: {
787
+ minViews: number;
788
+ periodInWeeks: number;
789
+ maxViews?: number | undefined;
790
+ tagId?: string | undefined;
791
+ } | undefined;
792
+ }, {
793
+ priority: number;
794
+ name: string;
795
+ status: "Live" | "Draft" | "Archived";
796
+ locations: ("GBPCountries" | "UnitedStates" | "AUDCountries" | "EURCountries" | "International" | "NZDCountries" | "Canada")[];
797
+ tagIds: string[];
798
+ sections: string[];
799
+ excludedTagIds: string[];
800
+ excludedSections: string[];
801
+ alwaysAsk: boolean;
802
+ userCohort: "AllExistingSupporters" | "AllNonSupporters" | "Everyone" | "PostAskPauseSingleContributors";
803
+ hasCountryName: boolean;
804
+ highPriority: boolean;
805
+ useLocalViewLog: boolean;
806
+ variants: {
807
+ name: string;
808
+ paragraphs: string[];
809
+ heading?: string | undefined;
810
+ highlightedText?: string | undefined;
811
+ tickerSettings?: {
812
+ name: "US" | "AU";
813
+ copy: {
814
+ countLabel: string;
815
+ goalReachedPrimary: string;
816
+ goalReachedSecondary: string;
817
+ };
818
+ endType: import("../props").TickerEndType;
819
+ countType: import("../props").TickerCountType;
820
+ currencySymbol: string;
821
+ tickerData?: {
822
+ total: number;
823
+ goal: number;
824
+ } | undefined;
825
+ } | undefined;
826
+ cta?: {
827
+ text: string;
828
+ baseUrl: string;
829
+ } | undefined;
830
+ secondaryCta?: {
831
+ type: import("../props").SecondaryCtaType.Custom;
832
+ cta: {
833
+ text: string;
834
+ baseUrl: string;
835
+ };
836
+ } | {
837
+ type: import("../props").SecondaryCtaType.ContributionsReminder;
838
+ } | undefined;
839
+ footer?: string | undefined;
840
+ image?: {
841
+ mainUrl: string;
842
+ altText: string;
843
+ mobileUrl?: string | undefined;
844
+ tabletUrl?: string | undefined;
845
+ desktopUrl?: string | undefined;
846
+ leftColUrl?: string | undefined;
847
+ wideUrl?: string | undefined;
848
+ } | undefined;
849
+ showReminderFields?: {
850
+ reminderCta: string;
851
+ reminderLabel: string;
852
+ reminderPeriod: string;
853
+ } | undefined;
854
+ separateArticleCount?: {
855
+ type: "above";
856
+ copy?: string | undefined;
857
+ } | undefined;
858
+ maxViews?: {
859
+ maxViewsCount: number;
860
+ maxViewsDays: number;
861
+ minDaysBetweenViews: number;
862
+ } | undefined;
863
+ showSignInLink?: boolean | undefined;
864
+ bylineWithImage?: {
865
+ name: string;
866
+ description?: string | undefined;
867
+ headshot?: {
868
+ mainUrl: string;
869
+ altText: string;
870
+ mobileUrl?: string | undefined;
871
+ tabletUrl?: string | undefined;
872
+ desktopUrl?: string | undefined;
873
+ leftColUrl?: string | undefined;
874
+ wideUrl?: string | undefined;
875
+ } | undefined;
876
+ } | undefined;
877
+ showChoiceCards?: boolean | undefined;
878
+ choiceCardAmounts?: {
879
+ testName: string;
880
+ variantName: string;
881
+ defaultContributionType: "ONE_OFF" | "MONTHLY" | "ANNUAL";
882
+ displayContributionType: ("ONE_OFF" | "MONTHLY" | "ANNUAL")[];
883
+ amountsCardData: {
884
+ ONE_OFF: {
885
+ amounts: number[];
886
+ defaultAmount: number;
887
+ hideChooseYourAmount?: boolean | undefined;
888
+ };
889
+ MONTHLY: {
890
+ amounts: number[];
891
+ defaultAmount: number;
892
+ hideChooseYourAmount?: boolean | undefined;
893
+ };
894
+ ANNUAL: {
895
+ amounts: number[];
896
+ defaultAmount: number;
897
+ hideChooseYourAmount?: boolean | undefined;
898
+ };
899
+ };
900
+ } | undefined;
901
+ defaultChoiceCardFrequency?: "ONE_OFF" | "MONTHLY" | "ANNUAL" | undefined;
902
+ }[];
903
+ controlProportionSettings?: {
904
+ offset: number;
905
+ proportion: number;
906
+ } | undefined;
907
+ deviceType?: "Mobile" | "Desktop" | "All" | undefined;
908
+ signedInStatus?: "All" | "SignedIn" | "SignedOut" | undefined;
909
+ maxViews?: {
910
+ maxViewsCount: number;
911
+ maxViewsDays: number;
912
+ minDaysBetweenViews: number;
913
+ } | undefined;
914
+ articlesViewedSettings?: {
915
+ minViews: number;
916
+ periodInWeeks: number;
917
+ maxViews?: number | undefined;
918
+ tagId?: string | undefined;
919
+ } | undefined;
920
+ }>;
921
+ export type EpicVariant = z.infer<typeof variantSchema>;
111
922
  export {};
112
923
  //# sourceMappingURL=epic.d.ts.map