@guardian/support-dotcom-components 3.2.0 → 5.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.
@@ -0,0 +1,409 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Models and schemas for data from the database
4
+ */
5
+ declare const gutterVariantFromToolSchema: z.ZodObject<{
6
+ name: z.ZodString;
7
+ content: z.ZodObject<{
8
+ image: z.ZodObject<{
9
+ mainUrl: z.ZodString;
10
+ mobileUrl: z.ZodOptional<z.ZodString>;
11
+ tabletUrl: z.ZodOptional<z.ZodString>;
12
+ desktopUrl: z.ZodOptional<z.ZodString>;
13
+ leftColUrl: z.ZodOptional<z.ZodString>;
14
+ wideUrl: z.ZodOptional<z.ZodString>;
15
+ altText: z.ZodString;
16
+ }, "strip", z.ZodTypeAny, {
17
+ mainUrl: string;
18
+ altText: string;
19
+ mobileUrl?: string | undefined;
20
+ tabletUrl?: string | undefined;
21
+ desktopUrl?: string | undefined;
22
+ leftColUrl?: string | undefined;
23
+ wideUrl?: string | undefined;
24
+ }, {
25
+ mainUrl: string;
26
+ altText: string;
27
+ mobileUrl?: string | undefined;
28
+ tabletUrl?: string | undefined;
29
+ desktopUrl?: string | undefined;
30
+ leftColUrl?: string | undefined;
31
+ wideUrl?: string | undefined;
32
+ }>;
33
+ bodyCopy: z.ZodArray<z.ZodString, "many">;
34
+ cta: z.ZodOptional<z.ZodObject<{
35
+ text: z.ZodString;
36
+ baseUrl: z.ZodString;
37
+ }, "strip", z.ZodTypeAny, {
38
+ text: string;
39
+ baseUrl: string;
40
+ }, {
41
+ text: string;
42
+ baseUrl: string;
43
+ }>>;
44
+ }, "strip", z.ZodTypeAny, {
45
+ image: {
46
+ mainUrl: string;
47
+ altText: string;
48
+ mobileUrl?: string | undefined;
49
+ tabletUrl?: string | undefined;
50
+ desktopUrl?: string | undefined;
51
+ leftColUrl?: string | undefined;
52
+ wideUrl?: string | undefined;
53
+ };
54
+ bodyCopy: string[];
55
+ cta?: {
56
+ text: string;
57
+ baseUrl: string;
58
+ } | undefined;
59
+ }, {
60
+ image: {
61
+ mainUrl: string;
62
+ altText: string;
63
+ mobileUrl?: string | undefined;
64
+ tabletUrl?: string | undefined;
65
+ desktopUrl?: string | undefined;
66
+ leftColUrl?: string | undefined;
67
+ wideUrl?: string | undefined;
68
+ };
69
+ bodyCopy: string[];
70
+ cta?: {
71
+ text: string;
72
+ baseUrl: string;
73
+ } | undefined;
74
+ }>;
75
+ }, "strip", z.ZodTypeAny, {
76
+ name: string;
77
+ content: {
78
+ image: {
79
+ mainUrl: string;
80
+ altText: string;
81
+ mobileUrl?: string | undefined;
82
+ tabletUrl?: string | undefined;
83
+ desktopUrl?: string | undefined;
84
+ leftColUrl?: string | undefined;
85
+ wideUrl?: string | undefined;
86
+ };
87
+ bodyCopy: string[];
88
+ cta?: {
89
+ text: string;
90
+ baseUrl: string;
91
+ } | undefined;
92
+ };
93
+ }, {
94
+ name: string;
95
+ content: {
96
+ image: {
97
+ mainUrl: string;
98
+ altText: string;
99
+ mobileUrl?: string | undefined;
100
+ tabletUrl?: string | undefined;
101
+ desktopUrl?: string | undefined;
102
+ leftColUrl?: string | undefined;
103
+ wideUrl?: string | undefined;
104
+ };
105
+ bodyCopy: string[];
106
+ cta?: {
107
+ text: string;
108
+ baseUrl: string;
109
+ } | undefined;
110
+ };
111
+ }>;
112
+ export type GutterVariantFromTool = z.infer<typeof gutterVariantFromToolSchema>;
113
+ export declare const gutterTestFromToolSchema: z.ZodObject<{
114
+ channel: z.ZodEnum<["Epic", "EpicAMP", "EpicAppleNews", "EpicLiveblog", "Banner1", "Banner2", "Header", "GutterLiveblog"]>;
115
+ priority: z.ZodNumber;
116
+ name: z.ZodString;
117
+ status: z.ZodEnum<["Live", "Draft", "Archived"]>;
118
+ controlProportionSettings: z.ZodOptional<z.ZodObject<{
119
+ proportion: z.ZodNumber;
120
+ offset: z.ZodNumber;
121
+ }, "strip", z.ZodTypeAny, {
122
+ offset: number;
123
+ proportion: number;
124
+ }, {
125
+ offset: number;
126
+ proportion: number;
127
+ }>>;
128
+ deviceType: z.ZodOptional<z.ZodEnum<["Mobile", "Desktop", "All", "iOS", "Android"]>>;
129
+ signedInStatus: z.ZodOptional<z.ZodEnum<["SignedIn", "SignedOut", "All"]>>;
130
+ consentStatus: z.ZodOptional<z.ZodEnum<["HasConsented", "HasNotConsented", "All"]>>;
131
+ methodologies: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<"name", [z.ZodObject<{
132
+ name: z.ZodLiteral<"ABTest">;
133
+ }, "strip", z.ZodTypeAny, {
134
+ name: "ABTest";
135
+ }, {
136
+ name: "ABTest";
137
+ }>, z.ZodObject<{
138
+ name: z.ZodLiteral<"EpsilonGreedyBandit">;
139
+ epsilon: z.ZodNumber;
140
+ sampleCount: z.ZodOptional<z.ZodNumber>;
141
+ }, "strip", z.ZodTypeAny, {
142
+ name: "EpsilonGreedyBandit";
143
+ epsilon: number;
144
+ sampleCount?: number | undefined;
145
+ }, {
146
+ name: "EpsilonGreedyBandit";
147
+ epsilon: number;
148
+ sampleCount?: number | undefined;
149
+ }>, z.ZodObject<{
150
+ name: z.ZodLiteral<"Roulette">;
151
+ sampleCount: z.ZodOptional<z.ZodNumber>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ name: "Roulette";
154
+ sampleCount?: number | undefined;
155
+ }, {
156
+ name: "Roulette";
157
+ sampleCount?: number | undefined;
158
+ }>]>, z.ZodObject<{
159
+ testName: z.ZodOptional<z.ZodString>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ testName?: string | undefined;
162
+ }, {
163
+ testName?: string | undefined;
164
+ }>>, "many">>;
165
+ locations: z.ZodArray<z.ZodEnum<["GBPCountries", "UnitedStates", "AUDCountries", "EURCountries", "International", "NZDCountries", "Canada"]>, "many">;
166
+ userCohort: z.ZodEnum<["AllExistingSupporters", "AllNonSupporters", "Everyone", "PostAskPauseSingleContributors"]>;
167
+ contextTargeting: z.ZodObject<{
168
+ tagIds: z.ZodArray<z.ZodString, "many">;
169
+ sectionIds: z.ZodArray<z.ZodString, "many">;
170
+ excludedTagIds: z.ZodArray<z.ZodString, "many">;
171
+ excludedSectionIds: z.ZodArray<z.ZodString, "many">;
172
+ }, "strip", z.ZodTypeAny, {
173
+ tagIds: string[];
174
+ sectionIds: string[];
175
+ excludedTagIds: string[];
176
+ excludedSectionIds: string[];
177
+ }, {
178
+ tagIds: string[];
179
+ sectionIds: string[];
180
+ excludedTagIds: string[];
181
+ excludedSectionIds: string[];
182
+ }>;
183
+ variants: z.ZodArray<z.ZodObject<{
184
+ name: z.ZodString;
185
+ content: z.ZodObject<{
186
+ image: z.ZodObject<{
187
+ mainUrl: z.ZodString;
188
+ mobileUrl: z.ZodOptional<z.ZodString>;
189
+ tabletUrl: z.ZodOptional<z.ZodString>;
190
+ desktopUrl: z.ZodOptional<z.ZodString>;
191
+ leftColUrl: z.ZodOptional<z.ZodString>;
192
+ wideUrl: z.ZodOptional<z.ZodString>;
193
+ altText: z.ZodString;
194
+ }, "strip", z.ZodTypeAny, {
195
+ mainUrl: string;
196
+ altText: string;
197
+ mobileUrl?: string | undefined;
198
+ tabletUrl?: string | undefined;
199
+ desktopUrl?: string | undefined;
200
+ leftColUrl?: string | undefined;
201
+ wideUrl?: string | undefined;
202
+ }, {
203
+ mainUrl: string;
204
+ altText: string;
205
+ mobileUrl?: string | undefined;
206
+ tabletUrl?: string | undefined;
207
+ desktopUrl?: string | undefined;
208
+ leftColUrl?: string | undefined;
209
+ wideUrl?: string | undefined;
210
+ }>;
211
+ bodyCopy: z.ZodArray<z.ZodString, "many">;
212
+ cta: z.ZodOptional<z.ZodObject<{
213
+ text: z.ZodString;
214
+ baseUrl: z.ZodString;
215
+ }, "strip", z.ZodTypeAny, {
216
+ text: string;
217
+ baseUrl: string;
218
+ }, {
219
+ text: string;
220
+ baseUrl: string;
221
+ }>>;
222
+ }, "strip", z.ZodTypeAny, {
223
+ image: {
224
+ mainUrl: string;
225
+ altText: string;
226
+ mobileUrl?: string | undefined;
227
+ tabletUrl?: string | undefined;
228
+ desktopUrl?: string | undefined;
229
+ leftColUrl?: string | undefined;
230
+ wideUrl?: string | undefined;
231
+ };
232
+ bodyCopy: string[];
233
+ cta?: {
234
+ text: string;
235
+ baseUrl: string;
236
+ } | undefined;
237
+ }, {
238
+ image: {
239
+ mainUrl: string;
240
+ altText: string;
241
+ mobileUrl?: string | undefined;
242
+ tabletUrl?: string | undefined;
243
+ desktopUrl?: string | undefined;
244
+ leftColUrl?: string | undefined;
245
+ wideUrl?: string | undefined;
246
+ };
247
+ bodyCopy: string[];
248
+ cta?: {
249
+ text: string;
250
+ baseUrl: string;
251
+ } | undefined;
252
+ }>;
253
+ }, "strip", z.ZodTypeAny, {
254
+ name: string;
255
+ content: {
256
+ image: {
257
+ mainUrl: string;
258
+ altText: string;
259
+ mobileUrl?: string | undefined;
260
+ tabletUrl?: string | undefined;
261
+ desktopUrl?: string | undefined;
262
+ leftColUrl?: string | undefined;
263
+ wideUrl?: string | undefined;
264
+ };
265
+ bodyCopy: string[];
266
+ cta?: {
267
+ text: string;
268
+ baseUrl: string;
269
+ } | undefined;
270
+ };
271
+ }, {
272
+ name: string;
273
+ content: {
274
+ image: {
275
+ mainUrl: string;
276
+ altText: string;
277
+ mobileUrl?: string | undefined;
278
+ tabletUrl?: string | undefined;
279
+ desktopUrl?: string | undefined;
280
+ leftColUrl?: string | undefined;
281
+ wideUrl?: string | undefined;
282
+ };
283
+ bodyCopy: string[];
284
+ cta?: {
285
+ text: string;
286
+ baseUrl: string;
287
+ } | undefined;
288
+ };
289
+ }>, "many">;
290
+ }, "strip", z.ZodTypeAny, {
291
+ channel: "Epic" | "EpicAMP" | "EpicAppleNews" | "EpicLiveblog" | "Banner1" | "Banner2" | "Header" | "GutterLiveblog";
292
+ priority: number;
293
+ name: string;
294
+ status: "Live" | "Draft" | "Archived";
295
+ locations: ("GBPCountries" | "UnitedStates" | "AUDCountries" | "EURCountries" | "International" | "NZDCountries" | "Canada")[];
296
+ userCohort: "AllExistingSupporters" | "AllNonSupporters" | "Everyone" | "PostAskPauseSingleContributors";
297
+ variants: {
298
+ name: string;
299
+ content: {
300
+ image: {
301
+ mainUrl: string;
302
+ altText: string;
303
+ mobileUrl?: string | undefined;
304
+ tabletUrl?: string | undefined;
305
+ desktopUrl?: string | undefined;
306
+ leftColUrl?: string | undefined;
307
+ wideUrl?: string | undefined;
308
+ };
309
+ bodyCopy: string[];
310
+ cta?: {
311
+ text: string;
312
+ baseUrl: string;
313
+ } | undefined;
314
+ };
315
+ }[];
316
+ contextTargeting: {
317
+ tagIds: string[];
318
+ sectionIds: string[];
319
+ excludedTagIds: string[];
320
+ excludedSectionIds: string[];
321
+ };
322
+ controlProportionSettings?: {
323
+ offset: number;
324
+ proportion: number;
325
+ } | undefined;
326
+ deviceType?: "Mobile" | "Desktop" | "All" | "iOS" | "Android" | undefined;
327
+ signedInStatus?: "All" | "SignedIn" | "SignedOut" | undefined;
328
+ consentStatus?: "All" | "HasConsented" | "HasNotConsented" | undefined;
329
+ methodologies?: (({
330
+ name: "ABTest";
331
+ } | {
332
+ name: "EpsilonGreedyBandit";
333
+ epsilon: number;
334
+ sampleCount?: number | undefined;
335
+ } | {
336
+ name: "Roulette";
337
+ sampleCount?: number | undefined;
338
+ }) & {
339
+ testName?: string | undefined;
340
+ })[] | undefined;
341
+ }, {
342
+ channel: "Epic" | "EpicAMP" | "EpicAppleNews" | "EpicLiveblog" | "Banner1" | "Banner2" | "Header" | "GutterLiveblog";
343
+ priority: number;
344
+ name: string;
345
+ status: "Live" | "Draft" | "Archived";
346
+ locations: ("GBPCountries" | "UnitedStates" | "AUDCountries" | "EURCountries" | "International" | "NZDCountries" | "Canada")[];
347
+ userCohort: "AllExistingSupporters" | "AllNonSupporters" | "Everyone" | "PostAskPauseSingleContributors";
348
+ variants: {
349
+ name: string;
350
+ content: {
351
+ image: {
352
+ mainUrl: string;
353
+ altText: string;
354
+ mobileUrl?: string | undefined;
355
+ tabletUrl?: string | undefined;
356
+ desktopUrl?: string | undefined;
357
+ leftColUrl?: string | undefined;
358
+ wideUrl?: string | undefined;
359
+ };
360
+ bodyCopy: string[];
361
+ cta?: {
362
+ text: string;
363
+ baseUrl: string;
364
+ } | undefined;
365
+ };
366
+ }[];
367
+ contextTargeting: {
368
+ tagIds: string[];
369
+ sectionIds: string[];
370
+ excludedTagIds: string[];
371
+ excludedSectionIds: string[];
372
+ };
373
+ controlProportionSettings?: {
374
+ offset: number;
375
+ proportion: number;
376
+ } | undefined;
377
+ deviceType?: "Mobile" | "Desktop" | "All" | "iOS" | "Android" | undefined;
378
+ signedInStatus?: "All" | "SignedIn" | "SignedOut" | undefined;
379
+ consentStatus?: "All" | "HasConsented" | "HasNotConsented" | undefined;
380
+ methodologies?: (({
381
+ name: "ABTest";
382
+ } | {
383
+ name: "EpsilonGreedyBandit";
384
+ epsilon: number;
385
+ sampleCount?: number | undefined;
386
+ } | {
387
+ name: "Roulette";
388
+ sampleCount?: number | undefined;
389
+ }) & {
390
+ testName?: string | undefined;
391
+ })[] | undefined;
392
+ }>;
393
+ export type GutterTestFromTool = z.infer<typeof gutterTestFromToolSchema>;
394
+ /**
395
+ * Models with additional properties determined by the server
396
+ */
397
+ export interface GutterVariant extends GutterVariantFromTool {
398
+ moduleName?: string;
399
+ }
400
+ export interface GutterTest extends GutterTestFromTool {
401
+ variants: GutterVariant[];
402
+ }
403
+ export interface GutterTestSelection {
404
+ test: GutterTest;
405
+ variant: GutterVariant;
406
+ moduleName: string;
407
+ }
408
+ export {};
409
+ //# sourceMappingURL=gutter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gutter.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/abTests/gutter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG/B,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,qBAAqB;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IAClD,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACtB"}
@@ -161,7 +161,7 @@ declare const headerVariantFromToolSchema: z.ZodObject<{
161
161
  }>;
