@mozilla/nimbus-schemas 2024.11.3 → 2024.11.5
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/index.d.ts
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* make schemas_build
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
export type DesktopApplication = "firefox-desktop" | "firefox-desktop-background-task";
|
|
10
|
-
export type FeatureVariableType = "int" | "string" | "boolean" | "json";
|
|
11
|
-
export type PrefBranch = "default" | "user";
|
|
12
9
|
/**
|
|
13
10
|
* A unique, stable indentifier for the user used as an input to bucket hashing.
|
|
14
11
|
*/
|
|
15
12
|
export type RandomizationUnit = "normandy_id" | "nimbus_id" | "user_id" | "group_id";
|
|
13
|
+
export type DesktopApplication = "firefox-desktop" | "firefox-desktop-background-task";
|
|
14
|
+
export type FeatureVariableType = "int" | "string" | "boolean" | "json";
|
|
15
|
+
export type PrefBranch = "default" | "user";
|
|
16
16
|
export type AnalysisBasis = "enrollments" | "exposures";
|
|
17
17
|
export type LogSource = "jetstream" | "sizing" | "jetstream-preview";
|
|
18
18
|
export type AnalysisErrors = AnalysisError[];
|
|
@@ -32,6 +32,237 @@ export type SizingMetricName = "active_hours" | "search_count" | "days_of_use" |
|
|
|
32
32
|
export type StatisticIngestEnum = "percentage" | "binomial" | "mean" | "count";
|
|
33
33
|
export type Statistics = Statistic[];
|
|
34
34
|
|
|
35
|
+
/**
|
|
36
|
+
* A Nimbus experiment for Firefox Desktop.
|
|
37
|
+
*
|
|
38
|
+
* This schema is more strict than DesktopNimbusExperiment and is backwards
|
|
39
|
+
* comaptible with Firefox Desktop versions less than 95. It is intended for use inside
|
|
40
|
+
* Experimenter itself.
|
|
41
|
+
*/
|
|
42
|
+
export interface DesktopAllVersionsNimbusExperiment {
|
|
43
|
+
/**
|
|
44
|
+
* Version of the NimbusExperiment schema this experiment refers to
|
|
45
|
+
*/
|
|
46
|
+
schemaVersion: string;
|
|
47
|
+
/**
|
|
48
|
+
* Unique identifier for the experiment
|
|
49
|
+
*/
|
|
50
|
+
slug: string;
|
|
51
|
+
/**
|
|
52
|
+
* Unique identifier for the experiiment.
|
|
53
|
+
*
|
|
54
|
+
* This is a duplicate of slug, but is required field for all Remote Settings records.
|
|
55
|
+
*/
|
|
56
|
+
id: string;
|
|
57
|
+
/**
|
|
58
|
+
* A slug identifying the targeted product of this experiment.
|
|
59
|
+
*
|
|
60
|
+
* It should be a lowercased_with_underscores name that is short and unambiguous and it should match the app_name found in https://probeinfo.telemetry.mozilla.org/glean/repositories. Examples are "fenix" and "firefox_desktop".
|
|
61
|
+
*/
|
|
62
|
+
appName: string;
|
|
63
|
+
/**
|
|
64
|
+
* The platform identifier for the targeted app.
|
|
65
|
+
*
|
|
66
|
+
* This should match app's identifier exactly as it appears in the relevant app store listing (for relevant platforms) or the app's Glean initialization (for other platforms).
|
|
67
|
+
*
|
|
68
|
+
* Examples are "org.mozilla.firefox_beta" and "firefox-desktop".
|
|
69
|
+
*/
|
|
70
|
+
appId: string;
|
|
71
|
+
/**
|
|
72
|
+
* A specific channel of an application such as "nightly", "beta", or "release".
|
|
73
|
+
*/
|
|
74
|
+
channel: string;
|
|
75
|
+
/**
|
|
76
|
+
* Public name of the experiment that will be displayed on "about:studies".
|
|
77
|
+
*/
|
|
78
|
+
userFacingName: string;
|
|
79
|
+
/**
|
|
80
|
+
* Short public description of the experiment that will be displayed on "about:studies".
|
|
81
|
+
*/
|
|
82
|
+
userFacingDescription: string;
|
|
83
|
+
/**
|
|
84
|
+
* When this property is set to true, the SDK should not enroll new users into the experiment that have not already been enrolled.
|
|
85
|
+
*/
|
|
86
|
+
isEnrollmentPaused: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* When this property is set to true, treat this experiment as a rollout.
|
|
89
|
+
*
|
|
90
|
+
* Rollouts are currently handled as single-branch experiments separated from the bucketing namespace for normal experiments.
|
|
91
|
+
*
|
|
92
|
+
* See-also: https://mozilla-hub.atlassian.net/browse/SDK-405
|
|
93
|
+
*/
|
|
94
|
+
isRollout?: boolean;
|
|
95
|
+
bucketConfig: ExperimentBucketConfig;
|
|
96
|
+
/**
|
|
97
|
+
* A list of outcomes relevant to the experiment analysis.
|
|
98
|
+
*/
|
|
99
|
+
outcomes?: ExperimentOutcome[];
|
|
100
|
+
/**
|
|
101
|
+
* A list of featureIds the experiment contains configurations for.
|
|
102
|
+
*/
|
|
103
|
+
featureIds?: string[];
|
|
104
|
+
/**
|
|
105
|
+
* A JEXL targeting expression used to filter out experiments.
|
|
106
|
+
*/
|
|
107
|
+
targeting?: string | null;
|
|
108
|
+
/**
|
|
109
|
+
* Actual publish date of the experiment.
|
|
110
|
+
*
|
|
111
|
+
* Note that this value is expected to be null in Remote Settings.
|
|
112
|
+
*/
|
|
113
|
+
startDate: string | null;
|
|
114
|
+
/**
|
|
115
|
+
* Actual enrollment end date of the experiment.
|
|
116
|
+
*
|
|
117
|
+
* Note that this value is expected to be null in Remote Settings.
|
|
118
|
+
*/
|
|
119
|
+
enrollmentEndDate?: string | null;
|
|
120
|
+
/**
|
|
121
|
+
* Actual end date of this experiment.
|
|
122
|
+
*
|
|
123
|
+
* Note that this field is expected to be null in Remote Settings.
|
|
124
|
+
*/
|
|
125
|
+
endDate: string | null;
|
|
126
|
+
/**
|
|
127
|
+
* Duration of the experiment from the start date in days.
|
|
128
|
+
*
|
|
129
|
+
* Note that this property is only used during the analysis phase (i.e., not by the SDK).
|
|
130
|
+
*/
|
|
131
|
+
proposedDuration?: number;
|
|
132
|
+
/**
|
|
133
|
+
* This represents the number of days that we expect to enroll new users.
|
|
134
|
+
*
|
|
135
|
+
* Note that this property is only used during the analysis phase (i.e., not by the SDK).
|
|
136
|
+
*/
|
|
137
|
+
proposedEnrollment: number;
|
|
138
|
+
/**
|
|
139
|
+
* The slug of the reference branch (i.e., the branch we consider "control").
|
|
140
|
+
*/
|
|
141
|
+
referenceBranch: string | null;
|
|
142
|
+
/**
|
|
143
|
+
* The list of locale codes (e.g., "en-US" or "fr") that this experiment is targeting.
|
|
144
|
+
*
|
|
145
|
+
* If null, all locales are targeted.
|
|
146
|
+
*/
|
|
147
|
+
locales?: string[] | null;
|
|
148
|
+
/**
|
|
149
|
+
* The date that this experiment was first published to Remote Settings.
|
|
150
|
+
*
|
|
151
|
+
* If null, it has not yet been published.
|
|
152
|
+
*/
|
|
153
|
+
publishedDate?: string | null;
|
|
154
|
+
/**
|
|
155
|
+
* Branch configuration for the experiment.
|
|
156
|
+
*/
|
|
157
|
+
branches: DesktopAllVersionsExperimentBranch[];
|
|
158
|
+
/**
|
|
159
|
+
* When this property is set to true, treat this experiment as aFirefox Labs experiment
|
|
160
|
+
*/
|
|
161
|
+
isFirefoxLabsOptIn?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* An optional string containing the Fluent ID for the title of the opt-in
|
|
164
|
+
*/
|
|
165
|
+
firefoxLabsTitle?: string | null;
|
|
166
|
+
/**
|
|
167
|
+
* An optional string containing the Fluent ID for the description of the opt-in
|
|
168
|
+
*/
|
|
169
|
+
firefoxLabsDescription?: string | null;
|
|
170
|
+
/**
|
|
171
|
+
* Opt out of feature schema validation.
|
|
172
|
+
*/
|
|
173
|
+
featureValidationOptOut?: boolean;
|
|
174
|
+
localizations?: ExperimentLocalizations | null;
|
|
175
|
+
}
|
|
176
|
+
export interface ExperimentBucketConfig {
|
|
177
|
+
randomizationUnit: RandomizationUnit;
|
|
178
|
+
/**
|
|
179
|
+
* Additional inputs to the hashing function.
|
|
180
|
+
*/
|
|
181
|
+
namespace: string;
|
|
182
|
+
/**
|
|
183
|
+
* Index of the starting bucket of the range.
|
|
184
|
+
*/
|
|
185
|
+
start: number;
|
|
186
|
+
/**
|
|
187
|
+
* Number of buckets in the range.
|
|
188
|
+
*/
|
|
189
|
+
count: number;
|
|
190
|
+
/**
|
|
191
|
+
* The total number of buckets.
|
|
192
|
+
*
|
|
193
|
+
* You can assume this will always be 10000
|
|
194
|
+
*/
|
|
195
|
+
total: number;
|
|
196
|
+
}
|
|
197
|
+
export interface ExperimentOutcome {
|
|
198
|
+
/**
|
|
199
|
+
* Identifier for the outcome.
|
|
200
|
+
*/
|
|
201
|
+
slug: string;
|
|
202
|
+
/**
|
|
203
|
+
* e.g., "primary" or "secondary".
|
|
204
|
+
*/
|
|
205
|
+
priority: string;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* The branch definition supported on all Firefox Desktop versions.
|
|
209
|
+
*
|
|
210
|
+
* This version requires the feature field to be present to support older Firefox Desktop
|
|
211
|
+
* clients.
|
|
212
|
+
*/
|
|
213
|
+
export interface DesktopAllVersionsExperimentBranch {
|
|
214
|
+
/**
|
|
215
|
+
* Identifier for the branch.
|
|
216
|
+
*/
|
|
217
|
+
slug: string;
|
|
218
|
+
/**
|
|
219
|
+
* Relative ratio of population for the branch.
|
|
220
|
+
*
|
|
221
|
+
* e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.
|
|
222
|
+
*/
|
|
223
|
+
ratio: number;
|
|
224
|
+
/**
|
|
225
|
+
* An array of feature configurations.
|
|
226
|
+
*/
|
|
227
|
+
features: ExperimentFeatureConfig[];
|
|
228
|
+
/**
|
|
229
|
+
* An optional string containing the title of the branch
|
|
230
|
+
*/
|
|
231
|
+
firefoxLabsTitle?: string | null;
|
|
232
|
+
feature: DesktopPre95FeatureConfig;
|
|
233
|
+
}
|
|
234
|
+
export interface ExperimentFeatureConfig {
|
|
235
|
+
/**
|
|
236
|
+
* The identifier for the feature flag.
|
|
237
|
+
*/
|
|
238
|
+
featureId: string;
|
|
239
|
+
/**
|
|
240
|
+
* The values that define the feature configuration.
|
|
241
|
+
*
|
|
242
|
+
* This should be validated against a schema.
|
|
243
|
+
*/
|
|
244
|
+
value: {
|
|
245
|
+
[k: string]: unknown;
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
export interface DesktopPre95FeatureConfig {
|
|
249
|
+
featureId: "this-is-included-for-desktop-pre-95-support";
|
|
250
|
+
value: {
|
|
251
|
+
[k: string]: unknown;
|
|
252
|
+
};
|
|
253
|
+
enabled: false;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Per-locale localization substitutions.
|
|
257
|
+
*
|
|
258
|
+
* The top level key is the locale (e.g., "en-US" or "fr"). Each entry is a mapping of
|
|
259
|
+
* string IDs to their localized equivalents.
|
|
260
|
+
*/
|
|
261
|
+
export interface ExperimentLocalizations {
|
|
262
|
+
[k: string]: {
|
|
263
|
+
[k: string]: string;
|
|
264
|
+
};
|
|
265
|
+
}
|
|
35
266
|
/**
|
|
36
267
|
* A feature.
|
|
37
268
|
*/
|
|
@@ -135,6 +366,9 @@ export interface DesktopFeatureManifest {
|
|
|
135
366
|
}
|
|
136
367
|
/**
|
|
137
368
|
* A Nimbus experiment for Firefox Desktop.
|
|
369
|
+
*
|
|
370
|
+
* This schema is less strict than DesktopAllVersionsNimbusExperiment and is intended for
|
|
371
|
+
* use in Firefox Desktop.
|
|
138
372
|
*/
|
|
139
373
|
export interface DesktopNimbusExperiment {
|
|
140
374
|
/**
|
|
@@ -259,48 +493,17 @@ export interface DesktopNimbusExperiment {
|
|
|
259
493
|
/**
|
|
260
494
|
* An optional string containing the Fluent ID for the title of the opt-in
|
|
261
495
|
*/
|
|
262
|
-
firefoxLabsTitle?: string;
|
|
496
|
+
firefoxLabsTitle?: string | null;
|
|
263
497
|
/**
|
|
264
498
|
* An optional string containing the Fluent ID for the description of the opt-in
|
|
265
499
|
*/
|
|
266
|
-
firefoxLabsDescription?: string;
|
|
500
|
+
firefoxLabsDescription?: string | null;
|
|
267
501
|
/**
|
|
268
502
|
* Opt out of feature schema validation.
|
|
269
503
|
*/
|
|
270
504
|
featureValidationOptOut?: boolean;
|
|
271
505
|
localizations?: ExperimentLocalizations | null;
|
|
272
506
|
}
|
|
273
|
-
export interface ExperimentBucketConfig {
|
|
274
|
-
randomizationUnit: RandomizationUnit;
|
|
275
|
-
/**
|
|
276
|
-
* Additional inputs to the hashing function.
|
|
277
|
-
*/
|
|
278
|
-
namespace: string;
|
|
279
|
-
/**
|
|
280
|
-
* Index of the starting bucket of the range.
|
|
281
|
-
*/
|
|
282
|
-
start: number;
|
|
283
|
-
/**
|
|
284
|
-
* Number of buckets in the range.
|
|
285
|
-
*/
|
|
286
|
-
count: number;
|
|
287
|
-
/**
|
|
288
|
-
* The total number of buckets.
|
|
289
|
-
*
|
|
290
|
-
* You can assume this will always be 10000
|
|
291
|
-
*/
|
|
292
|
-
total: number;
|
|
293
|
-
}
|
|
294
|
-
export interface ExperimentOutcome {
|
|
295
|
-
/**
|
|
296
|
-
* Identifier for the outcome.
|
|
297
|
-
*/
|
|
298
|
-
slug: string;
|
|
299
|
-
/**
|
|
300
|
-
* e.g., "primary" or "secondary".
|
|
301
|
-
*/
|
|
302
|
-
priority: string;
|
|
303
|
-
}
|
|
304
507
|
/**
|
|
305
508
|
* The branch definition supported on Firefox Desktop 95+.
|
|
306
509
|
*/
|
|
@@ -319,74 +522,10 @@ export interface DesktopExperimentBranch {
|
|
|
319
522
|
* An array of feature configurations.
|
|
320
523
|
*/
|
|
321
524
|
features: ExperimentFeatureConfig[];
|
|
322
|
-
feature: DesktopTombstoneFeatureConfig;
|
|
323
525
|
/**
|
|
324
526
|
* An optional string containing the title of the branch
|
|
325
527
|
*/
|
|
326
|
-
firefoxLabsTitle?: string;
|
|
327
|
-
}
|
|
328
|
-
export interface ExperimentFeatureConfig {
|
|
329
|
-
/**
|
|
330
|
-
* The identifier for the feature flag.
|
|
331
|
-
*/
|
|
332
|
-
featureId: string;
|
|
333
|
-
/**
|
|
334
|
-
* The values that define the feature configuration.
|
|
335
|
-
*
|
|
336
|
-
* This should be validated against a schema.
|
|
337
|
-
*/
|
|
338
|
-
value: {
|
|
339
|
-
[k: string]: unknown;
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
export interface DesktopTombstoneFeatureConfig {
|
|
343
|
-
featureId: "unused-feature-id-for-legacy-support";
|
|
344
|
-
value: {
|
|
345
|
-
[k: string]: unknown;
|
|
346
|
-
};
|
|
347
|
-
enabled: false;
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* Per-locale localization substitutions.
|
|
351
|
-
*
|
|
352
|
-
* The top level key is the locale (e.g., "en-US" or "fr"). Each entry is a mapping of
|
|
353
|
-
* string IDs to their localized equivalents.
|
|
354
|
-
*/
|
|
355
|
-
export interface ExperimentLocalizations {
|
|
356
|
-
[k: string]: {
|
|
357
|
-
[k: string]: string;
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* A Nimbus experiment for Nimbus SDK-based applications.
|
|
362
|
-
*/
|
|
363
|
-
export interface SdkNimbusExperiment {
|
|
364
|
-
/**
|
|
365
|
-
* Branch configuration for the experiment.
|
|
366
|
-
*/
|
|
367
|
-
branches: SdkExperimentBranch[];
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* The branch definition for SDK-based applications
|
|
371
|
-
*
|
|
372
|
-
* Supported on Firefox for Android 96+ and Firefox for iOS 39+ and all versions of
|
|
373
|
-
* Cirrus.
|
|
374
|
-
*/
|
|
375
|
-
export interface SdkExperimentBranch {
|
|
376
|
-
/**
|
|
377
|
-
* Identifier for the branch.
|
|
378
|
-
*/
|
|
379
|
-
slug: string;
|
|
380
|
-
/**
|
|
381
|
-
* Relative ratio of population for the branch.
|
|
382
|
-
*
|
|
383
|
-
* e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.
|
|
384
|
-
*/
|
|
385
|
-
ratio: number;
|
|
386
|
-
/**
|
|
387
|
-
* An array of feature configurations.
|
|
388
|
-
*/
|
|
389
|
-
features: ExperimentFeatureConfig[];
|
|
528
|
+
firefoxLabsTitle?: string | null;
|
|
390
529
|
}
|
|
391
530
|
/**
|
|
392
531
|
* The SDK-specific feature manifest.
|
|
@@ -435,6 +574,37 @@ export interface SdkFeatureVariable {
|
|
|
435
574
|
*/
|
|
436
575
|
enum?: string[];
|
|
437
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
* A Nimbus experiment for Nimbus SDK-based applications.
|
|
579
|
+
*/
|
|
580
|
+
export interface SdkNimbusExperiment {
|
|
581
|
+
/**
|
|
582
|
+
* Branch configuration for the experiment.
|
|
583
|
+
*/
|
|
584
|
+
branches: SdkExperimentBranch[];
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* The branch definition for SDK-based applications
|
|
588
|
+
*
|
|
589
|
+
* Supported on Firefox for Android 96+ and Firefox for iOS 39+ and all versions of
|
|
590
|
+
* Cirrus.
|
|
591
|
+
*/
|
|
592
|
+
export interface SdkExperimentBranch {
|
|
593
|
+
/**
|
|
594
|
+
* Identifier for the branch.
|
|
595
|
+
*/
|
|
596
|
+
slug: string;
|
|
597
|
+
/**
|
|
598
|
+
* Relative ratio of population for the branch.
|
|
599
|
+
*
|
|
600
|
+
* e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.
|
|
601
|
+
*/
|
|
602
|
+
ratio: number;
|
|
603
|
+
/**
|
|
604
|
+
* An array of feature configurations.
|
|
605
|
+
*/
|
|
606
|
+
features: ExperimentFeatureConfig[];
|
|
607
|
+
}
|
|
438
608
|
export interface AnalysisError {
|
|
439
609
|
analysis_basis?: AnalysisBasis | null;
|
|
440
610
|
source?: LogSource | null;
|
package/package.json
CHANGED
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
3
|
+
"title": "DesktopAllVersionsNimbusExperiment",
|
|
4
|
+
"description": "A Nimbus experiment for Firefox Desktop. This schema is more strict than DesktopNimbusExperiment and is backwards comaptible with Firefox Desktop versions less than 95. It is intended for use inside Experimenter itself.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"schemaVersion": {
|
|
8
|
+
"description": "Version of the NimbusExperiment schema this experiment refers to",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"slug": {
|
|
12
|
+
"description": "Unique identifier for the experiment",
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"id": {
|
|
16
|
+
"description": "Unique identifier for the experiiment. This is a duplicate of slug, but is required field for all Remote Settings records.",
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"appName": {
|
|
20
|
+
"description": "A slug identifying the targeted product of this experiment. It should be a lowercased_with_underscores name that is short and unambiguous and it should match the app_name found in https://probeinfo.telemetry.mozilla.org/glean/repositories. Examples are \"fenix\" and \"firefox_desktop\".",
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"appId": {
|
|
24
|
+
"description": "The platform identifier for the targeted app. This should match app's identifier exactly as it appears in the relevant app store listing (for relevant platforms) or the app's Glean initialization (for other platforms). Examples are \"org.mozilla.firefox_beta\" and \"firefox-desktop\".",
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"channel": {
|
|
28
|
+
"description": "A specific channel of an application such as \"nightly\", \"beta\", or \"release\".",
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"userFacingName": {
|
|
32
|
+
"description": "Public name of the experiment that will be displayed on \"about:studies\".",
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"userFacingDescription": {
|
|
36
|
+
"description": "Short public description of the experiment that will be displayed on \"about:studies\".",
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"isEnrollmentPaused": {
|
|
40
|
+
"description": "When this property is set to true, the SDK should not enroll new users into the experiment that have not already been enrolled.",
|
|
41
|
+
"type": "boolean"
|
|
42
|
+
},
|
|
43
|
+
"isRollout": {
|
|
44
|
+
"description": "When this property is set to true, treat this experiment as a rollout. Rollouts are currently handled as single-branch experiments separated from the bucketing namespace for normal experiments. See-also: https://mozilla-hub.atlassian.net/browse/SDK-405",
|
|
45
|
+
"type": "boolean"
|
|
46
|
+
},
|
|
47
|
+
"bucketConfig": {
|
|
48
|
+
"$ref": "#/$defs/ExperimentBucketConfig",
|
|
49
|
+
"description": "Bucketing configuration."
|
|
50
|
+
},
|
|
51
|
+
"outcomes": {
|
|
52
|
+
"description": "A list of outcomes relevant to the experiment analysis.",
|
|
53
|
+
"items": {
|
|
54
|
+
"$ref": "#/$defs/ExperimentOutcome"
|
|
55
|
+
},
|
|
56
|
+
"type": "array"
|
|
57
|
+
},
|
|
58
|
+
"featureIds": {
|
|
59
|
+
"description": "A list of featureIds the experiment contains configurations for.",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"type": "array"
|
|
64
|
+
},
|
|
65
|
+
"targeting": {
|
|
66
|
+
"anyOf": [
|
|
67
|
+
{
|
|
68
|
+
"type": "string"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "null"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"description": "A JEXL targeting expression used to filter out experiments."
|
|
75
|
+
},
|
|
76
|
+
"startDate": {
|
|
77
|
+
"anyOf": [
|
|
78
|
+
{
|
|
79
|
+
"format": "date",
|
|
80
|
+
"type": "string"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "null"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"description": "Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings."
|
|
87
|
+
},
|
|
88
|
+
"enrollmentEndDate": {
|
|
89
|
+
"anyOf": [
|
|
90
|
+
{
|
|
91
|
+
"format": "date",
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "null"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"description": "Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings."
|
|
99
|
+
},
|
|
100
|
+
"endDate": {
|
|
101
|
+
"anyOf": [
|
|
102
|
+
{
|
|
103
|
+
"format": "date",
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "null"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"description": "Actual end date of this experiment. Note that this field is expected to be null in Remote Settings."
|
|
111
|
+
},
|
|
112
|
+
"proposedDuration": {
|
|
113
|
+
"description": "Duration of the experiment from the start date in days. Note that this property is only used during the analysis phase (i.e., not by the SDK).",
|
|
114
|
+
"type": "integer"
|
|
115
|
+
},
|
|
116
|
+
"proposedEnrollment": {
|
|
117
|
+
"description": "This represents the number of days that we expect to enroll new users. Note that this property is only used during the analysis phase (i.e., not by the SDK).",
|
|
118
|
+
"type": "integer"
|
|
119
|
+
},
|
|
120
|
+
"referenceBranch": {
|
|
121
|
+
"anyOf": [
|
|
122
|
+
{
|
|
123
|
+
"type": "string"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"type": "null"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
|
|
130
|
+
},
|
|
131
|
+
"locales": {
|
|
132
|
+
"anyOf": [
|
|
133
|
+
{
|
|
134
|
+
"items": {
|
|
135
|
+
"type": "string"
|
|
136
|
+
},
|
|
137
|
+
"type": "array"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"type": "null"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"description": "The list of locale codes (e.g., \"en-US\" or \"fr\") that this experiment is targeting. If null, all locales are targeted."
|
|
144
|
+
},
|
|
145
|
+
"publishedDate": {
|
|
146
|
+
"anyOf": [
|
|
147
|
+
{
|
|
148
|
+
"format": "date-time",
|
|
149
|
+
"type": "string"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"type": "null"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"description": "The date that this experiment was first published to Remote Settings. If null, it has not yet been published."
|
|
156
|
+
},
|
|
157
|
+
"branches": {
|
|
158
|
+
"description": "Branch configuration for the experiment.",
|
|
159
|
+
"items": {
|
|
160
|
+
"$ref": "#/$defs/DesktopAllVersionsExperimentBranch"
|
|
161
|
+
},
|
|
162
|
+
"type": "array"
|
|
163
|
+
},
|
|
164
|
+
"isFirefoxLabsOptIn": {
|
|
165
|
+
"description": "When this property is set to true, treat this experiment as aFirefox Labs experiment",
|
|
166
|
+
"type": "boolean"
|
|
167
|
+
},
|
|
168
|
+
"firefoxLabsTitle": {
|
|
169
|
+
"anyOf": [
|
|
170
|
+
{
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"type": "null"
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"description": "An optional string containing the Fluent ID for the title of the opt-in"
|
|
178
|
+
},
|
|
179
|
+
"firefoxLabsDescription": {
|
|
180
|
+
"anyOf": [
|
|
181
|
+
{
|
|
182
|
+
"type": "string"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"type": "null"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"description": "An optional string containing the Fluent ID for the description of the opt-in"
|
|
189
|
+
},
|
|
190
|
+
"featureValidationOptOut": {
|
|
191
|
+
"description": "Opt out of feature schema validation.",
|
|
192
|
+
"type": "boolean"
|
|
193
|
+
},
|
|
194
|
+
"localizations": {
|
|
195
|
+
"anyOf": [
|
|
196
|
+
{
|
|
197
|
+
"$ref": "#/$defs/ExperimentLocalizations"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"type": "null"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"required": [
|
|
206
|
+
"schemaVersion",
|
|
207
|
+
"slug",
|
|
208
|
+
"id",
|
|
209
|
+
"appName",
|
|
210
|
+
"appId",
|
|
211
|
+
"channel",
|
|
212
|
+
"userFacingName",
|
|
213
|
+
"userFacingDescription",
|
|
214
|
+
"isEnrollmentPaused",
|
|
215
|
+
"bucketConfig",
|
|
216
|
+
"startDate",
|
|
217
|
+
"endDate",
|
|
218
|
+
"proposedEnrollment",
|
|
219
|
+
"referenceBranch",
|
|
220
|
+
"branches"
|
|
221
|
+
],
|
|
222
|
+
"dependentSchemas": {
|
|
223
|
+
"isFirefoxLabsOptIn": {
|
|
224
|
+
"if": {
|
|
225
|
+
"properties": {
|
|
226
|
+
"isFirefoxLabsOptIn": {
|
|
227
|
+
"const": true
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"then": {
|
|
232
|
+
"if": {
|
|
233
|
+
"properties": {
|
|
234
|
+
"isRollout": {
|
|
235
|
+
"const": false
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"required": [
|
|
239
|
+
"isRollout"
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
"properties": {
|
|
243
|
+
"firefoxLabsTitle": {
|
|
244
|
+
"type": "string"
|
|
245
|
+
},
|
|
246
|
+
"firefoxLabsDescription": {
|
|
247
|
+
"type": "string"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"required": [
|
|
251
|
+
"firefoxLabsTitle",
|
|
252
|
+
"firefoxLabsDescription"
|
|
253
|
+
],
|
|
254
|
+
"then": {
|
|
255
|
+
"properties": {
|
|
256
|
+
"branches": {
|
|
257
|
+
"items": {
|
|
258
|
+
"required": [
|
|
259
|
+
"firefoxLabsTitle"
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"$defs": {
|
|
269
|
+
"DesktopAllVersionsExperimentBranch": {
|
|
270
|
+
"description": "The branch definition supported on all Firefox Desktop versions. This version requires the feature field to be present to support older Firefox Desktop clients.",
|
|
271
|
+
"properties": {
|
|
272
|
+
"slug": {
|
|
273
|
+
"description": "Identifier for the branch.",
|
|
274
|
+
"type": "string"
|
|
275
|
+
},
|
|
276
|
+
"ratio": {
|
|
277
|
+
"description": "Relative ratio of population for the branch. e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.",
|
|
278
|
+
"type": "integer"
|
|
279
|
+
},
|
|
280
|
+
"features": {
|
|
281
|
+
"description": "An array of feature configurations.",
|
|
282
|
+
"items": {
|
|
283
|
+
"$ref": "#/$defs/ExperimentFeatureConfig"
|
|
284
|
+
},
|
|
285
|
+
"type": "array"
|
|
286
|
+
},
|
|
287
|
+
"firefoxLabsTitle": {
|
|
288
|
+
"anyOf": [
|
|
289
|
+
{
|
|
290
|
+
"type": "string"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"type": "null"
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
"description": "An optional string containing the title of the branch"
|
|
297
|
+
},
|
|
298
|
+
"feature": {
|
|
299
|
+
"$ref": "#/$defs/DesktopPre95FeatureConfig",
|
|
300
|
+
"description": "The feature key must be provided with values to prevent crashes if the is encountered by Desktop clients earlier than version 95."
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"required": [
|
|
304
|
+
"slug",
|
|
305
|
+
"ratio",
|
|
306
|
+
"features",
|
|
307
|
+
"feature"
|
|
308
|
+
],
|
|
309
|
+
"type": "object"
|
|
310
|
+
},
|
|
311
|
+
"DesktopPre95FeatureConfig": {
|
|
312
|
+
"properties": {
|
|
313
|
+
"featureId": {
|
|
314
|
+
"const": "this-is-included-for-desktop-pre-95-support",
|
|
315
|
+
"type": "string"
|
|
316
|
+
},
|
|
317
|
+
"value": {
|
|
318
|
+
"type": "object"
|
|
319
|
+
},
|
|
320
|
+
"enabled": {
|
|
321
|
+
"const": false,
|
|
322
|
+
"type": "boolean"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"required": [
|
|
326
|
+
"featureId",
|
|
327
|
+
"value",
|
|
328
|
+
"enabled"
|
|
329
|
+
],
|
|
330
|
+
"type": "object"
|
|
331
|
+
},
|
|
332
|
+
"ExperimentBucketConfig": {
|
|
333
|
+
"properties": {
|
|
334
|
+
"randomizationUnit": {
|
|
335
|
+
"$ref": "#/$defs/RandomizationUnit"
|
|
336
|
+
},
|
|
337
|
+
"namespace": {
|
|
338
|
+
"description": "Additional inputs to the hashing function.",
|
|
339
|
+
"type": "string"
|
|
340
|
+
},
|
|
341
|
+
"start": {
|
|
342
|
+
"description": "Index of the starting bucket of the range.",
|
|
343
|
+
"type": "integer"
|
|
344
|
+
},
|
|
345
|
+
"count": {
|
|
346
|
+
"description": "Number of buckets in the range.",
|
|
347
|
+
"type": "integer"
|
|
348
|
+
},
|
|
349
|
+
"total": {
|
|
350
|
+
"description": "The total number of buckets. You can assume this will always be 10000",
|
|
351
|
+
"type": "integer"
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
"required": [
|
|
355
|
+
"randomizationUnit",
|
|
356
|
+
"namespace",
|
|
357
|
+
"start",
|
|
358
|
+
"count",
|
|
359
|
+
"total"
|
|
360
|
+
],
|
|
361
|
+
"type": "object"
|
|
362
|
+
},
|
|
363
|
+
"ExperimentFeatureConfig": {
|
|
364
|
+
"properties": {
|
|
365
|
+
"featureId": {
|
|
366
|
+
"description": "The identifier for the feature flag.",
|
|
367
|
+
"type": "string"
|
|
368
|
+
},
|
|
369
|
+
"value": {
|
|
370
|
+
"description": "The values that define the feature configuration. This should be validated against a schema.",
|
|
371
|
+
"type": "object"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"required": [
|
|
375
|
+
"featureId",
|
|
376
|
+
"value"
|
|
377
|
+
],
|
|
378
|
+
"type": "object"
|
|
379
|
+
},
|
|
380
|
+
"ExperimentLocalizations": {
|
|
381
|
+
"additionalProperties": {
|
|
382
|
+
"additionalProperties": {
|
|
383
|
+
"type": "string"
|
|
384
|
+
},
|
|
385
|
+
"type": "object"
|
|
386
|
+
},
|
|
387
|
+
"description": "Per-locale localization substitutions. The top level key is the locale (e.g., \"en-US\" or \"fr\"). Each entry is a mapping of string IDs to their localized equivalents.",
|
|
388
|
+
"type": "object"
|
|
389
|
+
},
|
|
390
|
+
"ExperimentOutcome": {
|
|
391
|
+
"properties": {
|
|
392
|
+
"slug": {
|
|
393
|
+
"description": "Identifier for the outcome.",
|
|
394
|
+
"type": "string"
|
|
395
|
+
},
|
|
396
|
+
"priority": {
|
|
397
|
+
"description": "e.g., \"primary\" or \"secondary\".",
|
|
398
|
+
"type": "string"
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"required": [
|
|
402
|
+
"slug",
|
|
403
|
+
"priority"
|
|
404
|
+
],
|
|
405
|
+
"type": "object"
|
|
406
|
+
},
|
|
407
|
+
"RandomizationUnit": {
|
|
408
|
+
"description": "A unique, stable indentifier for the user used as an input to bucket hashing.",
|
|
409
|
+
"enum": [
|
|
410
|
+
"normandy_id",
|
|
411
|
+
"nimbus_id",
|
|
412
|
+
"user_id",
|
|
413
|
+
"group_id"
|
|
414
|
+
],
|
|
415
|
+
"type": "string"
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
3
3
|
"title": "DesktopNimbusExperiment",
|
|
4
|
-
"description": "A Nimbus experiment for Firefox Desktop.",
|
|
4
|
+
"description": "A Nimbus experiment for Firefox Desktop. This schema is less strict than DesktopAllVersionsNimbusExperiment and is intended for use in Firefox Desktop.",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"schemaVersion": {
|
|
@@ -166,12 +166,26 @@
|
|
|
166
166
|
"type": "boolean"
|
|
167
167
|
},
|
|
168
168
|
"firefoxLabsTitle": {
|
|
169
|
-
"
|
|
170
|
-
|
|
169
|
+
"anyOf": [
|
|
170
|
+
{
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"type": "null"
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"description": "An optional string containing the Fluent ID for the title of the opt-in"
|
|
171
178
|
},
|
|
172
179
|
"firefoxLabsDescription": {
|
|
173
|
-
"
|
|
174
|
-
|
|
180
|
+
"anyOf": [
|
|
181
|
+
{
|
|
182
|
+
"type": "string"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"type": "null"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"description": "An optional string containing the Fluent ID for the description of the opt-in"
|
|
175
189
|
},
|
|
176
190
|
"featureValidationOptOut": {
|
|
177
191
|
"description": "Opt out of feature schema validation.",
|
|
@@ -270,41 +284,22 @@
|
|
|
270
284
|
},
|
|
271
285
|
"type": "array"
|
|
272
286
|
},
|
|
273
|
-
"feature": {
|
|
274
|
-
"$ref": "#/$defs/DesktopTombstoneFeatureConfig",
|
|
275
|
-
"description": "The feature key must be provided with values to prevent crashes if the is encountered by Desktop clients earlier than version 95."
|
|
276
|
-
},
|
|
277
287
|
"firefoxLabsTitle": {
|
|
278
|
-
"
|
|
279
|
-
|
|
288
|
+
"anyOf": [
|
|
289
|
+
{
|
|
290
|
+
"type": "string"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"type": "null"
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
"description": "An optional string containing the title of the branch"
|
|
280
297
|
}
|
|
281
298
|
},
|
|
282
299
|
"required": [
|
|
283
300
|
"slug",
|
|
284
301
|
"ratio",
|
|
285
|
-
"features"
|
|
286
|
-
"feature"
|
|
287
|
-
],
|
|
288
|
-
"type": "object"
|
|
289
|
-
},
|
|
290
|
-
"DesktopTombstoneFeatureConfig": {
|
|
291
|
-
"properties": {
|
|
292
|
-
"featureId": {
|
|
293
|
-
"const": "unused-feature-id-for-legacy-support",
|
|
294
|
-
"type": "string"
|
|
295
|
-
},
|
|
296
|
-
"value": {
|
|
297
|
-
"type": "object"
|
|
298
|
-
},
|
|
299
|
-
"enabled": {
|
|
300
|
-
"const": false,
|
|
301
|
-
"type": "boolean"
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
"required": [
|
|
305
|
-
"featureId",
|
|
306
|
-
"value",
|
|
307
|
-
"enabled"
|
|
302
|
+
"features"
|
|
308
303
|
],
|
|
309
304
|
"type": "object"
|
|
310
305
|
},
|