@mozilla/nimbus-schemas 2024.12.2 → 3000.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.
- package/README.md +33 -7
- package/index.d.ts +271 -225
- package/package.json +1 -1
- package/schemas/DesktopAllVersionsNimbusExperiment.schema.json +42 -23
- package/schemas/DesktopFeature.schema.json +4 -0
- package/schemas/DesktopFeatureManifest.schema.json +4 -0
- package/schemas/DesktopNimbusExperiment.schema.json +41 -22
- package/schemas/ExperimentBucketConfig.schema.json +46 -0
- package/schemas/ExperimentFeatureConfig.schema.json +19 -0
- package/schemas/ExperimentLocalizations.schema.json +12 -0
- package/schemas/ExperimentOutcome.schema.json +19 -0
- package/schemas/NimbusExperimentV7.schema.json +306 -0
- package/schemas/SdkFeatureManifest.schema.json +4 -0
- package/schemas/SdkNimbusExperiment.schema.json +226 -3
package/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* A unique, stable
|
|
10
|
+
* A unique, stable identifier for the user used as an input to bucket hashing.
|
|
11
11
|
*/
|
|
12
12
|
export type RandomizationUnit = "normandy_id" | "nimbus_id" | "user_id" | "group_id";
|
|
13
13
|
export type DesktopApplication = "firefox-desktop" | "firefox-desktop-background-task";
|
|
@@ -49,52 +49,40 @@ export interface DesktopAllVersionsNimbusExperiment {
|
|
|
49
49
|
*/
|
|
50
50
|
slug: string;
|
|
51
51
|
/**
|
|
52
|
-
* Unique identifier for the
|
|
53
|
-
*
|
|
54
|
-
* This is a duplicate of slug, but is required field for all Remote Settings records.
|
|
52
|
+
* Unique identifier for the experiment. This is a duplicate of slug, but is required field for all Remote Settings records.
|
|
55
53
|
*/
|
|
56
54
|
id: string;
|
|
57
55
|
/**
|
|
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".
|
|
56
|
+
* 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".
|
|
61
57
|
*/
|
|
62
58
|
appName: string;
|
|
63
59
|
/**
|
|
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".
|
|
60
|
+
* 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".
|
|
69
61
|
*/
|
|
70
62
|
appId: string;
|
|
71
63
|
/**
|
|
72
|
-
* A specific channel of an application such as
|
|
64
|
+
* A specific channel of an application such as 'nightly', 'beta', or 'release'.
|
|
73
65
|
*/
|
|
74
66
|
channel: string;
|
|
75
67
|
/**
|
|
76
|
-
* Public name of the experiment
|
|
68
|
+
* Public name of the experiment displayed on 'about:studies'.
|
|
77
69
|
*/
|
|
78
70
|
userFacingName: string;
|
|
79
71
|
/**
|
|
80
|
-
* Short public description of the experiment
|
|
72
|
+
* Short public description of the experiment. that will be displayed on "about:studies".
|
|
81
73
|
*/
|
|
82
74
|
userFacingDescription: string;
|
|
83
75
|
/**
|
|
84
|
-
* When this property is set to true, the SDK should not enroll
|
|
76
|
+
* When this property is set to true, the SDK should not enroll new users into the experiment that have not already been enrolled.
|
|
85
77
|
*/
|
|
86
78
|
isEnrollmentPaused: boolean;
|
|
87
79
|
/**
|
|
88
|
-
* When this property is set to true, treat this experiment
|
|
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
|
|
80
|
+
* 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
|
|
93
81
|
*/
|
|
94
82
|
isRollout?: boolean;
|
|
95
83
|
bucketConfig: ExperimentBucketConfig;
|
|
96
84
|
/**
|
|
97
|
-
*
|
|
85
|
+
* List of outcomes relevant to analysis.
|
|
98
86
|
*/
|
|
99
87
|
outcomes?: ExperimentOutcome[];
|
|
100
88
|
/**
|
|
@@ -106,49 +94,35 @@ export interface DesktopAllVersionsNimbusExperiment {
|
|
|
106
94
|
*/
|
|
107
95
|
targeting?: string | null;
|
|
108
96
|
/**
|
|
109
|
-
* Actual publish date of the experiment.
|
|
110
|
-
*
|
|
111
|
-
* Note that this value is expected to be null in Remote Settings.
|
|
97
|
+
* Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings.
|
|
112
98
|
*/
|
|
113
99
|
startDate: string | null;
|
|
114
100
|
/**
|
|
115
|
-
* Actual enrollment end date of the experiment.
|
|
116
|
-
*
|
|
117
|
-
* Note that this value is expected to be null in Remote Settings.
|
|
101
|
+
* Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings.
|
|
118
102
|
*/
|
|
119
103
|
enrollmentEndDate?: string | null;
|
|
120
104
|
/**
|
|
121
|
-
* Actual end date of this experiment.
|
|
122
|
-
*
|
|
123
|
-
* Note that this field is expected to be null in Remote Settings.
|
|
105
|
+
* Actual end date of this experiment. Note that this field is expected to be null in Remote Settings.
|
|
124
106
|
*/
|
|
125
107
|
endDate: string | null;
|
|
126
108
|
/**
|
|
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).
|
|
109
|
+
* 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).
|
|
130
110
|
*/
|
|
131
111
|
proposedDuration?: number;
|
|
132
112
|
/**
|
|
133
|
-
* This represents the number of days that we expect to
|
|
134
|
-
*
|
|
135
|
-
* Note that this property is only used during the analysis phase (i.e., not by the SDK).
|
|
113
|
+
* 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).
|
|
136
114
|
*/
|
|
137
115
|
proposedEnrollment: number;
|
|
138
116
|
/**
|
|
139
|
-
* The slug of the reference branch
|
|
117
|
+
* The slug of the reference branch (i.e., the branch we consider "control").
|
|
140
118
|
*/
|
|
141
119
|
referenceBranch: string | null;
|
|
142
120
|
/**
|
|
143
|
-
* The list of locale codes (e.g., "en-US" or "fr") that this
|
|
144
|
-
*
|
|
145
|
-
* If null, all locales are targeted.
|
|
121
|
+
* The list of locale codes (e.g., "en-US" or "fr") that this experiment is targeting. If null, all locales are targeted.
|
|
146
122
|
*/
|
|
147
123
|
locales?: string[] | null;
|
|
148
124
|
/**
|
|
149
|
-
* The date that this experiment was first published to
|
|
150
|
-
*
|
|
151
|
-
* If null, it has not yet been published.
|
|
125
|
+
* The date that this experiment was first published to Remote Settings. If null, it has not yet been published.
|
|
152
126
|
*/
|
|
153
127
|
publishedDate?: string | null;
|
|
154
128
|
/**
|
|
@@ -156,7 +130,7 @@ export interface DesktopAllVersionsNimbusExperiment {
|
|
|
156
130
|
*/
|
|
157
131
|
branches: DesktopAllVersionsExperimentBranch[];
|
|
158
132
|
/**
|
|
159
|
-
* When this property is set to true, treat this experiment as
|
|
133
|
+
* When this property is set to true, treat this experiment as a Firefox Labs experiment
|
|
160
134
|
*/
|
|
161
135
|
isFirefoxLabsOptIn?: boolean;
|
|
162
136
|
/**
|
|
@@ -171,18 +145,25 @@ export interface DesktopAllVersionsNimbusExperiment {
|
|
|
171
145
|
* The description shown in Firefox Labs (Fluent ID)
|
|
172
146
|
*/
|
|
173
147
|
firefoxLabsDescription?: string | null;
|
|
148
|
+
/**
|
|
149
|
+
* Links that will be used with the Firefox Labs description Fluent ID. May be null for Firefox Labs Opt-In recipes that do not use links.
|
|
150
|
+
*/
|
|
151
|
+
firefoxLabsDescriptionLinks?: {
|
|
152
|
+
[k: string]: string;
|
|
153
|
+
} | null;
|
|
174
154
|
/**
|
|
175
155
|
* Opt out of feature schema validation.
|
|
176
156
|
*/
|
|
177
157
|
featureValidationOptOut?: boolean;
|
|
178
158
|
/**
|
|
179
159
|
* Does the experiment require a restart to take effect?
|
|
180
|
-
*
|
|
181
|
-
* Only used by Firefox Labs Opt-Ins.
|
|
182
160
|
*/
|
|
183
161
|
requiresRestart?: boolean;
|
|
184
162
|
localizations?: ExperimentLocalizations | null;
|
|
185
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* Common Bucketing Configuration used across all versions.
|
|
166
|
+
*/
|
|
186
167
|
export interface ExperimentBucketConfig {
|
|
187
168
|
randomizationUnit: RandomizationUnit;
|
|
188
169
|
/**
|
|
@@ -198,9 +179,7 @@ export interface ExperimentBucketConfig {
|
|
|
198
179
|
*/
|
|
199
180
|
count: number;
|
|
200
181
|
/**
|
|
201
|
-
* The total number of buckets.
|
|
202
|
-
*
|
|
203
|
-
* You can assume this will always be 10000
|
|
182
|
+
* The total number of buckets. You can assume this will always be 10000.
|
|
204
183
|
*/
|
|
205
184
|
total: number;
|
|
206
185
|
}
|
|
@@ -227,8 +206,7 @@ export interface DesktopAllVersionsExperimentBranch {
|
|
|
227
206
|
slug: string;
|
|
228
207
|
/**
|
|
229
208
|
* Relative ratio of population for the branch.
|
|
230
|
-
*
|
|
231
|
-
* e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.
|
|
209
|
+
* e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.
|
|
232
210
|
*/
|
|
233
211
|
ratio: number;
|
|
234
212
|
/**
|
|
@@ -273,107 +251,6 @@ export interface ExperimentLocalizations {
|
|
|
273
251
|
[k: string]: string;
|
|
274
252
|
};
|
|
275
253
|
}
|
|
276
|
-
/**
|
|
277
|
-
* A feature.
|
|
278
|
-
*/
|
|
279
|
-
export interface DesktopFeature {
|
|
280
|
-
/**
|
|
281
|
-
* The description of the feature.
|
|
282
|
-
*/
|
|
283
|
-
description: string;
|
|
284
|
-
/**
|
|
285
|
-
* Whether or not this feature records exposure telemetry.
|
|
286
|
-
*/
|
|
287
|
-
hasExposure: boolean;
|
|
288
|
-
/**
|
|
289
|
-
* A description of the exposure telemetry collected by this feature.
|
|
290
|
-
*
|
|
291
|
-
* Only required if hasExposure is true.
|
|
292
|
-
*/
|
|
293
|
-
exposureDescription?: string;
|
|
294
|
-
/**
|
|
295
|
-
* The owner of the feature.
|
|
296
|
-
*/
|
|
297
|
-
owner: string;
|
|
298
|
-
/**
|
|
299
|
-
* If true, the feature values will be cached in prefs so that they can be read before Nimbus is initialized during Firefox startup.
|
|
300
|
-
*/
|
|
301
|
-
isEarlyStartup?: boolean;
|
|
302
|
-
/**
|
|
303
|
-
* The applications that can enroll in experiments for this feature.
|
|
304
|
-
*
|
|
305
|
-
* Defaults to "firefox-desktop".
|
|
306
|
-
*/
|
|
307
|
-
applications?: DesktopApplication[];
|
|
308
|
-
/**
|
|
309
|
-
* The variables that this feature can set.
|
|
310
|
-
*/
|
|
311
|
-
variables: {
|
|
312
|
-
[k: string]: DesktopFeatureVariable;
|
|
313
|
-
};
|
|
314
|
-
schema?: NimbusFeatureSchema;
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* A feature variable.
|
|
318
|
-
*/
|
|
319
|
-
export interface DesktopFeatureVariable {
|
|
320
|
-
/**
|
|
321
|
-
* A description of the feature.
|
|
322
|
-
*/
|
|
323
|
-
description: string;
|
|
324
|
-
type: FeatureVariableType;
|
|
325
|
-
/**
|
|
326
|
-
* An optional list of possible string or integer values.
|
|
327
|
-
*
|
|
328
|
-
* Only allowed when type is string or int.
|
|
329
|
-
*
|
|
330
|
-
* The types in the enum must match the type of the field.
|
|
331
|
-
*/
|
|
332
|
-
enum?: string[] | number[];
|
|
333
|
-
/**
|
|
334
|
-
* A pref that provides the default value for a feature when none is present.
|
|
335
|
-
*/
|
|
336
|
-
fallbackPref?: string;
|
|
337
|
-
/**
|
|
338
|
-
* A pref that should be set to the value of this variable when enrolling in experiments.
|
|
339
|
-
*
|
|
340
|
-
* Using a string is deprecated and unsupported in Firefox 124+.
|
|
341
|
-
*/
|
|
342
|
-
setPref?: string | SetPref;
|
|
343
|
-
}
|
|
344
|
-
export interface SetPref {
|
|
345
|
-
branch: PrefBranch;
|
|
346
|
-
/**
|
|
347
|
-
* The name of the pref to set.
|
|
348
|
-
*/
|
|
349
|
-
pref: string;
|
|
350
|
-
}
|
|
351
|
-
/**
|
|
352
|
-
* Information about a JSON schema.
|
|
353
|
-
*/
|
|
354
|
-
export interface NimbusFeatureSchema {
|
|
355
|
-
/**
|
|
356
|
-
* The resource:// or chrome:// URI that can be loaded at runtime within Firefox.
|
|
357
|
-
*
|
|
358
|
-
* Required by Firefox so that Nimbus can import the schema for validation.
|
|
359
|
-
*/
|
|
360
|
-
uri: string;
|
|
361
|
-
/**
|
|
362
|
-
* The path to the schema file in the source checkout.
|
|
363
|
-
*
|
|
364
|
-
* Required by Experimenter so that it can find schema files in source checkouts.
|
|
365
|
-
*/
|
|
366
|
-
path: string;
|
|
367
|
-
}
|
|
368
|
-
/**
|
|
369
|
-
* The Firefox Desktop-specific feature manifest.
|
|
370
|
-
*
|
|
371
|
-
* Firefox Desktop requires different fields for its features compared to the general
|
|
372
|
-
* Nimbus feature manifest.
|
|
373
|
-
*/
|
|
374
|
-
export interface DesktopFeatureManifest {
|
|
375
|
-
[k: string]: DesktopFeature;
|
|
376
|
-
}
|
|
377
254
|
/**
|
|
378
255
|
* A Nimbus experiment for Firefox Desktop.
|
|
379
256
|
*
|
|
@@ -390,52 +267,40 @@ export interface DesktopNimbusExperiment {
|
|
|
390
267
|
*/
|
|
391
268
|
slug: string;
|
|
392
269
|
/**
|
|
393
|
-
* Unique identifier for the
|
|
394
|
-
*
|
|
395
|
-
* This is a duplicate of slug, but is required field for all Remote Settings records.
|
|
270
|
+
* Unique identifier for the experiment. This is a duplicate of slug, but is required field for all Remote Settings records.
|
|
396
271
|
*/
|
|
397
272
|
id: string;
|
|
398
273
|
/**
|
|
399
|
-
* A slug identifying the targeted product of this experiment.
|
|
400
|
-
*
|
|
401
|
-
* 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".
|
|
274
|
+
* 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".
|
|
402
275
|
*/
|
|
403
276
|
appName: string;
|
|
404
277
|
/**
|
|
405
|
-
* The platform identifier for the targeted app.
|
|
406
|
-
*
|
|
407
|
-
* 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).
|
|
408
|
-
*
|
|
409
|
-
* Examples are "org.mozilla.firefox_beta" and "firefox-desktop".
|
|
278
|
+
* 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".
|
|
410
279
|
*/
|
|
411
280
|
appId: string;
|
|
412
281
|
/**
|
|
413
|
-
* A specific channel of an application such as
|
|
282
|
+
* A specific channel of an application such as 'nightly', 'beta', or 'release'.
|
|
414
283
|
*/
|
|
415
284
|
channel: string;
|
|
416
285
|
/**
|
|
417
|
-
* Public name of the experiment
|
|
286
|
+
* Public name of the experiment displayed on 'about:studies'.
|
|
418
287
|
*/
|
|
419
288
|
userFacingName: string;
|
|
420
289
|
/**
|
|
421
|
-
* Short public description of the experiment
|
|
290
|
+
* Short public description of the experiment. that will be displayed on "about:studies".
|
|
422
291
|
*/
|
|
423
292
|
userFacingDescription: string;
|
|
424
293
|
/**
|
|
425
|
-
* When this property is set to true, the SDK should not enroll
|
|
294
|
+
* When this property is set to true, the SDK should not enroll new users into the experiment that have not already been enrolled.
|
|
426
295
|
*/
|
|
427
296
|
isEnrollmentPaused: boolean;
|
|
428
297
|
/**
|
|
429
|
-
* When this property is set to true, treat this experiment
|
|
430
|
-
*
|
|
431
|
-
* Rollouts are currently handled as single-branch experiments separated from the bucketing namespace for normal experiments.
|
|
432
|
-
*
|
|
433
|
-
* See-also: https://mozilla-hub.atlassian.net/browse/SDK-405
|
|
298
|
+
* 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
|
|
434
299
|
*/
|
|
435
300
|
isRollout?: boolean;
|
|
436
301
|
bucketConfig: ExperimentBucketConfig;
|
|
437
302
|
/**
|
|
438
|
-
*
|
|
303
|
+
* List of outcomes relevant to analysis.
|
|
439
304
|
*/
|
|
440
305
|
outcomes?: ExperimentOutcome[];
|
|
441
306
|
/**
|
|
@@ -447,49 +312,35 @@ export interface DesktopNimbusExperiment {
|
|
|
447
312
|
*/
|
|
448
313
|
targeting?: string | null;
|
|
449
314
|
/**
|
|
450
|
-
* Actual publish date of the experiment.
|
|
451
|
-
*
|
|
452
|
-
* Note that this value is expected to be null in Remote Settings.
|
|
315
|
+
* Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings.
|
|
453
316
|
*/
|
|
454
317
|
startDate: string | null;
|
|
455
318
|
/**
|
|
456
|
-
* Actual enrollment end date of the experiment.
|
|
457
|
-
*
|
|
458
|
-
* Note that this value is expected to be null in Remote Settings.
|
|
319
|
+
* Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings.
|
|
459
320
|
*/
|
|
460
321
|
enrollmentEndDate?: string | null;
|
|
461
322
|
/**
|
|
462
|
-
* Actual end date of this experiment.
|
|
463
|
-
*
|
|
464
|
-
* Note that this field is expected to be null in Remote Settings.
|
|
323
|
+
* Actual end date of this experiment. Note that this field is expected to be null in Remote Settings.
|
|
465
324
|
*/
|
|
466
325
|
endDate: string | null;
|
|
467
326
|
/**
|
|
468
|
-
* Duration of the experiment from the start date in days.
|
|
469
|
-
*
|
|
470
|
-
* Note that this property is only used during the analysis phase (i.e., not by the SDK).
|
|
327
|
+
* 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).
|
|
471
328
|
*/
|
|
472
329
|
proposedDuration?: number;
|
|
473
330
|
/**
|
|
474
|
-
* This represents the number of days that we expect to
|
|
475
|
-
*
|
|
476
|
-
* Note that this property is only used during the analysis phase (i.e., not by the SDK).
|
|
331
|
+
* 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).
|
|
477
332
|
*/
|
|
478
333
|
proposedEnrollment: number;
|
|
479
334
|
/**
|
|
480
|
-
* The slug of the reference branch
|
|
335
|
+
* The slug of the reference branch (i.e., the branch we consider "control").
|
|
481
336
|
*/
|
|
482
337
|
referenceBranch: string | null;
|
|
483
338
|
/**
|
|
484
|
-
* The list of locale codes (e.g., "en-US" or "fr") that this
|
|
485
|
-
*
|
|
486
|
-
* If null, all locales are targeted.
|
|
339
|
+
* The list of locale codes (e.g., "en-US" or "fr") that this experiment is targeting. If null, all locales are targeted.
|
|
487
340
|
*/
|
|
488
341
|
locales?: string[] | null;
|
|
489
342
|
/**
|
|
490
|
-
* The date that this experiment was first published to
|
|
491
|
-
*
|
|
492
|
-
* If null, it has not yet been published.
|
|
343
|
+
* The date that this experiment was first published to Remote Settings. If null, it has not yet been published.
|
|
493
344
|
*/
|
|
494
345
|
publishedDate?: string | null;
|
|
495
346
|
/**
|
|
@@ -497,7 +348,7 @@ export interface DesktopNimbusExperiment {
|
|
|
497
348
|
*/
|
|
498
349
|
branches: DesktopExperimentBranch[];
|
|
499
350
|
/**
|
|
500
|
-
* When this property is set to true, treat this experiment as
|
|
351
|
+
* When this property is set to true, treat this experiment as a Firefox Labs experiment
|
|
501
352
|
*/
|
|
502
353
|
isFirefoxLabsOptIn?: boolean;
|
|
503
354
|
/**
|
|
@@ -512,14 +363,18 @@ export interface DesktopNimbusExperiment {
|
|
|
512
363
|
* The description shown in Firefox Labs (Fluent ID)
|
|
513
364
|
*/
|
|
514
365
|
firefoxLabsDescription?: string | null;
|
|
366
|
+
/**
|
|
367
|
+
* Links that will be used with the Firefox Labs description Fluent ID. May be null for Firefox Labs Opt-In recipes that do not use links.
|
|
368
|
+
*/
|
|
369
|
+
firefoxLabsDescriptionLinks?: {
|
|
370
|
+
[k: string]: string;
|
|
371
|
+
} | null;
|
|
515
372
|
/**
|
|
516
373
|
* Opt out of feature schema validation.
|
|
517
374
|
*/
|
|
518
375
|
featureValidationOptOut?: boolean;
|
|
519
376
|
/**
|
|
520
377
|
* Does the experiment require a restart to take effect?
|
|
521
|
-
*
|
|
522
|
-
* Only used by Firefox Labs Opt-Ins.
|
|
523
378
|
*/
|
|
524
379
|
requiresRestart?: boolean;
|
|
525
380
|
localizations?: ExperimentLocalizations | null;
|
|
@@ -534,8 +389,7 @@ export interface DesktopExperimentBranch {
|
|
|
534
389
|
slug: string;
|
|
535
390
|
/**
|
|
536
391
|
* Relative ratio of population for the branch.
|
|
537
|
-
*
|
|
538
|
-
* e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.
|
|
392
|
+
* e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.
|
|
539
393
|
*/
|
|
540
394
|
ratio: number;
|
|
541
395
|
/**
|
|
@@ -548,15 +402,123 @@ export interface DesktopExperimentBranch {
|
|
|
548
402
|
firefoxLabsTitle?: string | null;
|
|
549
403
|
}
|
|
550
404
|
/**
|
|
551
|
-
*
|
|
405
|
+
* A Nimbus experiment for Nimbus SDK-based applications.
|
|
552
406
|
*/
|
|
553
|
-
export interface
|
|
554
|
-
|
|
407
|
+
export interface SdkNimbusExperiment {
|
|
408
|
+
/**
|
|
409
|
+
* Version of the NimbusExperiment schema this experiment refers to
|
|
410
|
+
*/
|
|
411
|
+
schemaVersion: string;
|
|
412
|
+
/**
|
|
413
|
+
* Unique identifier for the experiment
|
|
414
|
+
*/
|
|
415
|
+
slug: string;
|
|
416
|
+
/**
|
|
417
|
+
* Unique identifier for the experiment. This is a duplicate of slug, but is required field for all Remote Settings records.
|
|
418
|
+
*/
|
|
419
|
+
id: string;
|
|
420
|
+
/**
|
|
421
|
+
* 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".
|
|
422
|
+
*/
|
|
423
|
+
appName: string;
|
|
424
|
+
/**
|
|
425
|
+
* 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".
|
|
426
|
+
*/
|
|
427
|
+
appId: string;
|
|
428
|
+
/**
|
|
429
|
+
* A specific channel of an application such as 'nightly', 'beta', or 'release'.
|
|
430
|
+
*/
|
|
431
|
+
channel: string;
|
|
432
|
+
/**
|
|
433
|
+
* Public name of the experiment displayed on 'about:studies'.
|
|
434
|
+
*/
|
|
435
|
+
userFacingName: string;
|
|
436
|
+
/**
|
|
437
|
+
* Short public description of the experiment. that will be displayed on "about:studies".
|
|
438
|
+
*/
|
|
439
|
+
userFacingDescription: string;
|
|
440
|
+
/**
|
|
441
|
+
* When this property is set to true, the SDK should not enroll new users into the experiment that have not already been enrolled.
|
|
442
|
+
*/
|
|
443
|
+
isEnrollmentPaused: boolean;
|
|
444
|
+
/**
|
|
445
|
+
* 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
|
|
446
|
+
*/
|
|
447
|
+
isRollout?: boolean;
|
|
448
|
+
bucketConfig: ExperimentBucketConfig;
|
|
449
|
+
/**
|
|
450
|
+
* List of outcomes relevant to analysis.
|
|
451
|
+
*/
|
|
452
|
+
outcomes?: ExperimentOutcome[];
|
|
453
|
+
/**
|
|
454
|
+
* A list of featureIds the experiment contains configurations for.
|
|
455
|
+
*/
|
|
456
|
+
featureIds?: string[];
|
|
457
|
+
/**
|
|
458
|
+
* A JEXL targeting expression used to filter out experiments.
|
|
459
|
+
*/
|
|
460
|
+
targeting?: string | null;
|
|
461
|
+
/**
|
|
462
|
+
* Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings.
|
|
463
|
+
*/
|
|
464
|
+
startDate: string | null;
|
|
465
|
+
/**
|
|
466
|
+
* Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings.
|
|
467
|
+
*/
|
|
468
|
+
enrollmentEndDate?: string | null;
|
|
469
|
+
/**
|
|
470
|
+
* Actual end date of this experiment. Note that this field is expected to be null in Remote Settings.
|
|
471
|
+
*/
|
|
472
|
+
endDate: string | null;
|
|
473
|
+
/**
|
|
474
|
+
* 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).
|
|
475
|
+
*/
|
|
476
|
+
proposedDuration?: number;
|
|
477
|
+
/**
|
|
478
|
+
* 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).
|
|
479
|
+
*/
|
|
480
|
+
proposedEnrollment: number;
|
|
481
|
+
/**
|
|
482
|
+
* The slug of the reference branch (i.e., the branch we consider "control").
|
|
483
|
+
*/
|
|
484
|
+
referenceBranch: string | null;
|
|
485
|
+
/**
|
|
486
|
+
* The list of locale codes (e.g., "en-US" or "fr") that this experiment is targeting. If null, all locales are targeted.
|
|
487
|
+
*/
|
|
488
|
+
locales?: string[] | null;
|
|
489
|
+
/**
|
|
490
|
+
* The date that this experiment was first published to Remote Settings. If null, it has not yet been published.
|
|
491
|
+
*/
|
|
492
|
+
publishedDate?: string | null;
|
|
493
|
+
/**
|
|
494
|
+
* Branch configuration for the SDK experiment.
|
|
495
|
+
*/
|
|
496
|
+
branches: SdkExperimentBranch[];
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* The branch definition for SDK-based applications.
|
|
500
|
+
*
|
|
501
|
+
* Supported on Firefox for Android 96+, Firefox for iOS 39+, and all versions of Cirrus.
|
|
502
|
+
*/
|
|
503
|
+
export interface SdkExperimentBranch {
|
|
504
|
+
/**
|
|
505
|
+
* Identifier for the branch.
|
|
506
|
+
*/
|
|
507
|
+
slug: string;
|
|
508
|
+
/**
|
|
509
|
+
* Relative ratio of population for the branch.
|
|
510
|
+
* e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.
|
|
511
|
+
*/
|
|
512
|
+
ratio: number;
|
|
513
|
+
/**
|
|
514
|
+
* An array of feature configurations.
|
|
515
|
+
*/
|
|
516
|
+
features: ExperimentFeatureConfig[];
|
|
555
517
|
}
|
|
556
518
|
/**
|
|
557
519
|
* A feature.
|
|
558
520
|
*/
|
|
559
|
-
export interface
|
|
521
|
+
export interface DesktopFeature {
|
|
560
522
|
/**
|
|
561
523
|
* The description of the feature.
|
|
562
524
|
*/
|
|
@@ -571,59 +533,143 @@ export interface SdkFeature {
|
|
|
571
533
|
* Only required if hasExposure is true.
|
|
572
534
|
*/
|
|
573
535
|
exposureDescription?: string;
|
|
536
|
+
/**
|
|
537
|
+
* The owner of the feature.
|
|
538
|
+
*/
|
|
539
|
+
owner: string;
|
|
540
|
+
/**
|
|
541
|
+
* If true, the feature values will be cached in prefs so that they can be read before Nimbus is initialized during Firefox startup.
|
|
542
|
+
*/
|
|
543
|
+
isEarlyStartup?: boolean;
|
|
544
|
+
/**
|
|
545
|
+
* The applications that can enroll in experiments for this feature.
|
|
546
|
+
*
|
|
547
|
+
* Defaults to "firefox-desktop".
|
|
548
|
+
*/
|
|
549
|
+
applications?: DesktopApplication[];
|
|
574
550
|
/**
|
|
575
551
|
* The variables that this feature can set.
|
|
576
552
|
*/
|
|
577
553
|
variables: {
|
|
578
|
-
[k: string]:
|
|
554
|
+
[k: string]: DesktopFeatureVariable;
|
|
579
555
|
};
|
|
556
|
+
schema?: NimbusFeatureSchema;
|
|
557
|
+
/**
|
|
558
|
+
* If true, clients can enroll in multiple experiments and rollouts that use this feature.
|
|
559
|
+
*/
|
|
560
|
+
allowCoenrollment?: boolean;
|
|
580
561
|
}
|
|
581
562
|
/**
|
|
582
563
|
* A feature variable.
|
|
583
564
|
*/
|
|
584
|
-
export interface
|
|
565
|
+
export interface DesktopFeatureVariable {
|
|
585
566
|
/**
|
|
586
567
|
* A description of the feature.
|
|
587
568
|
*/
|
|
588
569
|
description: string;
|
|
589
570
|
type: FeatureVariableType;
|
|
590
571
|
/**
|
|
591
|
-
* An optional list of possible string values.
|
|
572
|
+
* An optional list of possible string or integer values.
|
|
592
573
|
*
|
|
593
|
-
* Only allowed when type is string.
|
|
574
|
+
* Only allowed when type is string or int.
|
|
575
|
+
*
|
|
576
|
+
* The types in the enum must match the type of the field.
|
|
594
577
|
*/
|
|
595
|
-
enum?: string[];
|
|
578
|
+
enum?: string[] | number[];
|
|
579
|
+
/**
|
|
580
|
+
* A pref that provides the default value for a feature when none is present.
|
|
581
|
+
*/
|
|
582
|
+
fallbackPref?: string;
|
|
583
|
+
/**
|
|
584
|
+
* A pref that should be set to the value of this variable when enrolling in experiments.
|
|
585
|
+
*
|
|
586
|
+
* Using a string is deprecated and unsupported in Firefox 124+.
|
|
587
|
+
*/
|
|
588
|
+
setPref?: string | SetPref;
|
|
589
|
+
}
|
|
590
|
+
export interface SetPref {
|
|
591
|
+
branch: PrefBranch;
|
|
592
|
+
/**
|
|
593
|
+
* The name of the pref to set.
|
|
594
|
+
*/
|
|
595
|
+
pref: string;
|
|
596
596
|
}
|
|
597
597
|
/**
|
|
598
|
-
*
|
|
598
|
+
* Information about a JSON schema.
|
|
599
599
|
*/
|
|
600
|
-
export interface
|
|
600
|
+
export interface NimbusFeatureSchema {
|
|
601
601
|
/**
|
|
602
|
-
*
|
|
602
|
+
* The resource:// or chrome:// URI that can be loaded at runtime within Firefox.
|
|
603
|
+
*
|
|
604
|
+
* Required by Firefox so that Nimbus can import the schema for validation.
|
|
603
605
|
*/
|
|
604
|
-
|
|
606
|
+
uri: string;
|
|
607
|
+
/**
|
|
608
|
+
* The path to the schema file in the source checkout.
|
|
609
|
+
*
|
|
610
|
+
* Required by Experimenter so that it can find schema files in source checkouts.
|
|
611
|
+
*/
|
|
612
|
+
path: string;
|
|
605
613
|
}
|
|
606
614
|
/**
|
|
607
|
-
* The
|
|
615
|
+
* The Firefox Desktop-specific feature manifest.
|
|
608
616
|
*
|
|
609
|
-
*
|
|
610
|
-
*
|
|
617
|
+
* Firefox Desktop requires different fields for its features compared to the general
|
|
618
|
+
* Nimbus feature manifest.
|
|
611
619
|
*/
|
|
612
|
-
export interface
|
|
620
|
+
export interface DesktopFeatureManifest {
|
|
621
|
+
[k: string]: DesktopFeature;
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* The SDK-specific feature manifest.
|
|
625
|
+
*/
|
|
626
|
+
export interface SdkFeatureManifest {
|
|
627
|
+
[k: string]: SdkFeature;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* A feature.
|
|
631
|
+
*/
|
|
632
|
+
export interface SdkFeature {
|
|
613
633
|
/**
|
|
614
|
-
*
|
|
634
|
+
* The description of the feature.
|
|
615
635
|
*/
|
|
616
|
-
|
|
636
|
+
description: string;
|
|
617
637
|
/**
|
|
618
|
-
*
|
|
638
|
+
* Whether or not this feature records exposure telemetry.
|
|
639
|
+
*/
|
|
640
|
+
hasExposure: boolean;
|
|
641
|
+
/**
|
|
642
|
+
* A description of the exposure telemetry collected by this feature.
|
|
619
643
|
*
|
|
620
|
-
*
|
|
644
|
+
* Only required if hasExposure is true.
|
|
621
645
|
*/
|
|
622
|
-
|
|
646
|
+
exposureDescription?: string;
|
|
623
647
|
/**
|
|
624
|
-
*
|
|
648
|
+
* The variables that this feature can set.
|
|
625
649
|
*/
|
|
626
|
-
|
|
650
|
+
variables: {
|
|
651
|
+
[k: string]: SdkFeatureVariable;
|
|
652
|
+
};
|
|
653
|
+
/**
|
|
654
|
+
* If true, clients can enroll in multiple experiments and rollouts that use this feature.
|
|
655
|
+
*/
|
|
656
|
+
"allow-coenrollment"?: boolean;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* A feature variable.
|
|
660
|
+
*/
|
|
661
|
+
export interface SdkFeatureVariable {
|
|
662
|
+
/**
|
|
663
|
+
* A description of the feature.
|
|
664
|
+
*/
|
|
665
|
+
description: string;
|
|
666
|
+
type: FeatureVariableType;
|
|
667
|
+
/**
|
|
668
|
+
* An optional list of possible string values.
|
|
669
|
+
*
|
|
670
|
+
* Only allowed when type is string.
|
|
671
|
+
*/
|
|
672
|
+
enum?: string[];
|
|
627
673
|
}
|
|
628
674
|
export interface AnalysisError {
|
|
629
675
|
analysis_basis?: AnalysisBasis | null;
|