@guardian/support-dotcom-components 0.0.0-beta-20251028082458

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 (71) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +6 -0
  3. package/dist/dotcom/index.d.ts +14 -0
  4. package/dist/dotcom/index.d.ts.map +1 -0
  5. package/dist/dotcom/requests.d.ts +18 -0
  6. package/dist/dotcom/requests.d.ts.map +1 -0
  7. package/dist/dotcom/types.d.ts +6 -0
  8. package/dist/dotcom/types.d.ts.map +1 -0
  9. package/dist/index.esm.js +1 -0
  10. package/dist/index.js +1 -0
  11. package/dist/shared/lib/geolocation.d.ts +44 -0
  12. package/dist/shared/lib/geolocation.d.ts.map +1 -0
  13. package/dist/shared/lib/history.d.ts +18 -0
  14. package/dist/shared/lib/history.d.ts.map +1 -0
  15. package/dist/shared/lib/index.d.ts +6 -0
  16. package/dist/shared/lib/index.d.ts.map +1 -0
  17. package/dist/shared/lib/placeholders.d.ts +12 -0
  18. package/dist/shared/lib/placeholders.d.ts.map +1 -0
  19. package/dist/shared/lib/reminderFields.d.ts +9 -0
  20. package/dist/shared/lib/reminderFields.d.ts.map +1 -0
  21. package/dist/shared/lib/viewLog.d.ts +17 -0
  22. package/dist/shared/lib/viewLog.d.ts.map +1 -0
  23. package/dist/shared/types/abTests/banner.d.ts +424 -0
  24. package/dist/shared/types/abTests/banner.d.ts.map +1 -0
  25. package/dist/shared/types/abTests/epic.d.ts +345 -0
  26. package/dist/shared/types/abTests/epic.d.ts.map +1 -0
  27. package/dist/shared/types/abTests/gutter.d.ts +146 -0
  28. package/dist/shared/types/abTests/gutter.d.ts.map +1 -0
  29. package/dist/shared/types/abTests/header.d.ts +173 -0
  30. package/dist/shared/types/abTests/header.d.ts.map +1 -0
  31. package/dist/shared/types/abTests/index.d.ts +6 -0
  32. package/dist/shared/types/abTests/index.d.ts.map +1 -0
  33. package/dist/shared/types/abTests/shared.d.ts +186 -0
  34. package/dist/shared/types/abTests/shared.d.ts.map +1 -0
  35. package/dist/shared/types/index.d.ts +6 -0
  36. package/dist/shared/types/index.d.ts.map +1 -0
  37. package/dist/shared/types/prices.d.ts +10 -0
  38. package/dist/shared/types/prices.d.ts.map +1 -0
  39. package/dist/shared/types/props/banner.d.ts +313 -0
  40. package/dist/shared/types/props/banner.d.ts.map +1 -0
  41. package/dist/shared/types/props/choiceCards.d.ts +108 -0
  42. package/dist/shared/types/props/choiceCards.d.ts.map +1 -0
  43. package/dist/shared/types/props/design.d.ts +164 -0
  44. package/dist/shared/types/props/design.d.ts.map +1 -0
  45. package/dist/shared/types/props/epic.d.ts +429 -0
  46. package/dist/shared/types/props/epic.d.ts.map +1 -0
  47. package/dist/shared/types/props/gutter.d.ts +75 -0
  48. package/dist/shared/types/props/gutter.d.ts.map +1 -0
  49. package/dist/shared/types/props/header.d.ts +87 -0
  50. package/dist/shared/types/props/header.d.ts.map +1 -0
  51. package/dist/shared/types/props/index.d.ts +7 -0
  52. package/dist/shared/types/props/index.d.ts.map +1 -0
  53. package/dist/shared/types/props/shared.d.ts +180 -0
  54. package/dist/shared/types/props/shared.d.ts.map +1 -0
  55. package/dist/shared/types/purchaseInfo.d.ts +18 -0
  56. package/dist/shared/types/purchaseInfo.d.ts.map +1 -0
  57. package/dist/shared/types/reminders.d.ts +16 -0
  58. package/dist/shared/types/reminders.d.ts.map +1 -0
  59. package/dist/shared/types/targeting/banner.d.ts +28 -0
  60. package/dist/shared/types/targeting/banner.d.ts.map +1 -0
  61. package/dist/shared/types/targeting/epic.d.ts +30 -0
  62. package/dist/shared/types/targeting/epic.d.ts.map +1 -0
  63. package/dist/shared/types/targeting/gutter.d.ts +13 -0
  64. package/dist/shared/types/targeting/gutter.d.ts.map +1 -0
  65. package/dist/shared/types/targeting/header.d.ts +13 -0
  66. package/dist/shared/types/targeting/header.d.ts.map +1 -0
  67. package/dist/shared/types/targeting/index.d.ts +6 -0
  68. package/dist/shared/types/targeting/index.d.ts.map +1 -0
  69. package/dist/shared/types/targeting/shared.d.ts +30 -0
  70. package/dist/shared/types/targeting/shared.d.ts.map +1 -0
  71. package/package.json +104 -0