162
162
  export type HeaderVariantFromTool = z.infer<typeof headerVariantFromToolSchema>;
163
163
  export declare const headerTestFromToolSchema: z.ZodObject<{
164
- channel: z.ZodEnum<["Epic", "EpicAMP", "EpicAppleNews", "EpicLiveblog", "Banner1", "Banner2", "Header"]>;
164
+ channel: z.ZodEnum<["Epic", "EpicAMP", "EpicAppleNews", "EpicLiveblog", "Banner1", "Banner2", "Header", "GutterLiveblog"]>;
165
165
  priority: z.ZodNumber;
166
166
  name: z.ZodString;
167
167
  status: z.ZodEnum<["Live", "Draft", "Archived"]>;
@@ -187,12 +187,24 @@ export declare const headerTestFromToolSchema: z.ZodObject<{
187
187
  }>, z.ZodObject<{
188
188
  name: z.ZodLiteral<"EpsilonGreedyBandit">;
189
189
  epsilon: z.ZodNumber;
190
+ sampleCount: z.ZodOptional<z.ZodNumber>;
190
191
  }, "strip", z.ZodTypeAny, {
191
192
  name: "EpsilonGreedyBandit";
192
193
  epsilon: number;
194
+ sampleCount?: number | undefined;
193
195
  }, {
194
196
  name: "EpsilonGreedyBandit";
195
197
  epsilon: number;
198
+ sampleCount?: number | undefined;
199
+ }>, z.ZodObject<{
200
+ name: z.ZodLiteral<"Roulette">;
201
+ sampleCount: z.ZodOptional<z.ZodNumber>;
202
+ }, "strip", z.ZodTypeAny, {
203
+ name: "Roulette";
204
+ sampleCount?: number | undefined;
205
+ }, {
206
+ name: "Roulette";
207
+ sampleCount?: number | undefined;
196
208
  }>]>, z.ZodObject<{
197
209
  testName: z.ZodOptional<z.ZodString>;
198
210
  }, "strip", z.ZodTypeAny, {
@@ -370,7 +382,7 @@ export declare const headerTestFromToolSchema: z.ZodObject<{
370
382
  } | undefined;
371
383
  }>, "many">;
