@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,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 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\".",
25
- "type": "string"
26
- },
27
- "channel": {
28
- "description": "A specific channel of an application such as 'nightly', 'beta', or 'release'.",
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\".",
29
9
  "type": "string"
30
10
  },
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/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": "List of outcomes relevant to 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,94 +56,128 @@
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
+ "id": {
69
+ "description": "Unique identifier for the experiiment. This is a duplicate of slug, but is required field for all Remote Settings records.",
70
+ "type": "string"
71
+ },
72
+ "isEnrollmentPaused": {
73
+ "description": "When this property is set to true, the SDK should not enroll new users into the experiment that have not already been enrolled.",
74
+ "type": "boolean"
75
+ },
76
+ "isRollout": {
77
+ "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",
78
+ "type": "boolean"
79
+ },
80
+ "locales": {
89
81
  "anyOf": [
90
82
  {
91
- "format": "date",
92
- "type": "string"
83
+ "items": {
84
+ "type": "string"
85
+ },
86
+ "type": "array"
93
87
  },
94
88
  {
95
89
  "type": "null"
96
90
  }
97
91
  ],
98
- "description": "Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings."
92
+ "description": "The list of locale codes (e.g., \"en-US\" or \"fr\") that this experiment is targeting. If null, all locales are targeted."
99
93
  },
100
- "endDate": {
94
+ "localizations": {
101
95
  "anyOf": [
102
96
  {
103
- "format": "date",
104
- "type": "string"
97
+ "$ref": "#/$defs/ExperimentLocalizations"
105
98
  },
106
99
  {
107
100
  "type": "null"
108
101
  }
109
102
  ],
110
- "description": "Actual end date of this experiment. Note that this field is expected to be null in Remote Settings."
103
+ "description": "Per-locale localization substitutions."
104
+ },
105
+ "outcomes": {
106
+ "description": "A list of outcomes relevant to the experiment analysis.",
107
+ "items": {
108
+ "$ref": "#/$defs/ExperimentOutcome"
109
+ },
110
+ "type": "array"
111
111
  },
112
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).",
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
114
  "type": "integer"
115
115
  },
116
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).",
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
118
  "type": "integer"
119
119
  },
