@mozilla/nimbus-schemas 3000.0.0 → 3002.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.
@@ -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 experiment. 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
- "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\".",
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 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": "List of outcomes relevant to 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)"
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)"
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 aFirefox 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": [
@@ -140,43 +140,46 @@
140
140
  "type": "null"
141
141
  }
142
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."
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
144
  },
145
- "publishedDate": {
145
+ "localizations": {
146
146
  "anyOf": [
147
147
  {
148
- "format": "date-time",
149
- "type": "string"
148
+ "$ref": "#/$defs/ExperimentLocalizations"
150
149
  },
151
150
  {
152
151
  "type": "null"
153
152
  }
154
- ],
155
- "description": "The date that this experiment was first published to Remote Settings. If null, it has not yet been published."
153
+ ]
156
154
  },
157
- "branches": {
158
- "description": "Branch configuration for the experiment.",
155
+ "outcomes": {
156
+ "description": "A list of outcomes relevant to the experiment analysis.",
159
157
  "items": {
160
- "$ref": "#/$defs/DesktopAllVersionsExperimentBranch"
158
+ "$ref": "#/$defs/ExperimentOutcome"
161
159
  },
162
160
  "type": "array"
163
161
  },
164
- "isFirefoxLabsOptIn": {
165
- "description": "When this property is set to true, treat this experiment as a Firefox Labs experiment",
166
- "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"
167
165
  },
168
- "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": {
169
171
  "anyOf": [
170
172
  {
173
+ "format": "date-time",
171
174
  "type": "string"
172
175
  },
173
176
  {
174
177
  "type": "null"
175
178
  }
176
179
  ],
177
- "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."
178
181
  },
179
- "firefoxLabsTitle": {
182
+ "referenceBranch": {
180
183
  "anyOf": [
181
184
  {
182
185
  "type": "string"
@@ -185,53 +188,50 @@
185
188
  "type": "null"
186
189
  }
187
190
  ],
188
- "description": "The title shown in Firefox Labs (Fluent ID)"
191
+ "description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
189
192
  },
190
- "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": {
191
206
  "anyOf": [
192
207
  {
208
+ "format": "date",
193
209
  "type": "string"
194
210
  },
195
211
  {
196
212
  "type": "null"
197
213
  }
198
214
  ],
199
- "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."
200
216
  },
201
- "firefoxLabsDescriptionLinks": {
217
+ "targeting": {
202
218
  "anyOf": [
203
219
  {
204
- "additionalProperties": {
205
- "format": "uri",
206
- "maxLength": 2083,
207
- "minLength": 1,
208
- "type": "string"
209
- },
210
- "type": "object"
220
+ "type": "string"
211
221
  },
212
222
  {
213
223
  "type": "null"
214
224
  }
215
225
  ],
216
- "description": "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."
217
- },
218
- "featureValidationOptOut": {
219
- "description": "Opt out of feature schema validation.",
220
- "type": "boolean"
226
+ "description": "A JEXL targeting expression used to filter out experiments."
221
227
  },
222
- "requiresRestart": {
223
- "description": "Does the experiment require a restart to take effect?",
224
- "type": "boolean"
228
+ "userFacingDescription": {
229
+ "description": "Short public description of the experiment that will be displayed on \"about:studies\".",
230
+ "type": "string"
225
231
  },
226
- "localizations": {
227
- "anyOf": [
228
- {
229
- "$ref": "#/$defs/ExperimentLocalizations"
230
- },
231
- {
232
- "type": "null"
233
- }
234
- ]
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": [
@@ -245,6 +245,7 @@
245
245
  "userFacingDescription",
246
246
  "isEnrollmentPaused",
247
247
  "bucketConfig",
248
+ "featureIds",
248
249
  "startDate",
249
250
  "endDate",
250
251
  "proposedEnrollment",
@@ -295,13 +296,9 @@
295
296
  "DesktopAllVersionsExperimentBranch": {
296
297
  "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.",
297
298
  "properties": {
298
- "slug": {
299
- "description": "Identifier for the branch.",
300
- "type": "string"
301
- },
302
- "ratio": {
303
- "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.",
304
- "type": "integer"
299
+ "feature": {
300
+ "$ref": "#/$defs/DesktopPre95FeatureConfig",
301
+ "description": "The feature key must be provided with values to prevent crashes if the experiment is encountered by Desktop clients earlier than version 95."
305
302
  },
306
303
  "features": {
307
304
  "description": "An array of feature configurations.",
@@ -321,9 +318,13 @@
321
318
  ],
322
319
  "description": "The branch title shown in Firefox Labs (Fluent ID)"
323
320
  },
324
- "feature": {
325
- "$ref": "#/$defs/DesktopPre95FeatureConfig",
326
- "description": "The feature key must be provided with values to prevent crashes if the experiment is encountered by Desktop clients earlier than version 95."
321
+ "ratio": {
322
+ "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.",
323
+ "type": "integer"
324
+ },
325
+ "slug": {
326
+ "description": "Identifier for the branch.",
327
+ "type": "string"
327
328
  }
328
329
  },
329
330
  "required": [
@@ -336,16 +337,17 @@
336
337
  },
337
338
  "DesktopPre95FeatureConfig": {
338
339
  "properties": {
340
+ "enabled": {
341
+ "const": false,
342
+ "type": "boolean"
343
+ },
339
344
  "featureId": {
340
345
  "const": "this-is-included-for-desktop-pre-95-support",
341
346
  "type": "string"
342
347
  },
343
348
  "value": {
349
+ "additionalProperties": true,
344
350
  "type": "object"
345
- },
346
- "enabled": {
347
- "const": false,
348
- "type": "boolean"
349
351
  }
350
352
  },
351
353
  "required": [
@@ -356,25 +358,24 @@
356
358
  "type": "object"
357
359
  },
358
360
  "ExperimentBucketConfig": {
359
- "description": "Common Bucketing Configuration used across all versions.",
360
361
  "properties": {
361
- "randomizationUnit": {
362
- "$ref": "#/$defs/RandomizationUnit"
362
+ "count": {
363
+ "description": "Number of buckets in the range.",
364
+ "type": "integer"
363
365
  },
364
366
  "namespace": {
365
367
  "description": "Additional inputs to the hashing function.",
366
368
  "type": "string"
367
369
  },
370
+ "randomizationUnit": {
371
+ "$ref": "#/$defs/RandomizationUnit"
372
+ },
368
373
  "start": {
369
374
  "description": "Index of the starting bucket of the range.",
370
375
  "type": "integer"
371
376
  },
372
- "count": {
373
- "description": "Number of buckets in the range.",
374
- "type": "integer"
375
- },
376
377
  "total": {
377
- "description": "The total number of buckets. You can assume this will always be 10000.",
378
+ "description": "The total number of buckets. You can assume this will always be 10000.",
378
379
  "type": "integer"
379
380
  }
380
381
  },
@@ -394,6 +395,7 @@
394
395
  "type": "string"
395
396
  },
396
397
  "value": {
398
+ "additionalProperties": true,
397
399
  "description": "The values that define the feature configuration. This should be validated against a schema.",
398
400
  "type": "object"
399
401
  }
@@ -416,13 +418,13 @@
416
418
  },
417
419
  "ExperimentOutcome": {
418
420
  "properties": {
419
- "slug": {
420
- "description": "Identifier for the outcome.",
421
- "type": "string"
422
- },
423
421
  "priority": {
424
422
  "description": "e.g., \"primary\" or \"secondary\".",
425
423
  "type": "string"
424
+ },
425
+ "slug": {
426
+ "description": "Identifier for the outcome.",
427
+ "type": "string"
426
428
  }
427
429
  },
428
430
  "required": [
@@ -4,33 +4,41 @@
4
4
  "description": "A feature.",
5
5
  "type": "object",
6
6
  "properties": {
7
+ "allowCoenrollment": {
8
+ "description": "If true, clients can enroll in multiple experiments and rollouts that use this feature.",
9
+ "type": "boolean"
10
+ },
11
+ "applications": {
12
+ "description": "The applications that can enroll in experiments for this feature. Defaults to \"firefox-desktop\".",
13
+ "items": {
14
+ "$ref": "#/$defs/DesktopApplication"
15
+ },
16
+ "minLength": 1,
17
+ "type": "array"
18
+ },
7
19
  "description": {
8
20
  "description": "The description of the feature.",
9
21
  "type": "string"
10
22
  },
11
- "hasExposure": {
12
- "description": "Whether or not this feature records exposure telemetry.",
13
- "type": "boolean"
14
- },
15
23
  "exposureDescription": {
16
24
  "description": "A description of the exposure telemetry collected by this feature. Only required if hasExposure is true.",
17
25
  "type": "string"
18
26
  },
19
- "owner": {
20
- "description": "The owner of the feature.",
21
- "type": "string"
27
+ "hasExposure": {
28
+ "description": "Whether or not this feature records exposure telemetry.",
29
+ "type": "boolean"
22
30
  },
23
31
  "isEarlyStartup": {
24
32
  "description": "If true, the feature values will be cached in prefs so that they can be read before Nimbus is initialized during Firefox startup.",
25
33
  "type": "boolean"
26
34
  },
27
- "applications": {
28
- "description": "The applications that can enroll in experiments for this feature. Defaults to \"firefox-desktop\".",
29
- "items": {
30
- "$ref": "#/$defs/DesktopApplication"
31
- },
32
- "minLength": 1,
33
- "type": "array"
35
+ "owner": {
36
+ "description": "The owner of the feature.",
37
+ "type": "string"
38
+ },
39
+ "schema": {
40
+ "$ref": "#/$defs/NimbusFeatureSchema",
41
+ "description": "An optional JSON schema that describes the feature variables."
34
42
  },
35
43
  "variables": {
36
44
  "additionalProperties": {
@@ -38,14 +46,6 @@
38
46
  },
39
47
  "description": "The variables that this feature can set.",
40
48
  "type": "object"
41
- },
42
- "schema": {
43
- "$ref": "#/$defs/NimbusFeatureSchema",
44
- "description": "An optional JSON schema that describes the feature variables."
45
- },
46
- "allowCoenrollment": {
47
- "description": "If true, clients can enroll in multiple experiments and rollouts that use this feature.",
48
- "type": "boolean"
49
49
  }
50
50
  },
51
51
  "required": [
@@ -171,10 +171,6 @@
171
171
  "description": "A description of the feature.",
172
172
  "type": "string"
173
173
  },
174
- "type": {
175
- "$ref": "#/$defs/FeatureVariableType",
176
- "description": "The field type."
177
- },
178
174
  "enum": {
179
175
  "anyOf": [
180
176
  {
@@ -206,6 +202,10 @@
206
202
  }
207
203
  ],
208
204
  "description": "A pref that should be set to the value of this variable when enrolling in experiments. Using a string is deprecated and unsupported in Firefox 124+."
205
+ },
206
+ "type": {
207
+ "$ref": "#/$defs/FeatureVariableType",
208
+ "description": "The field type."
209
209
  }
210
210
  },
211
211
  "required": [
@@ -226,13 +226,13 @@
226
226
  "NimbusFeatureSchema": {
227
227
  "description": "Information about a JSON schema.",
228
228
  "properties": {
229
- "uri": {
230
- "description": "The resource:// or chrome:// URI that can be loaded at runtime within Firefox. Required by Firefox so that Nimbus can import the schema for validation.",
231
- "type": "string"
232
- },
233
229
  "path": {
234
230
  "description": "The path to the schema file in the source checkout. Required by Experimenter so that it can find schema files in source checkouts.",
235
231
  "type": "string"
232
+ },
233
+ "uri": {
234
+ "description": "The resource:// or chrome:// URI that can be loaded at runtime within Firefox. Required by Firefox so that Nimbus can import the schema for validation.",
235
+ "type": "string"
236
236
  }
237
237
  },
238
238
  "required": [