372
384
  }, "strip", z.ZodTypeAny, {
373
- channel: "Epic" | "EpicAMP" | "EpicAppleNews" | "EpicLiveblog" | "Banner1" | "Banner2" | "Header";
385
+ channel: "Epic" | "EpicAMP" | "EpicAppleNews" | "EpicLiveblog" | "Banner1" | "Banner2" | "Header" | "GutterLiveblog";
374
386
  priority: number;
375
387
  name: string;
376
388
  status: "Live" | "Draft" | "Archived";
@@ -417,6 +429,10 @@ export declare const headerTestFromToolSchema: z.ZodObject<{
417
429
  } | {
418
430
  name: "EpsilonGreedyBandit";
419
431
  epsilon: number;
432
+ sampleCount?: number | undefined;
433
+ } | {
434
+ name: "Roulette";
435
+ sampleCount?: number | undefined;
420
436
  }) & {
421
437
  testName?: string | undefined;
422
438
  })[] | undefined;
@@ -425,7 +441,7 @@ export declare const headerTestFromToolSchema: z.ZodObject<{
425
441
  userType: ("new" | "guest" | "current")[];
426
442
  } | undefined;
427
443
  }, {
428
- channel: "Epic" | "EpicAMP" | "EpicAppleNews" | "EpicLiveblog" | "Banner1" | "Banner2" | "Header";
444
+ channel: "Epic" | "EpicAMP" | "EpicAppleNews" | "EpicLiveblog" | "Banner1" | "Banner2" | "Header" | "GutterLiveblog";
429
445
  priority: number;
430
446
  name: string;
431
447
  status: "Live" | "Draft" | "Archived";
@@ -472,6 +488,10 @@ export declare const headerTestFromToolSchema: z.ZodObject<{
472
488
  } | {
473
489
  name: "EpsilonGreedyBandit";
474
490
  epsilon: number;
491
+ sampleCount?: number | undefined;
492
+ } | {
493
+ name: "Roulette";
494
+ sampleCount?: number | undefined;
475
495
  }) & {
476
496
  testName?: string | undefined;
477
497
  })[] | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/abTests/header.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI/B,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,qBAAqB;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IAClD,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACtB"}
