@mozilla/nimbus-schemas 2025.1.1 → 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/index.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  /**
10
- * A unique, stable indentifier for the user used as an input to bucket hashing.
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 experiiment.
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 "nightly", "beta", or "release".
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 that will be displayed on "about:studies".
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 that will be displayed on "about:studies".
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 new users into the experiment that have not already been enrolled.
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 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
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
- * A list of outcomes relevant to the experiment analysis.
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 enroll new users.
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 (i.e., the branch we consider "control").
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 experiment is targeting.
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 Remote Settings.
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 aFirefox Labs experiment
133
+ * When this property is set to true, treat this experiment as a Firefox Labs experiment
160
134
  */
161
135
  isFirefoxLabsOptIn?: boolean;
162
136
  /**
@@ -172,7 +146,7 @@ export interface DesktopAllVersionsNimbusExperiment {
172
146
  */
173
147
  firefoxLabsDescription?: string | null;
174
148
  /**
175
- * Links that will be used with the firefoxLabsDescription Fluent ID. May be null for Firefox Labs Opt-In recipes that do not use links.
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.
176
150
  */
177
151
  firefoxLabsDescriptionLinks?: {
178
152
  [k: string]: string;
@@ -183,12 +157,13 @@ export interface DesktopAllVersionsNimbusExperiment {
183
157
  featureValidationOptOut?: boolean;
184
158
  /**
185
159
  * Does the experiment require a restart to take effect?
186
- *
187
- * Only used by Firefox Labs Opt-Ins.
188
160
  */
189
161
  requiresRestart?: boolean;
190
162
  localizations?: ExperimentLocalizations | null;
191
163
  }
164
+ /**
165
+ * Common Bucketing Configuration used across all versions.
166
+ */
192
167
  export interface ExperimentBucketConfig {
193
168
  randomizationUnit: RandomizationUnit;
194
169
  /**
@@ -204,9 +179,7 @@ export interface ExperimentBucketConfig {
204
179
  */
205
180
  count: number;
206
181
  /**
207
- * The total number of buckets.
208
- *
209
- * You can assume this will always be 10000
182
+ * The total number of buckets. You can assume this will always be 10000.
210
183
  */
211
184
  total: number;
212
185
  }
@@ -233,8 +206,7 @@ export interface DesktopAllVersionsExperimentBranch {
233
206
  slug: string;
234
207
  /**
235
208
  * Relative ratio of population for the branch.
236
- *
237
- * 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.
238
210
  */
239
211
  ratio: number;
240
212
  /**
@@ -279,107 +251,6 @@ export interface ExperimentLocalizations {
279
251
  [k: string]: string;
280
252
  };
281
253
  }
282
- /**
283
- * A feature.
284
- */
285
- export interface DesktopFeature {
286
- /**
287
- * The description of the feature.
288
- */
289
- description: string;
290
- /**
291
- * Whether or not this feature records exposure telemetry.
292
- */
293
- hasExposure: boolean;
294
- /**
295
- * A description of the exposure telemetry collected by this feature.
296
- *
297
- * Only required if hasExposure is true.
298
- */
299
- exposureDescription?: string;
300
- /**
301
- * The owner of the feature.
302
- */
303
- owner: string;
304
- /**
305
- * If true, the feature values will be cached in prefs so that they can be read before Nimbus is initialized during Firefox startup.
306
- */
307
- isEarlyStartup?: boolean;
308
- /**
309
- * The applications that can enroll in experiments for this feature.
310
- *
311
- * Defaults to "firefox-desktop".
312
- */
313
- applications?: DesktopApplication[];
314
- /**
315
- * The variables that this feature can set.
316
- */
317
- variables: {
318
- [k: string]: DesktopFeatureVariable;
319
- };
320
- schema?: NimbusFeatureSchema;
321
- }
322
- /**
323
- * A feature variable.
324
- */
325
- export interface DesktopFeatureVariable {
326
- /**
327
- * A description of the feature.
328
- */
329
- description: string;
330
- type: FeatureVariableType;
331
- /**
332
- * An optional list of possible string or integer values.
333
- *
334
- * Only allowed when type is string or int.
335
- *
336
- * The types in the enum must match the type of the field.
337
- */
338
- enum?: string[] | number[];
339
- /**
340
- * A pref that provides the default value for a feature when none is present.
341
- */
342
- fallbackPref?: string;
343
- /**
344
- * A pref that should be set to the value of this variable when enrolling in experiments.
345
- *
346
- * Using a string is deprecated and unsupported in Firefox 124+.
347
- */
348
- setPref?: string | SetPref;
349
- }
350
- export interface SetPref {
351
- branch: PrefBranch;
352
- /**
353
- * The name of the pref to set.
354
- */
355
- pref: string;
356
- }
357
- /**
358
- * Information about a JSON schema.
359
- */
360
- export interface NimbusFeatureSchema {
361
- /**
362
- * The resource:// or chrome:// URI that can be loaded at runtime within Firefox.
363
- *
364
- * Required by Firefox so that Nimbus can import the schema for validation.
365
- */
366
- uri: string;
367
- /**
368
- * The path to the schema file in the source checkout.
369
- *
370
- * Required by Experimenter so that it can find schema files in source checkouts.
371
- */
372
- path: string;
373
- }
374
- /**
375
- * The Firefox Desktop-specific feature manifest.
376
- *
377
- * Firefox Desktop requires different fields for its features compared to the general
378
- * Nimbus feature manifest.
379
- */
380
- export interface DesktopFeatureManifest {
381
- [k: string]: DesktopFeature;
382
- }
383
254
  /**
384
255
  * A Nimbus experiment for Firefox Desktop.
385
256
  *
@@ -396,52 +267,40 @@ export interface DesktopNimbusExperiment {
396
267
  */
397
268
  slug: string;
398
269
  /**
399
- * Unique identifier for the experiiment.
400
- *
401
- * 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.
402
271
  */
403
272
  id: string;
404
273
  /**
405
- * A slug identifying the targeted product of this experiment.
406
- *
407
- * 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".
408
275
  */
409
276
  appName: string;
410
277
  /**
411
- * The platform identifier for the targeted app.
412
- *
413
- * 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).
414
- *
415
- * 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".
416
279
  */
417
280
  appId: string;
418
281
  /**
419
- * A specific channel of an application such as "nightly", "beta", or "release".
282
+ * A specific channel of an application such as 'nightly', 'beta', or 'release'.
420
283
  */
421
284
  channel: string;
422
285
  /**
423
- * Public name of the experiment that will be displayed on "about:studies".
286
+ * Public name of the experiment displayed on 'about:studies'.
424
287
  */
425
288
  userFacingName: string;
426
289
  /**
427
- * Short public description of the experiment that will be displayed on "about:studies".
290
+ * Short public description of the experiment. that will be displayed on "about:studies".
428
291
  */
429
292
  userFacingDescription: string;
430
293
  /**
431
- * When this property is set to true, the SDK should not enroll new users into the experiment that have not already been enrolled.
294
+ * When this property is set to true, the SDK should not enroll new users into the experiment that have not already been enrolled.
432
295
  */
433
296
  isEnrollmentPaused: boolean;
434
297
  /**
435
- * When this property is set to true, treat this experiment as a rollout.
436
- *
437
- * Rollouts are currently handled as single-branch experiments separated from the bucketing namespace for normal experiments.
438
- *
439
- * 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
440
299
  */
441
300
  isRollout?: boolean;
442
301
  bucketConfig: ExperimentBucketConfig;
443
302
  /**
444
- * A list of outcomes relevant to the experiment analysis.
303
+ * List of outcomes relevant to analysis.
445
304
  */
446
305
  outcomes?: ExperimentOutcome[];
447
306
  /**
@@ -453,49 +312,35 @@ export interface DesktopNimbusExperiment {
453
312
  */
454
313
  targeting?: string | null;
455
314
  /**
456
- * Actual publish date of the experiment.
457
- *
458
- * 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.
459
316
  */
460
317
  startDate: string | null;
461
318
  /**
462
- * Actual enrollment end date of the experiment.
463
- *
464
- * 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.
465
320
  */
466
321
  enrollmentEndDate?: string | null;
467
322
  /**
468
- * Actual end date of this experiment.
469
- *
470
- * 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.
471
324
  */
472
325
  endDate: string | null;
473
326
  /**
474
- * Duration of the experiment from the start date in days.
475
- *
476
- * 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).
477
328
  */
478
329
  proposedDuration?: number;
479
330
  /**
480
- * This represents the number of days that we expect to enroll new users.
481
- *
482
- * 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).
483
332
  */
484
333
  proposedEnrollment: number;
485
334
  /**
486
- * The slug of the reference branch (i.e., the branch we consider "control").
335
+ * The slug of the reference branch (i.e., the branch we consider "control").
487
336
  */
488
337
  referenceBranch: string | null;
489
338
  /**
490
- * The list of locale codes (e.g., "en-US" or "fr") that this experiment is targeting.
491
- *
492
- * 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.
493
340
  */
494
341
  locales?: string[] | null;
495
342
  /**
496
- * The date that this experiment was first published to Remote Settings.
497
- *
498
- * 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.
499
344
  */
500
345
  publishedDate?: string | null;
501
346
  /**
@@ -503,7 +348,7 @@ export interface DesktopNimbusExperiment {
503
348
  */
504
349
  branches: DesktopExperimentBranch[];
505
350
  /**
506
- * When this property is set to true, treat this experiment as aFirefox Labs experiment
351
+ * When this property is set to true, treat this experiment as a Firefox Labs experiment
507
352
  */
508
353
  isFirefoxLabsOptIn?: boolean;
509
354
  /**
@@ -519,7 +364,7 @@ export interface DesktopNimbusExperiment {
519
364
  */
520
365
  firefoxLabsDescription?: string | null;
521
366
  /**
522
- * Links that will be used with the firefoxLabsDescription Fluent ID. May be null for Firefox Labs Opt-In recipes that do not use links.
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.
523
368
  */
524
369
  firefoxLabsDescriptionLinks?: {
525
370
  [k: string]: string;
@@ -530,8 +375,6 @@ export interface DesktopNimbusExperiment {
530
375
  featureValidationOptOut?: boolean;
531
376
  /**
532
377
  * Does the experiment require a restart to take effect?
533
- *
534
- * Only used by Firefox Labs Opt-Ins.
535
378
  */
536
379
  requiresRestart?: boolean;
537
380
  localizations?: ExperimentLocalizations | null;
@@ -546,8 +389,7 @@ export interface DesktopExperimentBranch {
546
389
  slug: string;
547
390
  /**
548
391
  * Relative ratio of population for the branch.
549
- *
550
- * 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.
551
393
  */
552
394
  ratio: number;
553
395
  /**
@@ -560,15 +402,123 @@ export interface DesktopExperimentBranch {
560
402
  firefoxLabsTitle?: string | null;
561
403
  }
562
404
  /**
563
- * The SDK-specific feature manifest.
405
+ * A Nimbus experiment for Nimbus SDK-based applications.
564
406
  */
565
- export interface SdkFeatureManifest {
566
- [k: string]: SdkFeature;
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[];
567
517
  }
568
518
  /**
569
519
  * A feature.
570
520
  */
571
- export interface SdkFeature {
521
+ export interface DesktopFeature {
572
522
  /**
573
523
  * The description of the feature.
574
524
  */
@@ -583,59 +533,143 @@ export interface SdkFeature {
583
533
  * Only required if hasExposure is true.
584
534
  */
585
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[];
586
550
  /**
587
551
  * The variables that this feature can set.
588
552
  */
589
553
  variables: {
590
- [k: string]: SdkFeatureVariable;
554
+ [k: string]: DesktopFeatureVariable;
591
555
  };
556
+ schema?: NimbusFeatureSchema;
557
+ /**
558
+ * If true, clients can enroll in multiple experiments and rollouts that use this feature.
559
+ */
560
+ allowCoenrollment?: boolean;
592
561
  }
593
562
  /**
594
563
  * A feature variable.
595
564
  */
596
- export interface SdkFeatureVariable {
565
+ export interface DesktopFeatureVariable {
597
566
  /**
598
567
  * A description of the feature.
599
568
  */
600
569
  description: string;
601
570
  type: FeatureVariableType;
602
571
  /**
603
- * An optional list of possible string values.
572
+ * An optional list of possible string or integer values.
604
573
  *
605
- * 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.
606
577
  */
607
- 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;
608
596
  }
609
597
  /**
610
- * A Nimbus experiment for Nimbus SDK-based applications.
598
+ * Information about a JSON schema.
611
599
  */
612
- export interface SdkNimbusExperiment {
600
+ export interface NimbusFeatureSchema {
613
601
  /**
614
- * Branch configuration for the experiment.
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.
615
605
  */
616
- branches: SdkExperimentBranch[];
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;
617
613
  }
618
614
  /**
619
- * The branch definition for SDK-based applications
615
+ * The Firefox Desktop-specific feature manifest.
620
616
  *
621
- * Supported on Firefox for Android 96+ and Firefox for iOS 39+ and all versions of
622
- * Cirrus.
617
+ * Firefox Desktop requires different fields for its features compared to the general
618
+ * Nimbus feature manifest.
623
619
  */
624
- export interface SdkExperimentBranch {
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 {
625
633
  /**
626
- * Identifier for the branch.
634
+ * The description of the feature.
627
635
  */
628
- slug: string;
636
+ description: string;
629
637
  /**
630
- * Relative ratio of population for the branch.
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.
631
643
  *
632
- * e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.
644
+ * Only required if hasExposure is true.
633
645
  */
634
- ratio: number;
646
+ exposureDescription?: string;
635
647
  /**
636
- * An array of feature configurations.
648
+ * The variables that this feature can set.
637
649
  */
638
- features: ExperimentFeatureConfig[];
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[];
639
673
  }
640
674
  export interface AnalysisError {
641
675
  analysis_basis?: AnalysisBasis | null;