120
- "referenceBranch": {
120
+ "publishedDate": {
121
121
  "anyOf": [
122
122
  {
123
+ "format": "date-time",
123
124
  "type": "string"
124
125
  },
125
126
  {
126
127
  "type": "null"
127
128
  }
128
129
  ],
129
- "description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
130
+ "description": "The date that this experiment was first published to Remote Settings. If null, it has not yet been published."
130
131
  },
131
- "locales": {
132
+ "referenceBranch": {
132
133
  "anyOf": [
133
134
  {
134
- "items": {
135
- "type": "string"
136
- },
137
- "type": "array"
135
+ "type": "string"
138
136
  },
139
137
  {
140
138
  "type": "null"
141
139
  }
142
140
  ],
143
- "description": "The list of locale codes (e.g., \"en-US\" or \"fr\") that this experiment is targeting. If null, all locales are targeted."
141
+ "description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
144
142
  },
145
- "publishedDate": {
143
+ "schemaVersion": {
144
+ "description": "Version of the NimbusExperiment schema this experiment refers to",
145
+ "type": "string"
146
+ },
147
+ "slug": {
148
+ "description": "Unique identifier for the experiment",
149
+ "type": "string"
150
+ },
151
+ "startDate": {
146
152
  "anyOf": [
147
153
  {
148
- "format": "date-time",
154
+ "format": "date",
149
155
  "type": "string"
150
156
  },
151
157
  {
152
158
  "type": "null"
153
159
  }
154
160
  ],
155
- "description": "The date that this experiment was first published to Remote Settings. If null, it has not yet been published."
161
+ "description": "Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings."
156
162
  },
157
- "localizations": {
163
+ "targeting": {
158
164
  "anyOf": [
159
165
  {
160
- "$ref": "#/$defs/ExperimentLocalizations"
166
+ "type": "string"
161
167
  },
162
168
  {
163
169
  "type": "null"
164
170
  }
165
171
  ],
166
- "description": "Per-locale localization substitutions."
172
+ "description": "A JEXL targeting expression used to filter out experiments."
167
173
  },
168
- "branches": {
169
- "description": "Branch configuration for the experiment.",
170
- "items": {
171
- "$ref": "#/$defs/BaseExperimentBranch"
172
- },
173
- "type": "array"
174
+ "userFacingDescription": {
175
+ "description": "Short public description of the experiment that will be displayed on \"about:studies\".",
176
+ "type": "string"
177
+ },
178
+ "userFacingName": {
179
+ "description": "Public name of the experiment that will be displayed on \"about:studies\".",
180
+ "type": "string"
174
181
  }
175
182
  },
176
183
  "required": [
@@ -184,29 +191,31 @@
184
191
  "userFacingDescription",
185
192
  "isEnrollmentPaused",
186
193
  "bucketConfig",
194
+ "featureIds",
187
195
  "startDate",
188
196
  "endDate",
189
197
  "proposedEnrollment",
190
198
  "referenceBranch",
191
- "branches"
199
+ "branches",
200
+ "documentationLinks"
192
201
  ],
193
202
  "$defs": {
194
203
  "BaseExperimentBranch": {
195
204
  "properties": {
196
- "slug": {
197
- "description": "Identifier for the branch.",
198
- "type": "string"
199
- },
200
- "ratio": {
201
- "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.",
202
- "type": "integer"
203
- },
204
205
  "features": {
205
206
  "description": "An array of feature configurations.",
206
207
  "items": {
207
208
  "$ref": "#/$defs/ExperimentFeatureConfig"
208
209
  },
209
210
  "type": "array"
211
+ },
212
+ "ratio": {
213
+ "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.",
214
+ "type": "integer"
215
+ },
216
+ "slug": {
217
+ "description": "Identifier for the branch.",
218
+ "type": "string"
210
219
  }
211
220
  },
212
221
  "required": [
@@ -216,26 +225,42 @@
216
225
  ],
217
226
  "type": "object"
218
227
  },
228
+ "DocumentationLink": {
229
+ "properties": {
230
+ "link": {
231
+ "description": "The URL associated with the link.",
232
+ "type": "string"
233
+ },
234
+ "title": {
235
+ "description": "The name associated with the link.",
236
+ "type": "string"
237
+ }
238
+ },
239
+ "required": [
240
+ "title",
241
+ "link"
242
+ ],
243
+ "type": "object"
244
+ },
219
245
  "ExperimentBucketConfig": {
220
- "description": "Common Bucketing Configuration used across all versions.",
221
246
  "properties": {
222
- "randomizationUnit": {
223
- "$ref": "#/$defs/RandomizationUnit"
247
+ "count": {
248
+ "description": "Number of buckets in the range.",
249
+ "type": "integer"
224
250
  },
225
251
  "namespace": {
226
252
  "description": "Additional inputs to the hashing function.",
227
253
  "type": "string"
228
254
  },
255
+ "randomizationUnit": {
256
+ "$ref": "#/$defs/RandomizationUnit"
257
+ },
229
258
  "start": {
230
259
  "description": "Index of the starting bucket of the range.",
231
260
  "type": "integer"
232
261
  },
233
- "count": {
234
- "description": "Number of buckets in the range.",
235
- "type": "integer"
236
- },
237
262
  "total": {
238
- "description": "The total number of buckets. You can assume this will always be 10000.",
263
+ "description": "The total number of buckets. You can assume this will always be 10000.",
239
264
  "type": "integer"
240
265
  }
241
266
  },
@@ -255,6 +280,7 @@
255
280
  "type": "string"
256
281
  },
257
282
  "value": {
283
+ "additionalProperties": true,
258
284
  "description": "The values that define the feature configuration. This should be validated against a schema.",
259
285
  "type": "object"
260
286
  }
@@ -277,13 +303,13 @@
277
303
  },
278
304
  "ExperimentOutcome": {
279
305
  "properties": {
280
- "slug": {
281
- "description": "Identifier for the outcome.",
282
- "type": "string"
283
- },
284
306
  "priority": {
285
307
  "description": "e.g., \"primary\" or \"secondary\".",
286
308
  "type": "string"
309
+ },
310
+ "slug": {
311
+ "description": "Identifier for the outcome.",
312
+ "type": "string"
287
313
  }
288
314
  },
289
315
  "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
  }