@mozilla/nimbus-schemas 3001.0.0 → 3003.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
@@ -153,23 +153,15 @@ export interface DesktopAllVersionsNimbusExperiment {
153
153
  */
154
154
  publishedDate?: string | null;
155
155
  /**
156
- * Branch configuration for the experiment.
157
- */
158
- branches: DesktopAllVersionsExperimentBranch[];
159
- /**
160
- * When this property is set to true, treat this experiment as aFirefox Labs experiment
156
+ * When this property is set to true, treat this experiment as a Firefox Labs experiment
161
157
  */
162
158
  isFirefoxLabsOptIn?: boolean;
163
159
  /**
164
- * The group this should appear under in Firefox Labs
165
- */
166
- firefoxLabsGroup?: string | null;
167
- /**
168
- * The title shown in Firefox Labs (Fluent ID)
160
+ * The title shown in Firefox Labs (Fluent ID or Resource ID)
169
161
  */
170
162
  firefoxLabsTitle?: string | null;
171
163
  /**
172
- * The description shown in Firefox Labs (Fluent ID)
164
+ * The description shown in Firefox Labs (Fluent ID or Resource ID)
173
165
  */
174
166
  firefoxLabsDescription?: string | null;
175
167
  /**
@@ -178,16 +170,24 @@ export interface DesktopAllVersionsNimbusExperiment {
178
170
  firefoxLabsDescriptionLinks?: {
179
171
  [k: string]: string;
180
172
  } | null;
181
- /**
182
- * Opt out of feature schema validation.
183
- */
184
- featureValidationOptOut?: boolean;
185
173
  /**
186
174
  * Does the experiment require a restart to take effect?
187
175
  *
188
176
  * Only used by Firefox Labs Opt-Ins.
189
177
  */
190
178
  requiresRestart?: boolean;
179
+ /**
180
+ * Branch configuration for the experiment.
181
+ */
182
+ branches: DesktopAllVersionsExperimentBranch[];
183
+ /**
184
+ * Opt out of feature schema validation.
185
+ */
186
+ featureValidationOptOut?: boolean;
187
+ /**
188
+ * The group this should appear under in Firefox Labs
189
+ */
190
+ firefoxLabsGroup?: string | null;
191
191
  }