@@ -2,4 +2,5 @@ export * from './epic';
2
2
  export * from './header';
3
3
  export * from './banner';
4
4
  export * from './shared';
5
+ export * from './gutter';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/abTests/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/abTests/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { purchaseInfoProduct, purchaseInfoUser } from '../purchaseInfo';
3
3
  import { OphanComponentType, OphanProduct } from '@guardian/libs';
4
- declare const Channel: readonly ["Epic", "EpicAMP", "EpicAppleNews", "EpicLiveblog", "Banner1", "Banner2", "Header"];
4
+ declare const Channel: readonly ["Epic", "EpicAMP", "EpicAppleNews", "EpicLiveblog", "Banner1", "Banner2", "Header", "GutterLiveblog"];
5
5
  export type Channel = (typeof Channel)[number];
6
6
  declare const TestStatus: readonly ["Live", "Draft", "Archived"];
7
7
  export type TestStatus = (typeof TestStatus)[number];
@@ -25,12 +25,24 @@ declare const methodologySchema: z.ZodIntersection<z.ZodDiscriminatedUnion<"name
25
25
  }>, z.ZodObject<{
26
26
  name: z.ZodLiteral<"EpsilonGreedyBandit">;
27
27
  epsilon: z.ZodNumber;
28
+ sampleCount: z.ZodOptional<z.ZodNumber>;
28
29
  }, "strip", z.ZodTypeAny, {
29
30
  name: "EpsilonGreedyBandit";
30
31
  epsilon: number;
32
+ sampleCount?: number | undefined;
31
33
  }, {
32
34
  name: "EpsilonGreedyBandit";
33
35
  epsilon: number;
36
+ sampleCount?: number | undefined;
37
+ }>, z.ZodObject<{
38
+ name: z.ZodLiteral<"Roulette">;
39
+ sampleCount: z.ZodOptional<z.ZodNumber>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ name: "Roulette";
42
+ sampleCount?: number | undefined;
43
+ }, {
44
+ name: "Roulette";
45
+ sampleCount?: number | undefined;
34
46
  }>]>, z.ZodObject<{
35
47
  testName: z.ZodOptional<z.ZodString>;
36
48
  }, "strip", z.ZodTypeAny, {
@@ -39,6 +51,9 @@ declare const methodologySchema: z.ZodIntersection<z.ZodDiscriminatedUnion<"name
39
51
  testName?: string | undefined;
40
52
  }>>;
