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