192
192
  export interface ExperimentBucketConfig {
193
193
  randomizationUnit: RandomizationUnit;
@@ -399,23 +399,15 @@ export interface DesktopNimbusExperiment {
399
399
  */
400
400
  publishedDate?: string | null;
401
401
  /**
402
- * Branch configuration for the experiment.
403
- */
404
- branches: DesktopExperimentBranch[];
405
- /**
406
- * When this property is set to true, treat this experiment as aFirefox Labs experiment
402
+ * When this property is set to true, treat this experiment as a Firefox Labs experiment
407
403
  */
408
404
  isFirefoxLabsOptIn?: boolean;
409
405
  /**
410
- * The group this should appear under in Firefox Labs
411
- */
412
- firefoxLabsGroup?: string | null;
413
- /**
414
- * The title shown in Firefox Labs (Fluent ID)
406
+ * The title shown in Firefox Labs (Fluent ID or Resource ID)
415
407
  */
416
408
  firefoxLabsTitle?: string | null;
417
409
  /**
418
- * The description shown in Firefox Labs (Fluent ID)
410
+ * The description shown in Firefox Labs (Fluent ID or Resource ID)
419
411
  */
420
412
  firefoxLabsDescription?: string | null;
421
413
  /**
@@ -424,16 +416,24 @@ export interface DesktopNimbusExperiment {
424
416
  firefoxLabsDescriptionLinks?: {
425
417
  [k: string]: string;
426
418
  } | null;
427
- /**
428
- * Opt out of feature schema validation.
429
- */
430
- featureValidationOptOut?: boolean;
431
419
  /**
432
420
  * Does the experiment require a restart to take effect?
433
421
  *
434
422
  * Only used by Firefox Labs Opt-Ins.
435
423
  */
436
424
  requiresRestart?: boolean;
425
+ /**
426
+ * Branch configuration for the experiment.
427
+ */
428
+ branches: DesktopExperimentBranch[];
429
+ /**
430
+ * Opt out of feature schema validation.
431
+ */
432
+ featureValidationOptOut?: boolean;
433
+ /**
434
+ * The group this should appear under in Firefox Labs
435
+ */
436
+ firefoxLabsGroup?: string | null;
437
437
  }
438
438
  /**
439
439
  * The branch definition supported on Firefox Desktop 95+.
@@ -577,6 +577,30 @@ export interface SdkNimbusExperiment {
577
577
  * If null, it has not yet been published.
578
578
  */
579
579
  publishedDate?: string | null;
580
+ /**
581
+ * When this property is set to true, treat this experiment as a Firefox Labs experiment
582
+ */
583
+ isFirefoxLabsOptIn?: boolean;
584
+ /**
585
+ * The title shown in Firefox Labs (Fluent ID or Resource ID)
586
+ */
587
+ firefoxLabsTitle?: string | null;
588
+ /**
589
+ * The description shown in Firefox Labs (Fluent ID or Resource ID)
590
+ */
591
+ firefoxLabsDescription?: string | null;
592
+ /**
593
+ * Links that will be used with the firefoxLabsDescription Fluent ID. May be null for Firefox Labs Opt-In recipes that do not use links.
594
+ */
595
+ firefoxLabsDescriptionLinks?: {
596
+ [k: string]: string;
597
+ } | null;
598
+ /**
599
+ * Does the experiment require a restart to take effect?
600
+ *
601
+ * Only used by Firefox Labs Opt-Ins.
602
+ */
603
+ requiresRestart?: boolean;
580
604
  /**
581
605
  * Branch configuration for the SDK experiment.
582
606
  */
@@ -758,6 +782,14 @@ export interface SdkFeatureVariable {
758
782
  * Only allowed when type is string.
759
783
  */
760
784
  enum?: string[];
785
+ setPref?: SetPref1;
786
+ }
787
+ export interface SetPref1 {
788
+ branch: PrefBranch;
789
+ /**
790
+ * The name of the pref to set.
791
+ */
792
+ pref: string;
761
793
  }
762
794
  export interface AnalysisError {
763
795
  analysis_basis?: AnalysisBasis | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mozilla/nimbus-schemas",
3
- "version": "3001.0.0",
3
+ "version": "3003.0.0",
4
4
  "description": "Schemas used by Mozilla Nimbus and related projects.",
5
5
  "main": "index.d.ts",
6
6
  "repository": {
@@ -4,76 +4,42 @@
4
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
5
  "type": "object",
6
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
7
  "appId": {
24
8
  "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
9
  "type": "string"
26
10
  },
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\".",
11
+ "appName": {
12
+ "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\".",
37
13
  "type": "string"
38
14
  },
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"
15
+ "branches": {
16
+ "description": "Branch configuration for the experiment.",
17
+ "items": {
18
+ "$ref": "#/$defs/DesktopAllVersionsExperimentBranch"
19
+ },
20
+ "type": "array"
46
21
  },
47
22
  "bucketConfig": {
48
23
  "$ref": "#/$defs/ExperimentBucketConfig",
49
24
  "description": "Bucketing configuration."
50
25
  },
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"
26
+ "channel": {
27
+ "description": "A specific channel of an application such as \"nightly\", \"beta\", or \"release\".",
28
+ "type": "string"
64
29
  },
65
- "targeting": {
30
+ "endDate": {
66
31
  "anyOf": [
67
32
  {
33
+ "format": "date",
68
34
  "type": "string"
69
35
  },
70
36
  {
71
37
  "type": "null"
72
38
  }
73
39
  ],
74
- "description": "A JEXL targeting expression used to filter out experiments."
40
+ "description": "Actual end date of this experiment. Note that this field is expected to be null in Remote Settings."
75
41
  },
76
- "startDate": {
42
+ "enrollmentEndDate": {
77
43
  "anyOf": [
78
44
  {
79
45
  "format": "date",
@@ -83,41 +49,59 @@
83
49
  "type": "null"
84
50
  }
85
51
  ],
86
- "description": "Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings."
52
+ "description": "Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings."
87
53
  },
88
- "enrollmentEndDate": {
54
+ "featureIds": {
55
+ "description": "A list of featureIds the experiment contains configurations for.",
56
+ "items": {
57
+ "type": "string"
58
+ },
59
+ "type": "array"
60
+ },
61
+ "featureValidationOptOut": {
62
+ "description": "Opt out of feature schema validation.",
63
+ "type": "boolean"
64
+ },
65
+ "firefoxLabsDescription": {
89
66
  "anyOf": [
90
67
  {
91
- "format": "date",
92
68
  "type": "string"
93
69
  },
94
70
  {
95
71
  "type": "null"
96
72
  }
97
73
  ],
98
- "description": "Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings."
74
+ "description": "The description shown in Firefox Labs (Fluent ID or Resource ID)"
99
75
  },
100
- "endDate": {
76
+ "firefoxLabsDescriptionLinks": {
101
77
  "anyOf": [
102
78
  {
103
- "format": "date",
104
- "type": "string"
79
+ "additionalProperties": {
80
+ "format": "uri",
81
+ "maxLength": 2083,
82
+ "minLength": 1,
83
+ "type": "string"
84
+ },
85
+ "type": "object"
105
86
  },
106
87
  {
107
88
  "type": "null"
108
89
  }
109
90
  ],
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"
91
+ "description": "Links that will be used with the firefoxLabsDescription Fluent ID. May be null for Firefox Labs Opt-In recipes that do not use links."
115
92
  },
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"
93
+ "firefoxLabsGroup": {
94
+ "anyOf": [
95
+ {
96
+ "type": "string"
97
+ },
98
+ {
99
+ "type": "null"
100
+ }
101
+ ],
102
+ "description": "The group this should appear under in Firefox Labs"
119
103
  },
120
- "referenceBranch": {
104
+ "firefoxLabsTitle": {
121
105
  "anyOf": [
122
106
  {
123
107
  "type": "string"
@@ -126,7 +110,23 @@
126
110
  "type": "null"
127
111
  }
128
112
  ],
129
- "description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
113
+ "description": "The title shown in Firefox Labs (Fluent ID or Resource ID)"
114
+ },
115
+ "id": {
116
+ "description": "Unique identifier for the experiiment. This is a duplicate of slug, but is required field for all Remote Settings records.",
117
+ "type": "string"
118
+ },
119
+ "isEnrollmentPaused": {
120
+ "description": "When this property is set to true, the SDK should not enroll new users into the experiment that have not already been enrolled.",
121
+ "type": "boolean"
122
+ },
123
+ "isFirefoxLabsOptIn": {
124
+ "description": "When this property is set to true, treat this experiment as a Firefox Labs experiment",
125
+ "type": "boolean"
126
+ },
127
+ "isRollout": {
128
+ "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",
129
+ "type": "boolean"
130
130
  },
131
131
  "locales": {
132
132
  "anyOf": [
@@ -152,41 +152,34 @@
152
152
  }
153
153
  ]
154
154
  },
155
- "publishedDate": {
156
- "anyOf": [
157
- {
158
- "format": "date-time",
159
- "type": "string"
160
- },
161
- {
162
- "type": "null"
163
- }
164
- ],
165
- "description": "The date that this experiment was first published to Remote Settings. If null, it has not yet been published."
166
- },
167
- "branches": {
168
- "description": "Branch configuration for the experiment.",
155
+ "outcomes": {
156
+ "description": "A list of outcomes relevant to the experiment analysis.",
169
157
  "items": {
170
- "$ref": "#/$defs/DesktopAllVersionsExperimentBranch"
158
+ "$ref": "#/$defs/ExperimentOutcome"
171
159
  },
172
160
  "type": "array"
173
161
  },
174
- "isFirefoxLabsOptIn": {
175
- "description": "When this property is set to true, treat this experiment as aFirefox Labs experiment",
176
- "type": "boolean"
162
+ "proposedDuration": {
163
+ "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).",
164
+ "type": "integer"
177
165
  },
178
- "firefoxLabsGroup": {
166
+ "proposedEnrollment": {
167
+ "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).",
168
+ "type": "integer"
169
+ },
170
+ "publishedDate": {
179
171
  "anyOf": [
180
172
  {
173
+ "format": "date-time",
181
174
  "type": "string"
182
175
  },
183
176
  {
184
177
  "type": "null"
185
178
  }
186
179
  ],
187
- "description": "The group this should appear under in Firefox Labs"
180
+ "description": "The date that this experiment was first published to Remote Settings. If null, it has not yet been published."
188
181
  },
189
- "firefoxLabsTitle": {
182
+ "referenceBranch": {
190
183
  "anyOf": [
191
184
  {
192
185
  "type": "string"
@@ -195,43 +188,50 @@
195
188
  "type": "null"
196
189
  }
197
190
  ],
198
- "description": "The title shown in Firefox Labs (Fluent ID)"
191
+ "description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
199
192
  },
200
- "firefoxLabsDescription": {
193
+ "requiresRestart": {
194
+ "description": "Does the experiment require a restart to take effect? Only used by Firefox Labs Opt-Ins.",
195
+ "type": "boolean"
196
+ },
197
+ "schemaVersion": {
198
+ "description": "Version of the NimbusExperiment schema this experiment refers to",
199
+ "type": "string"
200
+ },
201
+ "slug": {
202
+ "description": "Unique identifier for the experiment",
203
+ "type": "string"
204
+ },
205
+ "startDate": {
201
206
  "anyOf": [
202
207
  {
208
+ "format": "date",
203
209
  "type": "string"
204
210
  },
205
211
  {
206
212
  "type": "null"
207
213
  }
208
214
  ],
209
- "description": "The description shown in Firefox Labs (Fluent ID)"
215
+ "description": "Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings."
210
216
  },
211
- "firefoxLabsDescriptionLinks": {
217
+ "targeting": {
212
218
  "anyOf": [
213
219
  {
214
- "additionalProperties": {
215
- "format": "uri",
216
- "maxLength": 2083,
217
- "minLength": 1,
218
- "type": "string"
219
- },
220
- "type": "object"
220
+ "type": "string"
221
221
  },
222
222
  {
223
223
  "type": "null"
224
224
  }
225
225
  ],
226
- "description": "Links that will be used with the firefoxLabsDescription Fluent ID. May be null for Firefox Labs Opt-In recipes that do not use links."
226
+ "description": "A JEXL targeting expression used to filter out experiments."
227
227
  },
228
- "featureValidationOptOut": {
229
- "description": "Opt out of feature schema validation.",
230
- "type": "boolean"
228
+ "userFacingDescription": {
229
+ "description": "Short public description of the experiment that will be displayed on \"about:studies\".",
230
+ "type": "string"
231
231
  },
232
- "requiresRestart": {
233
- "description": "Does the experiment require a restart to take effect? Only used by Firefox Labs Opt-Ins.",
234
- "type": "boolean"
232
+ "userFacingName": {
233
+ "description": "Public name of the experiment that will be displayed on \"about:studies\".",
234
+ "type": "string"
235
235
  }
236
236
  },
237
237
  "required": [
@@ -274,7 +274,6 @@
274
274
  },
275
275
  "required": [
276
276
  "firefoxLabsDescription",
277
- "firefoxLabsDescriptionLinks",
278
277
  "firefoxLabsGroup",
279
278
  "firefoxLabsTitle"
280
279
  ],
@@ -296,13 +295,9 @@
296
295
  "DesktopAllVersionsExperimentBranch": {
297
296
  "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.",
298
297
  "properties": {
299
- "slug": {
300
- "description": "Identifier for the branch.",
301
- "type": "string"
302
- },
303
- "ratio": {
304
- "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.",
305
- "type": "integer"
298
+ "feature": {
299
+ "$ref": "#/$defs/DesktopPre95FeatureConfig",
300
+ "description": "The feature key must be provided with values to prevent crashes if the experiment is encountered by Desktop clients earlier than version 95."
306
301
  },
307
302
  "features": {
308
303
  "description": "An array of feature configurations.",
@@ -322,9 +317,13 @@
322
317
  ],
323
318
  "description": "The branch title shown in Firefox Labs (Fluent ID)"
324
319
  },
325
- "feature": {
326
- "$ref": "#/$defs/DesktopPre95FeatureConfig",
327
- "description": "The feature key must be provided with values to prevent crashes if the experiment is encountered by Desktop clients earlier than version 95."
320
+ "ratio": {
321
+ "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.",
322
+ "type": "integer"
323
+ },
324
+ "slug": {
325
+ "description": "Identifier for the branch.",
326
+ "type": "string"
328
327
  }
329
328
  },
330
329
  "required": [
@@ -337,16 +336,17 @@
337
336
  },
338
337
  "DesktopPre95FeatureConfig": {
339
338
  "properties": {
339
+ "enabled": {
340
+ "const": false,
341
+ "type": "boolean"
342
+ },
340
343
  "featureId": {
341
344
  "const": "this-is-included-for-desktop-pre-95-support",
342
345
  "type": "string"
343
346
  },
344
347
  "value": {
348
+ "additionalProperties": true,
345
349
  "type": "object"
346
- },
347
- "enabled": {
348
- "const": false,
349
- "type": "boolean"
350
350
  }
351
351
  },
352
352
  "required": [
@@ -358,21 +358,21 @@
358
358
  },
359
359
  "ExperimentBucketConfig": {
360
360
  "properties": {
361
- "randomizationUnit": {
362
- "$ref": "#/$defs/RandomizationUnit"
361
+ "count": {
362
+ "description": "Number of buckets in the range.",
363
+ "type": "integer"
363
364
  },
364
365
  "namespace": {
365
366
  "description": "Additional inputs to the hashing function.",
366
367
  "type": "string"
367
368
  },
369
+ "randomizationUnit": {
370
+ "$ref": "#/$defs/RandomizationUnit"
371
+ },
368
372
  "start": {
369
373
  "description": "Index of the starting bucket of the range.",
370
374
  "type": "integer"
371
375
  },
372
- "count": {
373
- "description": "Number of buckets in the range.",
374
- "type": "integer"
375
- },
376
376
  "total": {
377
377
  "description": "The total number of buckets. You can assume this will always be 10000.",
378
378
  "type": "integer"
@@ -394,6 +394,7 @@
394
394
  "type": "string"
395
395
  },
396
396
  "value": {
397
+ "additionalProperties": true,
397
398
  "description": "The values that define the feature configuration. This should be validated against a schema.",
398
399
  "type": "object"
399
400
  }
@@ -416,13 +417,13 @@
416
417
  },
417
418
  "ExperimentOutcome": {
418
419
  "properties": {
419
- "slug": {
420
- "description": "Identifier for the outcome.",
421
- "type": "string"
422
- },
423
420
  "priority": {
424
421
  "description": "e.g., \"primary\" or \"secondary\".",
425
422
  "type": "string"
423
+ },
424
+ "slug": {
425
+ "description": "Identifier for the outcome.",
426
+ "type": "string"
426
427
  }
427
428
  },
428
429
  "required": [