41
53
  export type Methodology = z.infer<typeof methodologySchema>;
54
+ export type BanditMethodology = Exclude<Methodology, {
55
+ name: 'ABTest';
56
+ }>;
42
57
  export interface Variant {
43
58
  name: string;
44
59
  }
@@ -55,7 +70,7 @@ export interface Test<V extends Variant> {
55
70
  methodologies?: Methodology[];
56
71
  }
57
72
  export declare const testSchema: z.ZodObject<{
58
- channel: z.ZodEnum<["Epic", "EpicAMP", "EpicAppleNews", "EpicLiveblog", "Banner1", "Banner2", "Header"]>;
73
+ channel: z.ZodEnum<["Epic", "EpicAMP", "EpicAppleNews", "EpicLiveblog", "Banner1", "Banner2", "Header", "GutterLiveblog"]>;
59
74
  name: z.ZodString;
60
75
  status: z.ZodEnum<["Live", "Draft", "Archived"]>;
61
76
  priority: z.ZodNumber;
@@ -81,12 +96,24 @@ export declare const testSchema: z.ZodObject<{
81
96
  }>, z.ZodObject<{
82
97
  name: z.ZodLiteral<"EpsilonGreedyBandit">;
83
98
  epsilon: z.ZodNumber;
99
+ sampleCount: z.ZodOptional<z.ZodNumber>;
84
100
  }, "strip", z.ZodTypeAny, {
85
101
  name: "EpsilonGreedyBandit";
86
102
  epsilon: number;
103
+ sampleCount?: number | undefined;
87
104
  }, {
88
105
  name: "EpsilonGreedyBandit";
89
106
  epsilon: number;
107
+ sampleCount?: number | undefined;
108
+ }>, z.ZodObject<{
109
+ name: z.ZodLiteral<"Roulette">;
110
+ sampleCount: z.ZodOptional<z.ZodNumber>;
111
+ }, "strip", z.ZodTypeAny, {
112
+ name: "Roulette";
113
+ sampleCount?: number | undefined;
114
+ }, {
115
+ name: "Roulette";
116
+ sampleCount?: number | undefined;
90
117
  }>]>, z.ZodObject<{
91
118
  testName: z.ZodOptional<z.ZodString>;
92
119
  }, "strip", z.ZodTypeAny, {
@@ -95,7 +122,7 @@ export declare const testSchema: z.ZodObject<{
95
122
  testName?: string | undefined;
96
123
  }>>, "many">>;
97
124
  }, "strip", z.ZodTypeAny, {
98
- channel: "Epic" | "EpicAMP" | "EpicAppleNews" | "EpicLiveblog" | "Banner1" | "Banner2" | "Header";
125
+ channel: "Epic" | "EpicAMP" | "EpicAppleNews" | "EpicLiveblog" | "Banner1" | "Banner2" | "Header" | "GutterLiveblog";
99
126
  priority: number;
100
127
  name: string;
101
128
  status: "Live" | "Draft" | "Archived";
@@ -111,11 +138,15 @@ export declare const testSchema: z.ZodObject<{
111
138
  } | {
112
139
  name: "EpsilonGreedyBandit";
113
140
  epsilon: number;
141
+ sampleCount?: number | undefined;
142
+ } | {
143
+ name: "Roulette";
144
+ sampleCount?: number | undefined;
114
145
  }) & {
115
146
  testName?: string | undefined;
116
147
  })[] | undefined;
117
148
  }, {
118
- channel: "Epic" | "EpicAMP" | "EpicAppleNews" | "EpicLiveblog" | "Banner1" | "Banner2" | "Header";
149
+ channel: "Epic" | "EpicAMP" | "EpicAppleNews" | "EpicLiveblog" | "Banner1" | "Banner2" | "Header" | "GutterLiveblog";
119
150
  priority: number;
120
151
  name: string;
121
152
  status: "Live" | "Draft" | "Archived";
@@ -131,6 +162,10 @@ export declare const testSchema: z.ZodObject<{
131
162
  } | {
132
163
  name: "EpsilonGreedyBandit";
133
164
  epsilon: number;
165
+ sampleCount?: number | undefined;
166
+ } | {
167
+ name: "Roulette";
168
+ sampleCount?: number | undefined;
134
169
  }) & {
135
170
  testName?: string | undefined;
136
171
  })[] | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/abTests/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACH,mBAAmB,EAEnB,gBAAgB,EAEnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAElE,QAAA,MAAM,OAAO,+FAQH,CAAC;AACX,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAG/C,QAAA,MAAM,UAAU,wCAAyC,CAAC;AAC1D,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,eAA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