@@ -0,0 +1,424 @@
1
+ import type { OphanComponentType, OphanProduct } from '@guardian/libs';
2
+ import { z } from 'zod';
3
+ import type { BannerChannel, ConfigurableDesign } from '../props';
4
+ import type { BannerTargeting } from '../targeting';
5
+ import type { TargetingAbTest } from './shared';
6
+ import type { PurchaseInfoTest } from './shared';
7
+ /**
8
+ * The `template` field decides which React component to use for a banner.
9
+ * This field has type `BannerUi`, which is a union of `BannerDesignName` and `BannerTemplate`.
10
+ *
11
+ * If the type is `BannerDesignName` then the `DesignableBanner` component is used and a `designName` must be provided.
12
+ *
13
+ * If the type is `BannerTemplate` then it must be the name of one of a fixed set of "templates". Currently only the `SignInPromptBanner` exists.
14
+ *
15
+ * Note - support-admin-console (the RRCP) only allows `BannerDesignName`, but here in SDC we do support other banner components.
16
+ */
17
+ export declare enum BannerTemplate {
18
+ SignInPromptBanner = "SignInPromptBanner"
19
+ }
20
+ export interface BannerDesignName {
21
+ designName: string;
22
+ }
23
+ type BannerUi = BannerTemplate | BannerDesignName;
24
+ export declare function uiIsDesign(ui: BannerUi): ui is BannerDesignName;
25
+ export declare const bannerVariantFromToolSchema: z.ZodObject<{
26
+ name: z.ZodString;
27
+ tickerSettings: z.ZodOptional<z.ZodObject<{
28
+ currencySymbol: z.ZodString;
29
+ copy: z.ZodObject<{
30
+ countLabel: z.ZodString;
31
+ goalCopy: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strip>;
33
+ name: z.ZodEnum<{
34
+ global: "global";
35
+ US: "US";
36
+ AU: "AU";
37
+ }>;
38
+ tickerData: z.ZodOptional<z.ZodObject<{
39
+ total: z.ZodNumber;
40
+ goal: z.ZodNumber;
41
+ }, z.core.$strip>>;
42
+ }, z.core.$strip>>;
43
+ template: z.ZodUnion<readonly [z.ZodEnum<typeof BannerTemplate>, z.ZodObject<{
44
+ designName: z.ZodString;
45
+ }, z.core.$strip>]>;
46
+ bannerContent: z.ZodOptional<z.ZodObject<{
47
+ heading: z.ZodOptional<z.ZodString>;
48
+ messageText: z.ZodOptional<z.ZodString>;
49
+ paragraphs: z.ZodOptional<z.ZodArray<z.ZodString>>;
50
+ mobileMessageText: z.ZodOptional<z.ZodString>;
51
+ highlightedText: z.ZodOptional<z.ZodString>;
52
+ cta: z.ZodOptional<z.ZodObject<{
53
+ text: z.ZodString;
54
+ baseUrl: z.ZodString;
55
+ }, z.core.$strip>>;
56
+ secondaryCta: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
57
+ type: z.ZodLiteral<import("../props").SecondaryCtaType.Custom>;
58
+ cta: z.ZodObject<{
59
+ text: z.ZodString;
60
+ baseUrl: z.ZodString;
61
+ }, z.core.$strip>;
62
+ }, z.core.$strip>, z.ZodObject<{
63
+ type: z.ZodLiteral<import("../props").SecondaryCtaType.ContributionsReminder>;
64
+ }, z.core.$strip>], "type">>;
65
+ }, z.core.$strip>>;
66
+ mobileBannerContent: z.ZodOptional<z.ZodObject<{
67
+ heading: z.ZodOptional<z.ZodString>;
68
+ messageText: z.ZodOptional<z.ZodString>;
69
+ paragraphs: z.ZodOptional<z.ZodArray<z.ZodString>>;
70
+ mobileMessageText: z.ZodOptional<z.ZodString>;
71
+ highlightedText: z.ZodOptional<z.ZodString>;
72
+ cta: z.ZodOptional<z.ZodObject<{
73
+ text: z.ZodString;
74
+ baseUrl: z.ZodString;
75
+ }, z.core.$strip>>;
76
+ secondaryCta: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
77
+ type: z.ZodLiteral<import("../props").SecondaryCtaType.Custom>;
78
+ cta: z.ZodObject<{
79
+ text: z.ZodString;
80
+ baseUrl: z.ZodString;
81
+ }, z.core.$strip>;
82
+ }, z.core.$strip>, z.ZodObject<{
83
+ type: z.ZodLiteral<import("../props").SecondaryCtaType.ContributionsReminder>;
84
+ }, z.core.$strip>], "type">>;
85
+ }, z.core.$strip>>;
86
+ separateArticleCount: z.ZodOptional<z.ZodBoolean>;
87
+ separateArticleCountSettings: z.ZodOptional<z.ZodObject<{
88
+ type: z.ZodLiteral<"above">;
89
+ copy: z.ZodOptional<z.ZodString>;
90
+ countType: z.ZodOptional<z.ZodEnum<{
91
+ for52Weeks: "for52Weeks";
92
+ forTargetedWeeks: "forTargetedWeeks";
93
+ }>>;
94
+ }, z.core.$strip>>;
95
+ choiceCardsSettings: z.ZodOptional<z.ZodNullable<z.ZodObject<{
96
+ choiceCards: z.ZodArray<z.ZodObject<{
97
+ product: z.ZodDiscriminatedUnion<[z.ZodObject<{
98
+ supportTier: z.ZodLiteral<"Contribution">;
99
+ ratePlan: z.ZodUnion<readonly [z.ZodLiteral<"Monthly">, z.ZodLiteral<"Annual">]>;
100
+ }, z.core.$strip>, z.ZodObject<{
101
+ supportTier: z.ZodLiteral<"SupporterPlus">;
102
+ ratePlan: z.ZodUnion<readonly [z.ZodLiteral<"Monthly">, z.ZodLiteral<"Annual">]>;
103
+ }, z.core.$strip>, z.ZodObject<{
104
+ supportTier: z.ZodLiteral<"OneOff">;
105
+ }, z.core.$strip>], "supportTier">;
106
+ label: z.ZodString;
107
+ isDefault: z.ZodBoolean;
108
+ benefitsLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
109
+ benefits: z.ZodArray<z.ZodObject<{
110
+ copy: z.ZodString;
111
+ }, z.core.$strip>>;
112
+ pill: z.ZodOptional<z.ZodNullable<z.ZodObject<{
113
+ copy: z.ZodString;
114
+ textColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
115
+ r: z.ZodString;
116
+ g: z.ZodString;
117
+ b: z.ZodString;
118
+ kind: z.ZodLiteral<"hex">;
119
+ }, z.core.$strip>>>;
120
+ backgroundColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
121
+ r: z.ZodString;
122
+ g: z.ZodString;
123
+ b: z.ZodString;
124
+ kind: z.ZodLiteral<"hex">;
125
+ }, z.core.$strip>>>;
126
+ }, z.core.$strip>>>;
127
+ destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
128
+ }, z.core.$strip>>;
129
+ mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
130
+ product: z.ZodDiscriminatedUnion<[z.ZodObject<{
131
+ supportTier: z.ZodLiteral<"Contribution">;
132
+ ratePlan: z.ZodUnion<readonly [z.ZodLiteral<"Monthly">, z.ZodLiteral<"Annual">]>;
133
+ }, z.core.$strip>, z.ZodObject<{
134
+ supportTier: z.ZodLiteral<"SupporterPlus">;
135
+ ratePlan: z.ZodUnion<readonly [z.ZodLiteral<"Monthly">, z.ZodLiteral<"Annual">]>;
136
+ }, z.core.$strip>, z.ZodObject<{
137
+ supportTier: z.ZodLiteral<"OneOff">;
138
+ }, z.core.$strip>], "supportTier">;
139
+ label: z.ZodString;
140
+ isDefault: z.ZodBoolean;
141
+ benefitsLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
142
+ benefits: z.ZodArray<z.ZodObject<{
143
+ copy: z.ZodString;
144
+ }, z.core.$strip>>;
145
+ pill: z.ZodOptional<z.ZodNullable<z.ZodObject<{
146
+ copy: z.ZodString;
147
+ textColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
148
+ r: z.ZodString;
149
+ g: z.ZodString;
150
+ b: z.ZodString;
151
+ kind: z.ZodLiteral<"hex">;
152
+ }, z.core.$strip>>>;
153
+ backgroundColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
154
+ r: z.ZodString;
155
+ g: z.ZodString;
156
+ b: z.ZodString;
157
+ kind: z.ZodLiteral<"hex">;
158
+ }, z.core.$strip>>>;
159
+ }, z.core.$strip>>>;
160
+ destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
161
+ }, z.core.$strip>>>>;
162
+ }, z.core.$strip>>>;
163
+ promoCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
164
+ }, z.core.$strip>;
165
+ export type BannerVariantFromTool = z.infer<typeof bannerVariantFromToolSchema>;
166
+ export interface BannerVariant extends BannerVariantFromTool {
167
+ componentType: OphanComponentType;
168
+ products?: OphanProduct[];
169
+ }
170
+ export type CanRun = (targeting: BannerTargeting) => boolean;
171
+ export type BannerTestGenerator = () => Promise<BannerTest[]>;
172
+ export interface BannerTestSelection {
173
+ test: BannerTest;
174
+ variant: BannerVariant;
175
+ moduleName: string;
176
+ targetingAbTest?: TargetingAbTest;
177
+ }
178
+ export interface BannerTest extends BannerTestFromTool {
179
+ bannerChannel: BannerChannel;
180
+ isHardcoded: boolean;
181
+ canRun?: CanRun;
182
+ purchaseInfo?: PurchaseInfoTest;
183
+ variants: BannerVariant[];
184
+ }
185
+ export declare const bannerTestFromToolSchema: z.ZodObject<{
186
+ channel: z.ZodEnum<{
187
+ Epic: "Epic";
188
+ EpicAppleNews: "EpicAppleNews";
189
+ EpicLiveblog: "EpicLiveblog";
190
+ Banner1: "Banner1";
191
+ Banner2: "Banner2";
192
+ Header: "Header";
193
+ GutterLiveblog: "GutterLiveblog";
194
+ }>;
195
+ name: z.ZodString;
196
+ status: z.ZodEnum<{
197
+ Live: "Live";
198
+ Draft: "Draft";
199
+ Archived: "Archived";
200
+ }>;
201
+ priority: z.ZodNumber;
202
+ controlProportionSettings: z.ZodOptional<z.ZodObject<{
203
+ proportion: z.ZodNumber;
204
+ offset: z.ZodNumber;
205
+ }, z.core.$strip>>;
206
+ deviceType: z.ZodOptional<z.ZodEnum<{
207
+ Mobile: "Mobile";
208
+ Desktop: "Desktop";
209
+ All: "All";
210
+ iOS: "iOS";
211
+ Android: "Android";
212
+ }>>;
213
+ signedInStatus: z.ZodOptional<z.ZodEnum<{
214
+ All: "All";
215
+ SignedIn: "SignedIn";
216
+ SignedOut: "SignedOut";
217
+ }>>;
218
+ consentStatus: z.ZodOptional<z.ZodEnum<{
219
+ All: "All";
220
+ HasConsented: "HasConsented";
221
+ HasNotConsented: "HasNotConsented";
222
+ }>>;
223
+ methodologies: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
224
+ name: z.ZodLiteral<"ABTest">;
225
+ }, z.core.$strip>, z.ZodObject<{
226
+ name: z.ZodLiteral<"EpsilonGreedyBandit">;
227
+ epsilon: z.ZodNumber;
228
+ sampleCount: z.ZodOptional<z.ZodNumber>;
229
+ }, z.core.$strip>, z.ZodObject<{
230
+ name: z.ZodLiteral<"Roulette">;
231
+ sampleCount: z.ZodOptional<z.ZodNumber>;
232
+ }, z.core.$strip>], "name">, z.ZodObject<{
233
+ testName: z.ZodOptional<z.ZodString>;
234
+ }, z.core.$strip>>>>;
235
+ userCohort: z.ZodEnum<{
236
+ AllExistingSupporters: "AllExistingSupporters";
237
+ AllNonSupporters: "AllNonSupporters";
238
+ Everyone: "Everyone";
239
+ PostAskPauseSingleContributors: "PostAskPauseSingleContributors";
240
+ }>;
241
+ locations: z.ZodOptional<z.ZodArray<z.ZodEnum<{
242
+ GBPCountries: "GBPCountries";
243
+ UnitedStates: "UnitedStates";
244
+ AUDCountries: "AUDCountries";
245
+ EURCountries: "EURCountries";
246
+ International: "International";
247
+ NZDCountries: "NZDCountries";
248
+ Canada: "Canada";
249
+ }>>>;
250
+ regionTargeting: z.ZodOptional<z.ZodOptional<z.ZodObject<{
251
+ targetedCountryGroups: z.ZodArray<z.ZodEnum<{
252
+ GBPCountries: "GBPCountries";
253
+ UnitedStates: "UnitedStates";
254
+ AUDCountries: "AUDCountries";
255
+ EURCountries: "EURCountries";
256
+ International: "International";
257
+ NZDCountries: "NZDCountries";
258
+ Canada: "Canada";
259
+ }>>;
260
+ targetedCountryCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
261
+ }, z.core.$strip>>>;
262
+ contextTargeting: z.ZodObject<{
263
+ tagIds: z.ZodArray<z.ZodString>;
264
+ sectionIds: z.ZodArray<z.ZodString>;
265
+ excludedTagIds: z.ZodArray<z.ZodString>;
266
+ excludedSectionIds: z.ZodArray<z.ZodString>;
267
+ }, z.core.$strip>;
268
+ variants: z.ZodArray<z.ZodObject<{
269
+ name: z.ZodString;
270
+ tickerSettings: z.ZodOptional<z.ZodObject<{
271
+ currencySymbol: z.ZodString;
272
+ copy: z.ZodObject<{
273
+ countLabel: z.ZodString;
274
+ goalCopy: z.ZodOptional<z.ZodString>;
275
+ }, z.core.$strip>;
276
+ name: z.ZodEnum<{
277
+ global: "global";
278
+ US: "US";
279
+ AU: "AU";
280
+ }>;
281
+ tickerData: z.ZodOptional<z.ZodObject<{
282
+ total: z.ZodNumber;
283
+ goal: z.ZodNumber;
284
+ }, z.core.$strip>>;
285
+ }, z.core.$strip>>;
286
+ template: z.ZodUnion<readonly [z.ZodEnum<typeof BannerTemplate>, z.ZodObject<{
287
+ designName: z.ZodString;
288
+ }, z.core.$strip>]>;
289
+ bannerContent: z.ZodOptional<z.ZodObject<{
290
+ heading: z.ZodOptional<z.ZodString>;
291
+ messageText: z.ZodOptional<z.ZodString>;
292
+ paragraphs: z.ZodOptional<z.ZodArray<z.ZodString>>;
293
+ mobileMessageText: z.ZodOptional<z.ZodString>;
294
+ highlightedText: z.ZodOptional<z.ZodString>;
295
+ cta: z.ZodOptional<z.ZodObject<{
296
+ text: z.ZodString;
297
+ baseUrl: z.ZodString;
298
+ }, z.core.$strip>>;
299
+ secondaryCta: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
300
+ type: z.ZodLiteral<import("../props").SecondaryCtaType.Custom>;
301
+ cta: z.ZodObject<{
302
+ text: z.ZodString;
303
+ baseUrl: z.ZodString;
304
+ }, z.core.$strip>;
305
+ }, z.core.$strip>, z.ZodObject<{
306
+ type: z.ZodLiteral<import("../props").SecondaryCtaType.ContributionsReminder>;
307
+ }, z.core.$strip>], "type">>;
308
+ }, z.core.$strip>>;
309
+ mobileBannerContent: z.ZodOptional<z.ZodObject<{
310
+ heading: z.ZodOptional<z.ZodString>;
311
+ messageText: z.ZodOptional<z.ZodString>;
312
+ paragraphs: z.ZodOptional<z.ZodArray<z.ZodString>>;
313
+ mobileMessageText: z.ZodOptional<z.ZodString>;
314
+ highlightedText: z.ZodOptional<z.ZodString>;
315
+ cta: z.ZodOptional<z.ZodObject<{
316
+ text: z.ZodString;
317
+ baseUrl: z.ZodString;
318
+ }, z.core.$strip>>;
319
+ secondaryCta: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
320
+ type: z.ZodLiteral<import("../props").SecondaryCtaType.Custom>;
321
+ cta: z.ZodObject<{
322
+ text: z.ZodString;
323
+ baseUrl: z.ZodString;
324
+ }, z.core.$strip>;
325
+ }, z.core.$strip>, z.ZodObject<{
326
+ type: z.ZodLiteral<import("../props").SecondaryCtaType.ContributionsReminder>;
327
+ }, z.core.$strip>], "type">>;
328
+ }, z.core.$strip>>;
329
+ separateArticleCount: z.ZodOptional<z.ZodBoolean>;
330
+ separateArticleCountSettings: z.ZodOptional<z.ZodObject<{
331
+ type: z.ZodLiteral<"above">;
332
+ copy: z.ZodOptional<z.ZodString>;
333
+ countType: z.ZodOptional<z.ZodEnum<{
334
+ for52Weeks: "for52Weeks";
335
+ forTargetedWeeks: "forTargetedWeeks";
336
+ }>>;
337
+ }, z.core.$strip>>;
338
+ choiceCardsSettings: z.ZodOptional<z.ZodNullable<z.ZodObject<{
339
+ choiceCards: z.ZodArray<z.ZodObject<{
340
+ product: z.ZodDiscriminatedUnion<[z.ZodObject<{
341
+ supportTier: z.ZodLiteral<"Contribution">;
342
+ ratePlan: z.ZodUnion<readonly [z.ZodLiteral<"Monthly">, z.ZodLiteral<"Annual">]>;
343
+ }, z.core.$strip>, z.ZodObject<{
344
+ supportTier: z.ZodLiteral<"SupporterPlus">;
345
+ ratePlan: z.ZodUnion<readonly [z.ZodLiteral<"Monthly">, z.ZodLiteral<"Annual">]>;
346
+ }, z.core.$strip>, z.ZodObject<{
347
+ supportTier: z.ZodLiteral<"OneOff">;
348
+ }, z.core.$strip>], "supportTier">;
349
+ label: z.ZodString;
350
+ isDefault: z.ZodBoolean;
351
+ benefitsLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
352
+ benefits: z.ZodArray<z.ZodObject<{
353
+ copy: z.ZodString;
354
+ }, z.core.$strip>>;
355
+ pill: z.ZodOptional<z.ZodNullable<z.ZodObject<{
356
+ copy: z.ZodString;
357
+ textColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
358
+ r: z.ZodString;
359
+ g: z.ZodString;
360
+ b: z.ZodString;
361
+ kind: z.ZodLiteral<"hex">;
362
+ }, z.core.$strip>>>;
363
+ backgroundColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
364
+ r: z.ZodString;
365
+ g: z.ZodString;
366
+ b: z.ZodString;
367
+ kind: z.ZodLiteral<"hex">;
368
+ }, z.core.$strip>>>;
369
+ }, z.core.$strip>>>;
370
+ destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
371
+ }, z.core.$strip>>;
372
+ mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
373
+ product: z.ZodDiscriminatedUnion<[z.ZodObject<{
374
+ supportTier: z.ZodLiteral<"Contribution">;
375
+ ratePlan: z.ZodUnion<readonly [z.ZodLiteral<"Monthly">, z.ZodLiteral<"Annual">]>;
376
+ }, z.core.$strip>, z.ZodObject<{
377
+ supportTier: z.ZodLiteral<"SupporterPlus">;
378
+ ratePlan: z.ZodUnion<readonly [z.ZodLiteral<"Monthly">, z.ZodLiteral<"Annual">]>;
379
+ }, z.core.$strip>, z.ZodObject<{
380
+ supportTier: z.ZodLiteral<"OneOff">;
381
+ }, z.core.$strip>], "supportTier">;
382
+ label: z.ZodString;
383
+ isDefault: z.ZodBoolean;
384
+ benefitsLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
385
+ benefits: z.ZodArray<z.ZodObject<{
386
+ copy: z.ZodString;
387
+ }, z.core.$strip>>;
388
+ pill: z.ZodOptional<z.ZodNullable<z.ZodObject<{
389
+ copy: z.ZodString;
390
+ textColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
391
+ r: z.ZodString;
392
+ g: z.ZodString;
393
+ b: z.ZodString;
394
+ kind: z.ZodLiteral<"hex">;
395
+ }, z.core.$strip>>>;
396
+ backgroundColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
397
+ r: z.ZodString;
398
+ g: z.ZodString;
399
+ b: z.ZodString;
400
+ kind: z.ZodLiteral<"hex">;
401
+ }, z.core.$strip>>>;
402
+ }, z.core.$strip>>>;
403
+ destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
404
+ }, z.core.$strip>>>>;
405
+ }, z.core.$strip>>>;
406
+ promoCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
407
+ }, z.core.$strip>>;
408
+ articlesViewedSettings: z.ZodOptional<z.ZodObject<{
409
+ minViews: z.ZodNumber;
410
+ maxViews: z.ZodOptional<z.ZodNumber>;
411
+ periodInWeeks: z.ZodNumber;
412
+ tagIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
413
+ }, z.core.$strip>>;
414
+ deploySchedule: z.ZodOptional<z.ZodObject<{
415
+ daysBetween: z.ZodNumber;
416
+ }, z.core.$strip>>;
417
+ frontsOnly: z.ZodOptional<z.ZodBoolean>;
418
+ }, z.core.$strip>;
419
+ export type BannerTestFromTool = z.infer<typeof bannerTestFromToolSchema>;
420
+ export type BannerDesignFromTool = {
421
+ name: string;
422
+ } & ConfigurableDesign;
423
+ export {};
424
+ //# sourceMappingURL=banner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/abTests/banner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA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