@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.
@@ -4,56 +4,52 @@
4
4
  "description": "A Nimbus experiment for Nimbus SDK-based applications.",
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.",
7
+ "appId": {
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\".",
17
9
  "type": "string"
18
10
  },
19
11
  "appName": {
20
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\".",
21
13
  "type": "string"
22
14
  },
23
- "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"
15
+ "branches": {
16
+ "description": "Branch configuration for the SDK experiment.",
17
+ "items": {
18
+ "$ref": "#/$defs/SdkExperimentBranch"
19
+ },
20
+ "type": "array"
21
+ },
22
+ "bucketConfig": {
23
+ "$ref": "#/$defs/ExperimentBucketConfig",
24
+ "description": "Bucketing configuration."
26
25
  },
27
26
  "channel": {
28
27
  "description": "A specific channel of an application such as \"nightly\", \"beta\", or \"release\".",
29
28
  "type": "string"
30
29
  },
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\".",
37
- "type": "string"
38
- },
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"
46
- },
47
- "bucketConfig": {
48
- "$ref": "#/$defs/ExperimentBucketConfig",
49
- "description": "Bucketing configuration."
30
+ "endDate": {
31
+ "anyOf": [
32
+ {
33
+ "format": "date",
34
+ "type": "string"
35
+ },
36
+ {
37
+ "type": "null"
38
+ }
39
+ ],
40
+ "description": "Actual end date of this experiment. Note that this field is expected to be null in Remote Settings."
50
41
  },
51
- "outcomes": {
52
- "description": "A list of outcomes relevant to the experiment analysis.",
53
- "items": {
54
- "$ref": "#/$defs/ExperimentOutcome"
55
- },
56
- "type": "array"
42
+ "enrollmentEndDate": {
43
+ "anyOf": [
44
+ {
45
+ "format": "date",
46
+ "type": "string"
47
+ },
48
+ {
49
+ "type": "null"
50
+ }
51
+ ],
52
+ "description": "Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings."
57
53
  },
58
54
  "featureIds": {
59
55
  "description": "A list of featureIds the experiment contains configurations for.",
@@ -62,7 +58,7 @@
62
58
  },
63
59
  "type": "array"
64
60
  },
65
- "targeting": {
61
+ "firefoxLabsDescription": {
66
62
  "anyOf": [
67
63
  {
68
64
  "type": "string"
@@ -71,43 +67,83 @@
71
67
  "type": "null"
72
68
  }
73
69
  ],
74
- "description": "A JEXL targeting expression used to filter out experiments."
70
+ "description": "The description shown in Firefox Labs (Fluent ID or Resource ID)"
75
71
  },
76
- "startDate": {
72
+ "firefoxLabsDescriptionLinks": {
77
73
  "anyOf": [
78
74
  {
79
- "format": "date",
80
- "type": "string"
75
+ "additionalProperties": {
76
+ "format": "uri",
77
+ "maxLength": 2083,
78
+ "minLength": 1,
79
+ "type": "string"
80
+ },
81
+ "type": "object"
81
82
  },
82
83
  {
83
84
  "type": "null"
84
85
  }
85
86
  ],
86
- "description": "Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings."
87
+ "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."
87
88
  },
88
- "enrollmentEndDate": {
89
+ "firefoxLabsTitle": {
89
90
  "anyOf": [
90
91
  {
91
- "format": "date",
92
92
  "type": "string"
93
93
  },
94
94
  {
95
95
  "type": "null"
96
96
  }
97
97
  ],
98
- "description": "Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings."
98
+ "description": "The title shown in Firefox Labs (Fluent ID or Resource ID)"
99
99
  },
100
- "endDate": {
100
+ "id": {
101
+ "description": "Unique identifier for the experiiment. This is a duplicate of slug, but is required field for all Remote Settings records.",
102
+ "type": "string"
103
+ },
104
+ "isEnrollmentPaused": {
105
+ "description": "When this property is set to true, the SDK should not enroll new users into the experiment that have not already been enrolled.",
106
+ "type": "boolean"
107
+ },
108
+ "isFirefoxLabsOptIn": {
109
+ "description": "When this property is set to true, treat this experiment as a Firefox Labs experiment",
110
+ "type": "boolean"
111
+ },
112
+ "isRollout": {
113
+ "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",
114
+ "type": "boolean"
115
+ },
116
+ "locales": {
101
117
  "anyOf": [
102
118
  {
103
- "format": "date",
104
- "type": "string"
119
+ "items": {
120
+ "type": "string"
121
+ },
122
+ "type": "array"
105
123
  },
106
124
  {
107
125
  "type": "null"
108
126
  }
109
127
  ],
110
- "description": "Actual end date of this experiment. Note that this field is expected to be null in Remote Settings."
128
+ "description": "The list of locale codes (e.g., \"en-US\" or \"fr\") that this experiment is targeting. If null, all locales are targeted."
129
+ },
130
+ "localizations": {
131
+ "anyOf": [
132
+ {
133
+ "$ref": "#/$defs/ExperimentLocalizations"
134
+ },
135
+ {
136
+ "type": "null"
137
+ }
138
+ ],
139
+ "description": "Per-locale localization substitutions."
140
+ },
141
+ "outcomes": {
142
+ "description": "A list of outcomes relevant to the experiment analysis.",
143
+ "items": {
144
+ "$ref": "#/$defs/ExperimentOutcome"
145
+ },
146
+ "type": "array"
111
147
  },
112
148
  "proposedDuration": {
113
149
  "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).",
@@ -117,60 +153,71 @@
117
153
  "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
154
  "type": "integer"
119
155
  },
120
- "referenceBranch": {
156
+ "publishedDate": {
121
157
  "anyOf": [
122
158
  {
159
+ "format": "date-time",
123
160
  "type": "string"
124
161
  },
125
162
  {
126
163
  "type": "null"
127
164
  }
128
165
  ],
129
- "description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
166
+ "description": "The date that this experiment was first published to Remote Settings. If null, it has not yet been published."
130
167
  },
131
- "locales": {
168
+ "referenceBranch": {
132
169
  "anyOf": [
133
170
  {
134
- "items": {
135
- "type": "string"
136
- },
137
- "type": "array"
171
+ "type": "string"
138
172
  },
139
173
  {
140
174
  "type": "null"
141
175
  }
142
176
  ],
143
- "description": "The list of locale codes (e.g., \"en-US\" or \"fr\") that this experiment is targeting. If null, all locales are targeted."
177
+ "description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
144
178
  },
145
- "localizations": {
179
+ "requiresRestart": {
180
+ "description": "Does the experiment require a restart to take effect? Only used by Firefox Labs Opt-Ins.",
181
+ "type": "boolean"
182
+ },
183
+ "schemaVersion": {
184
+ "description": "Version of the NimbusExperiment schema this experiment refers to",
185
+ "type": "string"
186
+ },
187
+ "slug": {
188
+ "description": "Unique identifier for the experiment",
189
+ "type": "string"
190
+ },
191
+ "startDate": {
146
192
  "anyOf": [
147
193
  {
148
- "$ref": "#/$defs/ExperimentLocalizations"
194
+ "format": "date",
195
+ "type": "string"
149
196
  },
150
197
  {
151
198
  "type": "null"
152
199
  }
153
200
  ],
154
- "description": "Per-locale localization substitutions."
201
+ "description": "Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings."
155
202
  },
156
- "publishedDate": {
203
+ "targeting": {
157
204
  "anyOf": [
158
205
  {
159
- "format": "date-time",
160
206
  "type": "string"
161
207
  },
162
208
  {
163
209
  "type": "null"
164
210
  }
165
211
  ],
166
- "description": "The date that this experiment was first published to Remote Settings. If null, it has not yet been published."
212
+ "description": "A JEXL targeting expression used to filter out experiments."
167
213
  },
168
- "branches": {
169
- "description": "Branch configuration for the SDK experiment.",
170
- "items": {
171
- "$ref": "#/$defs/SdkExperimentBranch"
172
- },
173
- "type": "array"
214
+ "userFacingDescription": {
215
+ "description": "Short public description of the experiment that will be displayed on \"about:studies\".",
216
+ "type": "string"
217
+ },
218
+ "userFacingName": {
219
+ "description": "Public name of the experiment that will be displayed on \"about:studies\".",
220
+ "type": "string"
174
221
  }
175
222
  },
176
223
  "required": [
@@ -191,24 +238,48 @@
191
238
  "referenceBranch",
192
239
  "branches"
193
240
  ],
241
+ "dependentSchemas": {
242
+ "isFirefoxLabsOptIn": {
243
+ "if": {
244
+ "properties": {
245
+ "isFirefoxLabsOptIn": {
246
+ "const": true
247
+ }
248
+ }
249
+ },
250
+ "then": {
251
+ "properties": {
252
+ "isRollout": {
253
+ "const": true
254
+ }
255
+ },
256
+ "required": [
257
+ "firefoxLabsDescription",
258
+ "firefoxLabsTitle",
259
+ "isRollout"
260
+ ],
261
+ "type": "object"
262
+ }
263
+ }
264
+ },
194
265
  "$defs": {
195
266
  "ExperimentBucketConfig": {
196
267
  "properties": {
197
- "randomizationUnit": {
198
- "$ref": "#/$defs/RandomizationUnit"
268
+ "count": {
269
+ "description": "Number of buckets in the range.",
270
+ "type": "integer"
199
271
  },
200
272
  "namespace": {
201
273
  "description": "Additional inputs to the hashing function.",
202
274
  "type": "string"
203
275
  },
276
+ "randomizationUnit": {
277
+ "$ref": "#/$defs/RandomizationUnit"
278
+ },
204
279
  "start": {
205
280
  "description": "Index of the starting bucket of the range.",
206
281
  "type": "integer"
207
282
  },
208
- "count": {
209
- "description": "Number of buckets in the range.",
210
- "type": "integer"
211
- },
212
283
  "total": {
213
284
  "description": "The total number of buckets. You can assume this will always be 10000.",
214
285
  "type": "integer"
@@ -230,6 +301,7 @@
230
301
  "type": "string"
231
302
  },
232
303
  "value": {
304
+ "additionalProperties": true,
233
305
  "description": "The values that define the feature configuration. This should be validated against a schema.",
234
306
  "type": "object"
235
307
  }
@@ -252,13 +324,13 @@
252
324
  },
253
325
  "ExperimentOutcome": {
254
326
  "properties": {
255
- "slug": {
256
- "description": "Identifier for the outcome.",
257
- "type": "string"
258
- },
259
327
  "priority": {
260
328
  "description": "e.g., \"primary\" or \"secondary\".",
261
329
  "type": "string"
330
+ },
331
+ "slug": {
332
+ "description": "Identifier for the outcome.",
333
+ "type": "string"
262
334
  }
263
335
  },
264
336
  "required": [
@@ -280,20 +352,20 @@
280
352
  "SdkExperimentBranch": {
281
353
  "description": "The branch definition for SDK-based applications. Supported on Firefox for Android 96+, Firefox for iOS 39+, and all versions of Cirrus.",
282
354
  "properties": {
283
- "slug": {
284
- "description": "Identifier for the branch.",
285
- "type": "string"
286
- },
287
- "ratio": {
288
- "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.",
289
- "type": "integer"
290
- },
291
355
  "features": {
292
356
  "description": "An array of feature configurations.",
293
357
  "items": {
294
358
  "$ref": "#/$defs/ExperimentFeatureConfig"
295
359
  },
296
360
  "type": "array"
361
+ },
362
+ "ratio": {
363
+ "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.",
364
+ "type": "integer"
365
+ },
366
+ "slug": {
367
+ "description": "Identifier for the branch.",
368
+ "type": "string"
297
369
  }
298
370
  },
299
371
  "required": [