@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.
@@ -3,13 +3,13 @@
3
3
  "title": "ExperimentOutcome",
4
4
  "type": "object",
5
5
  "properties": {
6
- "slug": {
7
- "description": "Identifier for the outcome.",
8
- "type": "string"
9
- },
10
6
  "priority": {
11
7
  "description": "e.g., \"primary\" or \"secondary\".",
12
8
  "type": "string"
9
+ },
10
+ "slug": {
11
+ "description": "Identifier for the outcome.",
12
+ "type": "string"
13
13
  }
14
14
  },
15
15
  "required": [
@@ -4,76 +4,49 @@
4
4
  "description": "A Nimbus experiment for V7.",
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/BaseExperimentBranch"
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"
26
+ "channel": {
27
+ "description": "A specific channel of an application such as \"nightly\", \"beta\", or \"release\".",
28
+ "type": "string"
57
29
  },
58
- "featureIds": {
59
- "description": "A list of featureIds the experiment contains configurations for.",
30
+ "documentationLinks": {
31
+ "description": "All documentation links associated with this experiment.",
60
32
  "items": {
61
- "type": "string"
33
+ "$ref": "#/$defs/DocumentationLink"
62
34
  },
63
35
  "type": "array"
64
36
  },
65
- "targeting": {
37
+ "endDate": {
66
38
  "anyOf": [
67
39
  {
40
+ "format": "date",
68
41
  "type": "string"
69
42
  },
70
43
  {
71
44
  "type": "null"
72
45
  }
73
46
  ],
74
- "description": "A JEXL targeting expression used to filter out experiments."
47
+ "description": "Actual end date of this experiment. Note that this field is expected to be null in Remote Settings."
75
48
  },
76
- "startDate": {
49
+ "enrollmentEndDate": {
77
50
  "anyOf": [
78
51
  {
79
52
  "format": "date",
@@ -83,41 +56,44 @@
83
56
  "type": "null"
84
57
  }
85
58
  ],
86
- "description": "Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings."
59
+ "description": "Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings."
87
60
  },
88
- "enrollmentEndDate": {
61
+ "featureIds": {
62
+ "description": "A list of featureIds the experiment contains configurations for.",
63
+ "items": {
64
+ "type": "string"
65
+ },
66
+ "type": "array"
67
+ },
68
+ "firefoxLabsDescription": {
89
69
  "anyOf": [
90
70
  {
91
- "format": "date",
92
71
  "type": "string"
93
72
  },
94
73
  {
95
74
  "type": "null"
96
75
  }
97
76
  ],
98
- "description": "Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings."
77
+ "description": "The description shown in Firefox Labs (Fluent ID or Resource ID)"
99
78
  },
100
- "endDate": {
79
+ "firefoxLabsDescriptionLinks": {
101
80
  "anyOf": [
102
81
  {
103
- "format": "date",
104
- "type": "string"
82
+ "additionalProperties": {
83
+ "format": "uri",
84
+ "maxLength": 2083,
85
+ "minLength": 1,
86
+ "type": "string"
87
+ },
88
+ "type": "object"
105
89
  },
106
90
  {
107
91
  "type": "null"
108
92
  }
109
93
  ],
110
- "description": "Actual end date of this experiment. Note that this field is expected to be null in Remote Settings."
111
- },
112
- "proposedDuration": {
113
- "description": "Duration of the experiment from the start date in days. Note that this property is only used during the analysis phase (i.e., not by the SDK).",
114
- "type": "integer"
115
- },
116
- "proposedEnrollment": {
117
- "description": "This represents the number of days that we expect to enroll new users. Note that this property is only used during the analysis phase (i.e., not by the SDK).",
118
- "type": "integer"
94
+ "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."
119
95
  },
120
- "referenceBranch": {
96
+ "firefoxLabsTitle": {
121
97
  "anyOf": [
122
98
  {
123
99
  "type": "string"
@@ -126,7 +102,23 @@
126
102
  "type": "null"
127
103
  }
128
104
  ],
129
- "description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
105
+ "description": "The title shown in Firefox Labs (Fluent ID or Resource ID)"
106
+ },
107
+ "id": {
108
+ "description": "Unique identifier for the experiiment. This is a duplicate of slug, but is required field for all Remote Settings records.",
109
+ "type": "string"
110
+ },
111
+ "isEnrollmentPaused": {
112
+ "description": "When this property is set to true, the SDK should not enroll new users into the experiment that have not already been enrolled.",
113
+ "type": "boolean"
114
+ },
115
+ "isFirefoxLabsOptIn": {
116
+ "description": "When this property is set to true, treat this experiment as a Firefox Labs experiment",
117
+ "type": "boolean"
118
+ },
119
+ "isRollout": {
120
+ "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",
121
+ "type": "boolean"
130
122
  },
131
123
  "locales": {
132
124
  "anyOf": [
@@ -153,6 +145,21 @@
153
145
  ],
154
146
  "description": "Per-locale localization substitutions."
155
147
  },
148
+ "outcomes": {
149
+ "description": "A list of outcomes relevant to the experiment analysis.",
150
+ "items": {
151
+ "$ref": "#/$defs/ExperimentOutcome"
152
+ },
153
+ "type": "array"
154
+ },
155
+ "proposedDuration": {
156
+ "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).",
157
+ "type": "integer"
158
+ },
159
+ "proposedEnrollment": {
160
+ "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).",
161
+ "type": "integer"
162
+ },
156
163
  "publishedDate": {
157
164
  "anyOf": [
158
165
  {
@@ -165,19 +172,59 @@
165
172
  ],
166
173
  "description": "The date that this experiment was first published to Remote Settings. If null, it has not yet been published."
167
174
  },
168
- "branches": {
169
- "description": "Branch configuration for the experiment.",
170
- "items": {
171
- "$ref": "#/$defs/BaseExperimentBranch"
172
- },
173
- "type": "array"
175
+ "referenceBranch": {
176
+ "anyOf": [
177
+ {
178
+ "type": "string"
179
+ },
180
+ {
181
+ "type": "null"
182
+ }
183
+ ],
184
+ "description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
174
185
  },
175
- "documentationLinks": {
176
- "description": "All documentation links associated with this experiment.",
177
- "items": {
178
- "$ref": "#/$defs/DocumentationLink"
179
- },
180
- "type": "array"
186
+ "requiresRestart": {
187
+ "description": "Does the experiment require a restart to take effect? Only used by Firefox Labs Opt-Ins.",
188
+ "type": "boolean"
189
+ },
190
+ "schemaVersion": {
191
+ "description": "Version of the NimbusExperiment schema this experiment refers to",
192
+ "type": "string"
193
+ },
194
+ "slug": {
195
+ "description": "Unique identifier for the experiment",
196
+ "type": "string"
197
+ },
198
+ "startDate": {
199
+ "anyOf": [
200
+ {
201
+ "format": "date",
202
+ "type": "string"
203
+ },
204
+ {
205
+ "type": "null"
206
+ }
207
+ ],
208
+ "description": "Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings."
209
+ },
210
+ "targeting": {
211
+ "anyOf": [
212
+ {
213
+ "type": "string"
214
+ },
215
+ {
216
+ "type": "null"
217
+ }
218
+ ],
219
+ "description": "A JEXL targeting expression used to filter out experiments."
220
+ },
221
+ "userFacingDescription": {
222
+ "description": "Short public description of the experiment that will be displayed on \"about:studies\".",
223
+ "type": "string"
224
+ },
225
+ "userFacingName": {
226
+ "description": "Public name of the experiment that will be displayed on \"about:studies\".",
227
+ "type": "string"
181
228
  }
182
229
  },
183
230
  "required": [
@@ -199,23 +246,40 @@
199
246
  "branches",
200
247
  "documentationLinks"
201
248
  ],
249
+ "dependentSchemas": {
250
+ "isFirefoxLabsOptIn": {
251
+ "if": {
252
+ "properties": {
253
+ "isFirefoxLabsOptIn": {
254
+ "const": true
255
+ }
256
+ }
257
+ },
258
+ "then": {
259
+ "required": [
260
+ "firefoxLabsDescription",
261
+ "firefoxLabsTitle"
262
+ ]
263
+ }
264
+ }
265
+ },
202
266
  "$defs": {
203
267
  "BaseExperimentBranch": {
204
268
  "properties": {
205
- "slug": {
206
- "description": "Identifier for the branch.",
207
- "type": "string"
208
- },
209
- "ratio": {
210
- "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.",
211
- "type": "integer"
212
- },
213
269
  "features": {
214
270
  "description": "An array of feature configurations.",
215
271
  "items": {
216
272
  "$ref": "#/$defs/ExperimentFeatureConfig"
217
273
  },
218
274
  "type": "array"
275
+ },
276
+ "ratio": {
277
+ "description": "Relative ratio of population for the branch. e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.",
278
+ "type": "integer"
279
+ },
280
+ "slug": {
281
+ "description": "Identifier for the branch.",
282
+ "type": "string"
219
283
  }
220
284
  },
221
285
  "required": [
@@ -227,13 +291,13 @@
227
291
  },
228
292
  "DocumentationLink": {
229
293
  "properties": {
230
- "title": {
231
- "description": "The name associated with the link.",
232
- "type": "string"
233
- },
234
294
  "link": {
235
295
  "description": "The URL associated with the link.",
236
296
  "type": "string"
297
+ },
298
+ "title": {
299
+ "description": "The name associated with the link.",
300
+ "type": "string"
237
301
  }
238
302
  },
239
303
  "required": [
@@ -244,21 +308,21 @@
244
308
  },
245
309
  "ExperimentBucketConfig": {
246
310
  "properties": {
247
- "randomizationUnit": {
248
- "$ref": "#/$defs/RandomizationUnit"
311
+ "count": {
312
+ "description": "Number of buckets in the range.",
313
+ "type": "integer"
249
314
  },
250
315
  "namespace": {
251
316
  "description": "Additional inputs to the hashing function.",
252
317
  "type": "string"
253
318
  },
319
+ "randomizationUnit": {
320
+ "$ref": "#/$defs/RandomizationUnit"
321
+ },
254
322
  "start": {
255
323
  "description": "Index of the starting bucket of the range.",
256
324
  "type": "integer"
257
325
  },
258
- "count": {
259
- "description": "Number of buckets in the range.",
260
- "type": "integer"
261
- },
262
326
  "total": {
263
327
  "description": "The total number of buckets. You can assume this will always be 10000.",
264
328
  "type": "integer"
@@ -280,6 +344,7 @@
280
344
  "type": "string"
281
345
  },
282
346
  "value": {
347
+ "additionalProperties": true,
283
348
  "description": "The values that define the feature configuration. This should be validated against a schema.",
284
349
  "type": "object"
285
350
  }
@@ -302,13 +367,13 @@
302
367
  },
303
368
  "ExperimentOutcome": {
304
369
  "properties": {
305
- "slug": {
306
- "description": "Identifier for the outcome.",
307
- "type": "string"
308
- },
309
370
  "priority": {
310
371
  "description": "e.g., \"primary\" or \"secondary\".",
311
372
  "type": "string"
373
+ },
374
+ "slug": {
375
+ "description": "Identifier for the outcome.",
376
+ "type": "string"
312
377
  }
313
378
  },
314
379
  "required": [
@@ -16,6 +16,13 @@
16
16
  ],
17
17
  "type": "string"
18
18
  },
19
+ "PrefBranch": {
20
+ "enum": [
21
+ "default",
22
+ "user"
23
+ ],
24
+ "type": "string"
25
+ },
19
26
  "SdkFeature": {
20
27
  "description": "A feature.",
21
28
  "if": {
@@ -26,28 +33,28 @@
26
33
  }
27
34
  },
28
35
  "properties": {
36
+ "allow-coenrollment": {
37
+ "description": "If true, clients can enroll in multiple experiments and rollouts that use this feature.",
38
+ "type": "boolean"
39
+ },
29
40
  "description": {
30
41
  "description": "The description of the feature.",
31
42
  "type": "string"
32
43
  },
33
- "hasExposure": {
34
- "description": "Whether or not this feature records exposure telemetry.",
35
- "type": "boolean"
36
- },
37
44
  "exposureDescription": {
38
45
  "description": "A description of the exposure telemetry collected by this feature. Only required if hasExposure is true.",
39
46
  "type": "string"
40
47
  },
48
+ "hasExposure": {
49
+ "description": "Whether or not this feature records exposure telemetry.",
50
+ "type": "boolean"
51
+ },
41
52
  "variables": {
42
53
  "additionalProperties": {
43
54
  "$ref": "#/$defs/SdkFeatureVariable"
44
55
  },
45
56
  "description": "The variables that this feature can set.",
46
57
  "type": "object"
47
- },
48
- "allow-coenrollment": {
49
- "description": "If true, clients can enroll in multiple experiments and rollouts that use this feature.",
50
- "type": "boolean"
51
58
  }
52
59
  },
53
60
  "required": [
@@ -78,16 +85,20 @@
78
85
  "description": "A description of the feature.",
79
86
  "type": "string"
80
87
  },
81
- "type": {
82
- "$ref": "#/$defs/FeatureVariableType",
83
- "description": "The field type."
84
- },
85
88
  "enum": {
86
89
  "description": "An optional list of possible string values. Only allowed when type is string.",
87
90
  "items": {
88
91
  "type": "string"
89
92
  },
90
93
  "type": "array"
94
+ },
95
+ "setPref": {
96
+ "$ref": "#/$defs/SetPref",
97
+ "description": "A pref that should be set to the value of this variable when enrolling. Only supported in Firefox for Android 152+. "
98
+ },
99
+ "type": {
100
+ "$ref": "#/$defs/FeatureVariableType",
101
+ "description": "The field type."
91
102
  }
92
103
  },
93
104
  "required": [
@@ -95,6 +106,23 @@
95
106
  "type"
96
107
  ],
97
108
  "type": "object"
109
+ },
110
+ "SetPref": {
111
+ "properties": {
112
+ "branch": {
113
+ "$ref": "#/$defs/PrefBranch",
114
+ "description": "The branch the pref will be set on. Prefs set on the user branch persists through restarts."
115
+ },
116
+ "pref": {
117
+ "description": "The name of the pref to set.",
118
+ "type": "string"
119
+ }
120
+ },
121
+ "required": [
122
+ "branch",
123
+ "pref"
124
+ ],
125
+ "type": "object"
98
126
  }
99
127
  }
100
128
  }