@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.
- package/LICENSE +201 -0
- package/README.md +6 -0
- package/dist/dotcom/index.d.ts +14 -0
- package/dist/dotcom/index.d.ts.map +1 -0
- package/dist/dotcom/requests.d.ts +18 -0
- package/dist/dotcom/requests.d.ts.map +1 -0
- package/dist/dotcom/types.d.ts +6 -0
- package/dist/dotcom/types.d.ts.map +1 -0
- package/dist/index.esm.js +1 -0
- package/dist/index.js +1 -0
- package/dist/shared/lib/geolocation.d.ts +44 -0
- package/dist/shared/lib/geolocation.d.ts.map +1 -0
- package/dist/shared/lib/history.d.ts +18 -0
- package/dist/shared/lib/history.d.ts.map +1 -0
- package/dist/shared/lib/index.d.ts +6 -0
- package/dist/shared/lib/index.d.ts.map +1 -0
- package/dist/shared/lib/placeholders.d.ts +12 -0
- package/dist/shared/lib/placeholders.d.ts.map +1 -0
- package/dist/shared/lib/reminderFields.d.ts +9 -0
- package/dist/shared/lib/reminderFields.d.ts.map +1 -0
- package/dist/shared/lib/viewLog.d.ts +17 -0
- package/dist/shared/lib/viewLog.d.ts.map +1 -0
- package/dist/shared/types/abTests/banner.d.ts +424 -0
- package/dist/shared/types/abTests/banner.d.ts.map +1 -0
- package/dist/shared/types/abTests/epic.d.ts +345 -0
- package/dist/shared/types/abTests/epic.d.ts.map +1 -0
- package/dist/shared/types/abTests/gutter.d.ts +146 -0
- package/dist/shared/types/abTests/gutter.d.ts.map +1 -0
- package/dist/shared/types/abTests/header.d.ts +173 -0
- package/dist/shared/types/abTests/header.d.ts.map +1 -0
- package/dist/shared/types/abTests/index.d.ts +6 -0
- package/dist/shared/types/abTests/index.d.ts.map +1 -0
- package/dist/shared/types/abTests/shared.d.ts +186 -0
- package/dist/shared/types/abTests/shared.d.ts.map +1 -0
- package/dist/shared/types/index.d.ts +6 -0
- package/dist/shared/types/index.d.ts.map +1 -0
- package/dist/shared/types/prices.d.ts +10 -0
- package/dist/shared/types/prices.d.ts.map +1 -0
- package/dist/shared/types/props/banner.d.ts +313 -0
- package/dist/shared/types/props/banner.d.ts.map +1 -0
- package/dist/shared/types/props/choiceCards.d.ts +108 -0
- package/dist/shared/types/props/choiceCards.d.ts.map +1 -0
- package/dist/shared/types/props/design.d.ts +164 -0
- package/dist/shared/types/props/design.d.ts.map +1 -0
- package/dist/shared/types/props/epic.d.ts +429 -0
- package/dist/shared/types/props/epic.d.ts.map +1 -0
- package/dist/shared/types/props/gutter.d.ts +75 -0
- package/dist/shared/types/props/gutter.d.ts.map +1 -0
- package/dist/shared/types/props/header.d.ts +87 -0
- package/dist/shared/types/props/header.d.ts.map +1 -0
- package/dist/shared/types/props/index.d.ts +7 -0
- package/dist/shared/types/props/index.d.ts.map +1 -0
- package/dist/shared/types/props/shared.d.ts +180 -0
- package/dist/shared/types/props/shared.d.ts.map +1 -0
- package/dist/shared/types/purchaseInfo.d.ts +18 -0
- package/dist/shared/types/purchaseInfo.d.ts.map +1 -0
- package/dist/shared/types/reminders.d.ts +16 -0
- package/dist/shared/types/reminders.d.ts.map +1 -0
- package/dist/shared/types/targeting/banner.d.ts +28 -0
- package/dist/shared/types/targeting/banner.d.ts.map +1 -0
- package/dist/shared/types/targeting/epic.d.ts +30 -0
- package/dist/shared/types/targeting/epic.d.ts.map +1 -0
- package/dist/shared/types/targeting/gutter.d.ts +13 -0
- package/dist/shared/types/targeting/gutter.d.ts.map +1 -0
- package/dist/shared/types/targeting/header.d.ts +13 -0
- package/dist/shared/types/targeting/header.d.ts.map +1 -0
- package/dist/shared/types/targeting/index.d.ts +6 -0
- package/dist/shared/types/targeting/index.d.ts.map +1 -0
- package/dist/shared/types/targeting/shared.d.ts +30 -0
- package/dist/shared/types/targeting/shared.d.ts.map +1 -0
- package/package.json +104 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { CountryGroupId } from '../../lib';
|
|
3
|
+
import { variantSchema } from '../props';
|
|
4
|
+
import type { EpicTargeting } from '../targeting';
|
|
5
|
+
export type EpicType = 'ARTICLE' | 'LIVEBLOG';
|
|
6
|
+
export declare const maxViewsSchema: z.ZodObject<{
|
|
7
|
+
maxViewsCount: z.ZodNumber;
|
|
8
|
+
maxViewsDays: z.ZodNumber;
|
|
9
|
+
minDaysBetweenViews: z.ZodNumber;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type MaxViews = z.infer<typeof maxViewsSchema>;
|
|
12
|
+
export type ContributionFrequency = 'ONE_OFF' | 'MONTHLY' | 'ANNUAL';
|
|
13
|
+
export declare const contributionTabFrequencies: ContributionFrequency[];
|
|
14
|
+
interface ContributionTypeItem {
|
|
15
|
+
label: string;
|
|
16
|
+
suffix: string;
|
|
17
|
+
}
|
|
18
|
+
export type ContributionType = Record<ContributionFrequency, ContributionTypeItem>;
|
|
19
|
+
interface AmountValuesObject {
|
|
20
|
+
amounts: number[];
|
|
21
|
+
defaultAmount: number;
|
|
22
|
+
hideChooseYourAmount?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export type AmountsCardData = Record<ContributionFrequency, AmountValuesObject>;
|
|
25
|
+
export interface AmountsVariant {
|
|
26
|
+
variantName: string;
|
|
27
|
+
defaultContributionType: ContributionFrequency;
|
|
28
|
+
displayContributionType: ContributionFrequency[];
|
|
29
|
+
amountsCardData: AmountsCardData;
|
|
30
|
+
}
|
|
31
|
+
export interface SelectedAmountsVariant extends AmountsVariant {
|
|
32
|
+
testName: string;
|
|
33
|
+
}
|
|
34
|
+
export type AmountsTestTargeting = {
|
|
35
|
+
targetingType: 'Region';
|
|
36
|
+
region: CountryGroupId;
|
|
37
|
+
} | {
|
|
38
|
+
targetingType: 'Country';
|
|
39
|
+
countries: string[];
|
|
40
|
+
};
|
|
41
|
+
export interface AmountsTest {
|
|
42
|
+
testName: string;
|
|
43
|
+
liveTestName?: string;
|
|
44
|
+
testLabel?: string;
|
|
45
|
+
isLive: boolean;
|
|
46
|
+
targeting: AmountsTestTargeting;
|
|
47
|
+
order: number;
|
|
48
|
+
seed: number;
|
|
49
|
+
variants: AmountsVariant[];
|
|
50
|
+
}
|
|
51
|
+
export type AmountsTests = AmountsTest[];
|
|
52
|
+
export type EpicTestFromTool = z.infer<typeof epicTestFromToolSchema>;
|
|
53
|
+
export interface EpicTest extends EpicTestFromTool {
|
|
54
|
+
hasArticleCountInCopy: boolean;
|
|
55
|
+
isSuperMode?: boolean;
|
|
56
|
+
canShow?: (targeting: EpicTargeting) => boolean;
|
|
57
|
+
campaignId?: string;
|
|
58
|
+
expiry?: string;
|
|
59
|
+
}
|
|
60
|
+
export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
61
|
+
channel: z.ZodEnum<{
|
|
62
|
+
Epic: "Epic";
|
|
63
|
+
EpicAppleNews: "EpicAppleNews";
|
|
64
|
+
EpicLiveblog: "EpicLiveblog";
|
|
65
|
+
Banner1: "Banner1";
|
|
66
|
+
Banner2: "Banner2";
|
|
67
|
+
Header: "Header";
|
|
68
|
+
GutterLiveblog: "GutterLiveblog";
|
|
69
|
+
}>;
|
|
70
|
+
controlProportionSettings: z.ZodOptional<z.ZodObject<{
|
|
71
|
+
proportion: z.ZodNumber;
|
|
72
|
+
offset: z.ZodNumber;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
deviceType: z.ZodOptional<z.ZodEnum<{
|
|
75
|
+
Mobile: "Mobile";
|
|
76
|
+
Desktop: "Desktop";
|
|
77
|
+
All: "All";
|
|
78
|
+
iOS: "iOS";
|
|
79
|
+
Android: "Android";
|
|
80
|
+
}>>;
|
|
81
|
+
signedInStatus: z.ZodOptional<z.ZodEnum<{
|
|
82
|
+
All: "All";
|
|
83
|
+
SignedIn: "SignedIn";
|
|
84
|
+
SignedOut: "SignedOut";
|
|
85
|
+
}>>;
|
|
86
|
+
consentStatus: z.ZodOptional<z.ZodEnum<{
|
|
87
|
+
All: "All";
|
|
88
|
+
HasConsented: "HasConsented";
|
|
89
|
+
HasNotConsented: "HasNotConsented";
|
|
90
|
+
}>>;
|
|
91
|
+
methodologies: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
92
|
+
name: z.ZodLiteral<"ABTest">;
|
|
93
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
+
name: z.ZodLiteral<"EpsilonGreedyBandit">;
|
|
95
|
+
epsilon: z.ZodNumber;
|
|
96
|
+
sampleCount: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
98
|
+
name: z.ZodLiteral<"Roulette">;
|
|
99
|
+
sampleCount: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
}, z.core.$strip>], "name">, z.ZodObject<{
|
|
101
|
+
testName: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, z.core.$strip>>>>;
|
|
103
|
+
name: z.ZodString;
|
|
104
|
+
status: z.ZodEnum<{
|
|
105
|
+
Live: "Live";
|
|
106
|
+
Draft: "Draft";
|
|
107
|
+
Archived: "Archived";
|
|
108
|
+
}>;
|
|
109
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
110
|
+
GBPCountries: "GBPCountries";
|
|
111
|
+
UnitedStates: "UnitedStates";
|
|
112
|
+
AUDCountries: "AUDCountries";
|
|
113
|
+
EURCountries: "EURCountries";
|
|
114
|
+
International: "International";
|
|
115
|
+
NZDCountries: "NZDCountries";
|
|
116
|
+
Canada: "Canada";
|
|
117
|
+
}>>>;
|
|
118
|
+
regionTargeting: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
119
|
+
targetedCountryGroups: z.ZodArray<z.ZodEnum<{
|
|
120
|
+
GBPCountries: "GBPCountries";
|
|
121
|
+
UnitedStates: "UnitedStates";
|
|
122
|
+
AUDCountries: "AUDCountries";
|
|
123
|
+
EURCountries: "EURCountries";
|
|
124
|
+
International: "International";
|
|
125
|
+
NZDCountries: "NZDCountries";
|
|
126
|
+
Canada: "Canada";
|
|
127
|
+
}>>;
|
|
128
|
+
targetedCountryCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
129
|
+
}, z.core.$strip>>>;
|
|
130
|
+
tagIds: z.ZodArray<z.ZodString>;
|
|
131
|
+
sections: z.ZodArray<z.ZodString>;
|
|
132
|
+
excludedTagIds: z.ZodArray<z.ZodString>;
|
|
133
|
+
excludedSections: z.ZodArray<z.ZodString>;
|
|
134
|
+
alwaysAsk: z.ZodBoolean;
|
|
135
|
+
maxViews: z.ZodOptional<z.ZodObject<{
|
|
136
|
+
maxViewsCount: z.ZodNumber;
|
|
137
|
+
maxViewsDays: z.ZodNumber;
|
|
138
|
+
minDaysBetweenViews: z.ZodNumber;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
userCohort: z.ZodEnum<{
|
|
141
|
+
AllExistingSupporters: "AllExistingSupporters";
|
|
142
|
+
AllNonSupporters: "AllNonSupporters";
|
|
143
|
+
Everyone: "Everyone";
|
|
144
|
+
PostAskPauseSingleContributors: "PostAskPauseSingleContributors";
|
|
145
|
+
}>;
|
|
146
|
+
hasCountryName: z.ZodBoolean;
|
|
147
|
+
highPriority: z.ZodBoolean;
|
|
148
|
+
useLocalViewLog: z.ZodBoolean;
|
|
149
|
+
articlesViewedSettings: z.ZodOptional<z.ZodObject<{
|
|
150
|
+
minViews: z.ZodNumber;
|
|
151
|
+
maxViews: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
periodInWeeks: z.ZodNumber;
|
|
153
|
+
tagIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
154
|
+
}, z.core.$strip>>;
|
|
155
|
+
priority: z.ZodNumber;
|
|
156
|
+
variants: z.ZodArray<z.ZodObject<{
|
|
157
|
+
name: z.ZodString;
|
|
158
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
159
|
+
paragraphs: z.ZodArray<z.ZodString>;
|
|
160
|
+
highlightedText: z.ZodOptional<z.ZodString>;
|
|
161
|
+
tickerSettings: z.ZodOptional<z.ZodObject<{
|
|
162
|
+
currencySymbol: z.ZodString;
|
|
163
|
+
copy: z.ZodObject<{
|
|
164
|
+
countLabel: z.ZodString;
|
|
165
|
+
goalCopy: z.ZodOptional<z.ZodString>;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
name: z.ZodEnum<{
|
|
168
|
+
global: "global";
|
|
169
|
+
US: "US";
|
|
170
|
+
AU: "AU";
|
|
171
|
+
}>;
|
|
172
|
+
tickerData: z.ZodOptional<z.ZodObject<{
|
|
173
|
+
total: z.ZodNumber;
|
|
174
|
+
goal: z.ZodNumber;
|
|
175
|
+
}, z.core.$strip>>;
|
|
176
|
+
}, z.core.$strip>>;
|
|
177
|
+
cta: z.ZodOptional<z.ZodObject<{
|
|
178
|
+
text: z.ZodString;
|
|
179
|
+
baseUrl: z.ZodString;
|
|
180
|
+
}, z.core.$strip>>;
|
|
181
|
+
secondaryCta: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
182
|
+
type: z.ZodLiteral<import("../props").SecondaryCtaType.Custom>;
|
|
183
|
+
cta: z.ZodObject<{
|
|
184
|
+
text: z.ZodString;
|
|
185
|
+
baseUrl: z.ZodString;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
188
|
+
type: z.ZodLiteral<import("../props").SecondaryCtaType.ContributionsReminder>;
|
|
189
|
+
}, z.core.$strip>], "type">>;
|
|
190
|
+
newsletterSignup: z.ZodOptional<z.ZodObject<{
|
|
191
|
+
newsletterId: z.ZodString;
|
|
192
|
+
successDescription: z.ZodString;
|
|
193
|
+
}, z.core.$strip>>;
|
|
194
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
195
|
+
mainUrl: z.ZodString;
|
|
196
|
+
mobileUrl: z.ZodOptional<z.ZodString>;
|
|
197
|
+
tabletUrl: z.ZodOptional<z.ZodString>;
|
|
198
|
+
desktopUrl: z.ZodOptional<z.ZodString>;
|
|
199
|
+
leftColUrl: z.ZodOptional<z.ZodString>;
|
|
200
|
+
wideUrl: z.ZodOptional<z.ZodString>;
|
|
201
|
+
altText: z.ZodString;
|
|
202
|
+
}, z.core.$strip>>;
|
|
203
|
+
showReminderFields: z.ZodOptional<z.ZodObject<{
|
|
204
|
+
reminderCta: z.ZodString;
|
|
205
|
+
reminderLabel: z.ZodString;
|
|
206
|
+
reminderPeriod: z.ZodString;
|
|
207
|
+
}, z.core.$strip>>;
|
|
208
|
+
separateArticleCount: z.ZodOptional<z.ZodObject<{
|
|
209
|
+
type: z.ZodLiteral<"above">;
|
|
210
|
+
copy: z.ZodOptional<z.ZodString>;
|
|
211
|
+
countType: z.ZodOptional<z.ZodEnum<{
|
|
212
|
+
for52Weeks: "for52Weeks";
|
|
213
|
+
forTargetedWeeks: "forTargetedWeeks";
|
|
214
|
+
}>>;
|
|
215
|
+
}, z.core.$strip>>;
|
|
216
|
+
promoCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
217
|
+
maxViews: z.ZodOptional<z.ZodObject<{
|
|
218
|
+
maxViewsCount: z.ZodNumber;
|
|
219
|
+
maxViewsDays: z.ZodNumber;
|
|
220
|
+
minDaysBetweenViews: z.ZodNumber;
|
|
221
|
+
}, z.core.$strip>>;
|
|
222
|
+
showSignInLink: z.ZodOptional<z.ZodBoolean>;
|
|
223
|
+
bylineWithImage: z.ZodOptional<z.ZodObject<{
|
|
224
|
+
name: z.ZodString;
|
|
225
|
+
description: z.ZodOptional<z.ZodString>;
|
|
226
|
+
headshot: z.ZodOptional<z.ZodObject<{
|
|
227
|
+
mainUrl: z.ZodString;
|
|
228
|
+
mobileUrl: z.ZodOptional<z.ZodString>;
|
|
229
|
+
tabletUrl: z.ZodOptional<z.ZodString>;
|
|
230
|
+
desktopUrl: z.ZodOptional<z.ZodString>;
|
|
231
|
+
leftColUrl: z.ZodOptional<z.ZodString>;
|
|
232
|
+
wideUrl: z.ZodOptional<z.ZodString>;
|
|
233
|
+
altText: z.ZodString;
|
|
234
|
+
}, z.core.$strip>>;
|
|
235
|
+
}, z.core.$strip>>;
|
|
236
|
+
showChoiceCards: z.ZodOptional<z.ZodBoolean>;
|
|
237
|
+
choiceCardsSettings: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
238
|
+
choiceCards: z.ZodArray<z.ZodObject<{
|
|
239
|
+
product: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
240
|
+
supportTier: z.ZodLiteral<"Contribution">;
|
|
241
|
+
ratePlan: z.ZodUnion<readonly [z.ZodLiteral<"Monthly">, z.ZodLiteral<"Annual">]>;
|
|
242
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
243
|
+
supportTier: z.ZodLiteral<"SupporterPlus">;
|
|
244
|
+
ratePlan: z.ZodUnion<readonly [z.ZodLiteral<"Monthly">, z.ZodLiteral<"Annual">]>;
|
|
245
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
246
|
+
supportTier: z.ZodLiteral<"OneOff">;
|
|
247
|
+
}, z.core.$strip>], "supportTier">;
|
|
248
|
+
label: z.ZodString;
|
|
249
|
+
isDefault: z.ZodBoolean;
|
|
250
|
+
benefitsLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
251
|
+
benefits: z.ZodArray<z.ZodObject<{
|
|
252
|
+
copy: z.ZodString;
|
|
253
|
+
}, z.core.$strip>>;
|
|
254
|
+
pill: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
255
|
+
copy: z.ZodString;
|
|
256
|
+
textColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
257
|
+
r: z.ZodString;
|
|
258
|
+
g: z.ZodString;
|
|
259
|
+
b: z.ZodString;
|
|
260
|
+
kind: z.ZodLiteral<"hex">;
|
|
261
|
+
}, z.core.$strip>>>;
|
|
262
|
+
backgroundColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
263
|
+
r: z.ZodString;
|
|
264
|
+
g: z.ZodString;
|
|
265
|
+
b: z.ZodString;
|
|
266
|
+
kind: z.ZodLiteral<"hex">;
|
|
267
|
+
}, z.core.$strip>>>;
|
|
268
|
+
}, z.core.$strip>>>;
|
|
269
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
270
|
+
}, z.core.$strip>>;
|
|
271
|
+
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
272
|
+
product: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
273
|
+
supportTier: z.ZodLiteral<"Contribution">;
|
|
274
|
+
ratePlan: z.ZodUnion<readonly [z.ZodLiteral<"Monthly">, z.ZodLiteral<"Annual">]>;
|
|
275
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
276
|
+
supportTier: z.ZodLiteral<"SupporterPlus">;
|
|
277
|
+
ratePlan: z.ZodUnion<readonly [z.ZodLiteral<"Monthly">, z.ZodLiteral<"Annual">]>;
|
|
278
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
279
|
+
supportTier: z.ZodLiteral<"OneOff">;
|
|
280
|
+
}, z.core.$strip>], "supportTier">;
|
|
281
|
+
label: z.ZodString;
|
|
282
|
+
isDefault: z.ZodBoolean;
|
|
283
|
+
benefitsLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
284
|
+
benefits: z.ZodArray<z.ZodObject<{
|
|
285
|
+
copy: z.ZodString;
|
|
286
|
+
}, z.core.$strip>>;
|
|
287
|
+
pill: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
288
|
+
copy: z.ZodString;
|
|
289
|
+
textColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
290
|
+
r: z.ZodString;
|
|
291
|
+
g: z.ZodString;
|
|
292
|
+
b: z.ZodString;
|
|
293
|
+
kind: z.ZodLiteral<"hex">;
|
|
294
|
+
}, z.core.$strip>>>;
|
|
295
|
+
backgroundColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
296
|
+
r: z.ZodString;
|
|
297
|
+
g: z.ZodString;
|
|
298
|
+
b: z.ZodString;
|
|
299
|
+
kind: z.ZodLiteral<"hex">;
|
|
300
|
+
}, z.core.$strip>>>;
|
|
301
|
+
}, z.core.$strip>>>;
|
|
302
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
303
|
+
}, z.core.$strip>>>>;
|
|
304
|
+
}, z.core.$strip>>>;
|
|
305
|
+
choiceCardAmounts: z.ZodOptional<z.ZodObject<{
|
|
306
|
+
testName: z.ZodString;
|
|
307
|
+
variantName: z.ZodString;
|
|
308
|
+
defaultContributionType: z.ZodEnum<{
|
|
309
|
+
ONE_OFF: "ONE_OFF";
|
|
310
|
+
MONTHLY: "MONTHLY";
|
|
311
|
+
ANNUAL: "ANNUAL";
|
|
312
|
+
}>;
|
|
313
|
+
displayContributionType: z.ZodArray<z.ZodEnum<{
|
|
314
|
+
ONE_OFF: "ONE_OFF";
|
|
315
|
+
MONTHLY: "MONTHLY";
|
|
316
|
+
ANNUAL: "ANNUAL";
|
|
317
|
+
}>>;
|
|
318
|
+
amountsCardData: z.ZodObject<{
|
|
319
|
+
ONE_OFF: z.ZodObject<{
|
|
320
|
+
amounts: z.ZodArray<z.ZodNumber>;
|
|
321
|
+
defaultAmount: z.ZodNumber;
|
|
322
|
+
hideChooseYourAmount: z.ZodOptional<z.ZodBoolean>;
|
|
323
|
+
}, z.core.$strip>;
|
|
324
|
+
MONTHLY: z.ZodObject<{
|
|
325
|
+
amounts: z.ZodArray<z.ZodNumber>;
|
|
326
|
+
defaultAmount: z.ZodNumber;
|
|
327
|
+
hideChooseYourAmount: z.ZodOptional<z.ZodBoolean>;
|
|
328
|
+
}, z.core.$strip>;
|
|
329
|
+
ANNUAL: z.ZodObject<{
|
|
330
|
+
amounts: z.ZodArray<z.ZodNumber>;
|
|
331
|
+
defaultAmount: z.ZodNumber;
|
|
332
|
+
hideChooseYourAmount: z.ZodOptional<z.ZodBoolean>;
|
|
333
|
+
}, z.core.$strip>;
|
|
334
|
+
}, z.core.$strip>;
|
|
335
|
+
}, z.core.$strip>>;
|
|
336
|
+
defaultChoiceCardFrequency: z.ZodOptional<z.ZodEnum<{
|
|
337
|
+
ONE_OFF: "ONE_OFF";
|
|
338
|
+
MONTHLY: "MONTHLY";
|
|
339
|
+
ANNUAL: "ANNUAL";
|
|
340
|
+
}>>;
|
|
341
|
+
}, z.core.$strip>>;
|
|
342
|
+
}, z.core.$strip>;
|
|
343
|
+
export type EpicVariant = z.infer<typeof variantSchema>;
|
|
344
|
+
export {};
|
|
345
|
+
//# sourceMappingURL=epic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"epic.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/abTests/epic.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
}, z.core.$strip>;
|
|
17
|
+
bodyCopy: z.ZodArray<z.ZodString>;
|
|
18
|
+
cta: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
text: z.ZodString;
|
|
20
|
+
baseUrl: z.ZodString;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
promoCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type GutterVariantFromTool = z.infer<typeof gutterVariantFromToolSchema>;
|
|
26
|
+
export declare const gutterTestFromToolSchema: z.ZodObject<{
|
|
27
|
+
channel: z.ZodEnum<{
|
|
28
|
+
Epic: "Epic";
|
|
29
|
+
EpicAppleNews: "EpicAppleNews";
|
|
30
|
+
EpicLiveblog: "EpicLiveblog";
|
|
31
|
+
Banner1: "Banner1";
|
|
32
|
+
Banner2: "Banner2";
|
|
33
|
+
Header: "Header";
|
|
34
|
+
GutterLiveblog: "GutterLiveblog";
|
|
35
|
+
}>;
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
status: z.ZodEnum<{
|
|
38
|
+
Live: "Live";
|
|
39
|
+
Draft: "Draft";
|
|
40
|
+
Archived: "Archived";
|
|
41
|
+
}>;
|
|
42
|
+
priority: z.ZodNumber;
|
|
43
|
+
controlProportionSettings: z.ZodOptional<z.ZodObject<{
|
|
44
|
+
proportion: z.ZodNumber;
|
|
45
|
+
offset: z.ZodNumber;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
deviceType: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
Mobile: "Mobile";
|
|
49
|
+
Desktop: "Desktop";
|
|
50
|
+
All: "All";
|
|
51
|
+
iOS: "iOS";
|
|
52
|
+
Android: "Android";
|
|
53
|
+
}>>;
|
|
54
|
+
signedInStatus: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
All: "All";
|
|
56
|
+
SignedIn: "SignedIn";
|
|
57
|
+
SignedOut: "SignedOut";
|
|
58
|
+
}>>;
|
|
59
|
+
consentStatus: z.ZodOptional<z.ZodEnum<{
|
|
60
|
+
All: "All";
|
|
61
|
+
HasConsented: "HasConsented";
|
|
62
|
+
HasNotConsented: "HasNotConsented";
|
|
63
|
+
}>>;
|
|
64
|
+
methodologies: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
65
|
+
name: z.ZodLiteral<"ABTest">;
|
|
66
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
67
|
+
name: z.ZodLiteral<"EpsilonGreedyBandit">;
|
|
68
|
+
epsilon: z.ZodNumber;
|
|
69
|
+
sampleCount: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
name: z.ZodLiteral<"Roulette">;
|
|
72
|
+
sampleCount: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
}, z.core.$strip>], "name">, z.ZodObject<{
|
|
74
|
+
testName: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>>>>;
|
|
76
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
77
|
+
GBPCountries: "GBPCountries";
|
|
78
|
+
UnitedStates: "UnitedStates";
|
|
79
|
+
AUDCountries: "AUDCountries";
|
|
80
|
+
EURCountries: "EURCountries";
|
|
81
|
+
International: "International";
|
|
82
|
+
NZDCountries: "NZDCountries";
|
|
83
|
+
Canada: "Canada";
|
|
84
|
+
}>>>;
|
|
85
|
+
regionTargeting: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
86
|
+
targetedCountryGroups: z.ZodArray<z.ZodEnum<{
|
|
87
|
+
GBPCountries: "GBPCountries";
|
|
88
|
+
UnitedStates: "UnitedStates";
|
|
89
|
+
AUDCountries: "AUDCountries";
|
|
90
|
+
EURCountries: "EURCountries";
|
|
91
|
+
International: "International";
|
|
92
|
+
NZDCountries: "NZDCountries";
|
|
93
|
+
Canada: "Canada";
|
|
94
|
+
}>>;
|
|
95
|
+
targetedCountryCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
|
+
}, z.core.$strip>>>;
|
|
97
|
+
userCohort: z.ZodEnum<{
|
|
98
|
+
AllExistingSupporters: "AllExistingSupporters";
|
|
99
|
+
AllNonSupporters: "AllNonSupporters";
|
|
100
|
+
Everyone: "Everyone";
|
|
101
|
+
PostAskPauseSingleContributors: "PostAskPauseSingleContributors";
|
|
102
|
+
}>;
|
|
103
|
+
contextTargeting: z.ZodObject<{
|
|
104
|
+
tagIds: z.ZodArray<z.ZodString>;
|
|
105
|
+
sectionIds: z.ZodArray<z.ZodString>;
|
|
106
|
+
excludedTagIds: z.ZodArray<z.ZodString>;
|
|
107
|
+
excludedSectionIds: z.ZodArray<z.ZodString>;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
variants: z.ZodArray<z.ZodObject<{
|
|
110
|
+
name: z.ZodString;
|
|
111
|
+
content: z.ZodObject<{
|
|
112
|
+
image: z.ZodObject<{
|
|
113
|
+
mainUrl: z.ZodString;
|
|
114
|
+
mobileUrl: z.ZodOptional<z.ZodString>;
|
|
115
|
+
tabletUrl: z.ZodOptional<z.ZodString>;
|
|
116
|
+
desktopUrl: z.ZodOptional<z.ZodString>;
|
|
117
|
+
leftColUrl: z.ZodOptional<z.ZodString>;
|
|
118
|
+
wideUrl: z.ZodOptional<z.ZodString>;
|
|
119
|
+
altText: z.ZodString;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
bodyCopy: z.ZodArray<z.ZodString>;
|
|
122
|
+
cta: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
text: z.ZodString;
|
|
124
|
+
baseUrl: z.ZodString;
|
|
125
|
+
}, z.core.$strip>>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
promoCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
128
|
+
}, z.core.$strip>>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
export type GutterTestFromTool = z.infer<typeof gutterTestFromToolSchema>;
|
|
131
|
+
/**
|
|
132
|
+
* Models with additional properties determined by the server
|
|
133
|
+
*/
|
|
134
|
+
export interface GutterVariant extends GutterVariantFromTool {
|
|
135
|
+
moduleName?: string;
|
|
136
|
+
}
|
|
137
|
+
export interface GutterTest extends GutterTestFromTool {
|
|
138
|
+
variants: GutterVariant[];
|
|
139
|
+
}
|
|
140
|
+
export interface GutterTestSelection {
|
|
141
|
+
test: GutterTest;
|
|
142
|
+
variant: GutterVariant;
|
|
143
|
+
moduleName: string;
|
|
144
|
+
}
|
|
145
|
+
export {};
|
|
146
|
+
//# 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":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;GAEG;AACH,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;iBAI/B,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMnC,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"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Models and schemas for data from the database
|
|
4
|
+
*/
|
|
5
|
+
declare const headerVariantFromToolSchema: z.ZodObject<{
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
content: z.ZodObject<{
|
|
8
|
+
heading: z.ZodString;
|
|
9
|
+
subheading: z.ZodString;
|
|
10
|
+
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
text: z.ZodString;
|
|
12
|
+
baseUrl: z.ZodString;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
secondaryCta: z.ZodOptional<z.ZodObject<{
|
|
15
|
+
text: z.ZodString;
|
|
16
|
+
baseUrl: z.ZodString;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
benefits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
mobileContent: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
heading: z.ZodString;
|
|
22
|
+
subheading: z.ZodString;
|
|
23
|
+
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
24
|
+
text: z.ZodString;
|
|
25
|
+
baseUrl: z.ZodString;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
secondaryCta: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
text: z.ZodString;
|
|
29
|
+
baseUrl: z.ZodString;
|
|
30
|
+
}, z.core.$strip>>;
|
|
31
|
+
benefits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
promoCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type HeaderVariantFromTool = z.infer<typeof headerVariantFromToolSchema>;
|
|
36
|
+
export declare const headerTestFromToolSchema: z.ZodObject<{
|
|
37
|
+
channel: z.ZodEnum<{
|
|
38
|
+
Epic: "Epic";
|
|
39
|
+
EpicAppleNews: "EpicAppleNews";
|
|
40
|
+
EpicLiveblog: "EpicLiveblog";
|
|
41
|
+
Banner1: "Banner1";
|
|
42
|
+
Banner2: "Banner2";
|
|
43
|
+
Header: "Header";
|
|
44
|
+
GutterLiveblog: "GutterLiveblog";
|
|
45
|
+
}>;
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
status: z.ZodEnum<{
|
|
48
|
+
Live: "Live";
|
|
49
|
+
Draft: "Draft";
|
|
50
|
+
Archived: "Archived";
|
|
51
|
+
}>;
|
|
52
|
+
priority: z.ZodNumber;
|
|
53
|
+
controlProportionSettings: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
proportion: z.ZodNumber;
|
|
55
|
+
offset: z.ZodNumber;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
deviceType: z.ZodOptional<z.ZodEnum<{
|
|
58
|
+
Mobile: "Mobile";
|
|
59
|
+
Desktop: "Desktop";
|
|
60
|
+
All: "All";
|
|
61
|
+
iOS: "iOS";
|
|
62
|
+
Android: "Android";
|
|
63
|
+
}>>;
|
|
64
|
+
signedInStatus: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
All: "All";
|
|
66
|
+
SignedIn: "SignedIn";
|
|
67
|
+
SignedOut: "SignedOut";
|
|
68
|
+
}>>;
|
|
69
|
+
consentStatus: z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
All: "All";
|
|
71
|
+
HasConsented: "HasConsented";
|
|
72
|
+
HasNotConsented: "HasNotConsented";
|
|
73
|
+
}>>;
|
|
74
|
+
methodologies: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
75
|
+
name: z.ZodLiteral<"ABTest">;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
name: z.ZodLiteral<"EpsilonGreedyBandit">;
|
|
78
|
+
epsilon: z.ZodNumber;
|
|
79
|
+
sampleCount: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
name: z.ZodLiteral<"Roulette">;
|
|
82
|
+
sampleCount: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
}, z.core.$strip>], "name">, z.ZodObject<{
|
|
84
|
+
testName: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, z.core.$strip>>>>;
|
|
86
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
87
|
+
GBPCountries: "GBPCountries";
|
|
88
|
+
UnitedStates: "UnitedStates";
|
|
89
|
+
AUDCountries: "AUDCountries";
|
|
90
|
+
EURCountries: "EURCountries";
|
|
91
|
+
International: "International";
|
|
92
|
+
NZDCountries: "NZDCountries";
|
|
93
|
+
Canada: "Canada";
|
|
94
|
+
}>>>;
|
|
95
|
+
regionTargeting: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
96
|
+
targetedCountryGroups: z.ZodArray<z.ZodEnum<{
|
|
97
|
+
GBPCountries: "GBPCountries";
|
|
98
|
+
UnitedStates: "UnitedStates";
|
|
99
|
+
AUDCountries: "AUDCountries";
|
|
100
|
+
EURCountries: "EURCountries";
|
|
101
|
+
International: "International";
|
|
102
|
+
NZDCountries: "NZDCountries";
|
|
103
|
+
Canada: "Canada";
|
|
104
|
+
}>>;
|
|
105
|
+
targetedCountryCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
106
|
+
}, z.core.$strip>>>;
|
|
107
|
+
userCohort: z.ZodEnum<{
|
|
108
|
+
AllExistingSupporters: "AllExistingSupporters";
|
|
109
|
+
AllNonSupporters: "AllNonSupporters";
|
|
110
|
+
Everyone: "Everyone";
|
|
111
|
+
PostAskPauseSingleContributors: "PostAskPauseSingleContributors";
|
|
112
|
+
}>;
|
|
113
|
+
purchaseInfo: z.ZodOptional<z.ZodObject<{
|
|
114
|
+
userType: z.ZodArray<z.ZodEnum<{
|
|
115
|
+
new: "new";
|
|
116
|
+
guest: "guest";
|
|
117
|
+
current: "current";
|
|
118
|
+
}>>;
|
|
119
|
+
product: z.ZodArray<z.ZodEnum<{
|
|
120
|
+
Contribution: "Contribution";
|
|
121
|
+
SupporterPlus: "SupporterPlus";
|
|
122
|
+
GuardianWeekly: "GuardianWeekly";
|
|
123
|
+
Paper: "Paper";
|
|
124
|
+
}>>;
|
|
125
|
+
}, z.core.$strip>>;
|
|
126
|
+
variants: z.ZodArray<z.ZodObject<{
|
|
127
|
+
name: z.ZodString;
|
|
128
|
+
content: z.ZodObject<{
|
|
129
|
+
heading: z.ZodString;
|
|
130
|
+
subheading: z.ZodString;
|
|
131
|
+
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
132
|
+
text: z.ZodString;
|
|
133
|
+
baseUrl: z.ZodString;
|
|
134
|
+
}, z.core.$strip>>;
|
|
135
|
+
secondaryCta: z.ZodOptional<z.ZodObject<{
|
|
136
|
+
text: z.ZodString;
|
|
137
|
+
baseUrl: z.ZodString;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
benefits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
mobileContent: z.ZodOptional<z.ZodObject<{
|
|
142
|
+
heading: z.ZodString;
|
|
143
|
+
subheading: z.ZodString;
|
|
144
|
+
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
145
|
+
text: z.ZodString;
|
|
146
|
+
baseUrl: z.ZodString;
|
|
147
|
+
}, z.core.$strip>>;
|
|
148
|
+
secondaryCta: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
text: z.ZodString;
|
|
150
|
+
baseUrl: z.ZodString;
|
|
151
|
+
}, z.core.$strip>>;
|
|
152
|
+
benefits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
promoCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
155
|
+
}, z.core.$strip>>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
export type HeaderTestFromTool = z.infer<typeof headerTestFromToolSchema>;
|
|
158
|
+
/**
|
|
159
|
+
* Models with additional properties determined by the server
|
|
160
|
+
*/
|
|
161
|
+
export interface HeaderVariant extends HeaderVariantFromTool {
|
|
162
|
+
moduleName?: string;
|
|
163
|
+
}
|
|
164
|
+
export interface HeaderTest extends HeaderTestFromTool {
|
|
165
|
+
variants: HeaderVariant[];
|
|
166
|
+
}
|
|
167
|
+
export interface HeaderTestSelection {
|
|
168
|
+
test: HeaderTest;
|
|
169
|
+
variant: HeaderVariant;
|
|
170
|
+
moduleName: string;
|
|
171
|
+
}
|
|
172
|
+
export {};
|
|
173
|
+
//# sourceMappingURL=header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/abTests/header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;GAEG;AACH,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK/B,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMnC,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"}
|