@mozilla/nimbus-schemas 2025.1.1 → 3001.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.
@@ -142,6 +142,16 @@
142
142
  ],
143
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
+ "localizations": {
146
+ "anyOf": [
147
+ {
148
+ "$ref": "#/$defs/ExperimentLocalizations"
149
+ },
150
+ {
151
+ "type": "null"
152
+ }
153
+ ]
154
+ },
145
155
  "publishedDate": {
146
156
  "anyOf": [
147
157
  {
@@ -222,16 +232,6 @@
222
232
  "requiresRestart": {
223
233
  "description": "Does the experiment require a restart to take effect? Only used by Firefox Labs Opt-Ins.",
224
234
  "type": "boolean"
225
- },
226
- "localizations": {
227
- "anyOf": [
228
- {
229
- "$ref": "#/$defs/ExperimentLocalizations"
230
- },
231
- {
232
- "type": "null"
233
- }
234
- ]
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",
@@ -347,7 +348,7 @@
347
348
  "type": "integer"
348
349
  },
349
350
  "total": {
350
- "description": "The total number of buckets. You can assume this will always be 10000",
351
+ "description": "The total number of buckets. You can assume this will always be 10000.",
351
352
  "type": "integer"
352
353
  }
353
354
  },
@@ -405,7 +406,7 @@
405
406
  "type": "object"
406
407
  },
407
408
  "RandomizationUnit": {
408
- "description": "A unique, stable indentifier for the user used as an input to bucket hashing.",
409
+ "description": "A unique, stable identifier for the user used as an input to bucket hashing.",
409
410
  "enum": [
410
411
  "normandy_id",
411
412
  "nimbus_id",
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "title": "ExperimentBucketConfig",
4
+ "type": "object",
5
+ "properties": {
6
+ "randomizationUnit": {
7
+ "$ref": "#/$defs/RandomizationUnit"
8
+ },
9
+ "namespace": {
10
+ "description": "Additional inputs to the hashing function.",
11
+ "type": "string"
12
+ },
13
+ "start": {
14
+ "description": "Index of the starting bucket of the range.",
15
+ "type": "integer"
16
+ },
17
+ "count": {
18
+ "description": "Number of buckets in the range.",
19
+ "type": "integer"
20
+ },
21
+ "total": {
22
+ "description": "The total number of buckets. You can assume this will always be 10000.",
23
+ "type": "integer"
24
+ }
25
+ },
26
+ "required": [
27
+ "randomizationUnit",
28
+ "namespace",
29
+ "start",
30
+ "count",
31
+ "total"
32
+ ],
33
+ "$defs": {
34
+ "RandomizationUnit": {
35
+ "description": "A unique, stable identifier for the user used as an input to bucket hashing.",
36
+ "enum": [
37
+ "normandy_id",
38
+ "nimbus_id",
39
+ "user_id",
40
+ "group_id"
41
+ ],
42
+ "type": "string"
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "title": "ExperimentFeatureConfig",
4
+ "type": "object",
5
+ "properties": {
6
+ "featureId": {
7
+ "description": "The identifier for the feature flag.",
8
+ "type": "string"
9
+ },
10
+ "value": {
11
+ "description": "The values that define the feature configuration. This should be validated against a schema.",
12
+ "type": "object"
13
+ }
14
+ },
15
+ "required": [
16
+ "featureId",
17
+ "value"
18
+ ]
19
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "title": "ExperimentLocalizations",
4
+ "description": "Per-locale localization substitutions. The top level key is the locale (e.g., \"en-US\" or \"fr\"). Each entry is a mapping of string IDs to their localized equivalents.",
5
+ "type": "object",
6
+ "additionalProperties": {
7
+ "additionalProperties": {
8
+ "type": "string"
9
+ },
10
+ "type": "object"
11
+ }
12
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "title": "ExperimentOutcome",
4
+ "type": "object",
5
+ "properties": {
6
+ "slug": {
7
+ "description": "Identifier for the outcome.",
8
+ "type": "string"
9
+ },
10
+ "priority": {
11
+ "description": "e.g., \"primary\" or \"secondary\".",
12
+ "type": "string"
13
+ }
14
+ },
15
+ "required": [
16
+ "slug",
17
+ "priority"
18
+ ]
19
+ }
@@ -0,0 +1,331 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "title": "NimbusExperimentV7",
4
+ "description": "A Nimbus experiment for V7.",
5
+ "type": "object",
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
+ "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\".",
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\".",
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."
50
+ },
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"
64
+ },
65
+ "targeting": {
66
+ "anyOf": [
67
+ {
68
+ "type": "string"
69
+ },
70
+ {
71
+ "type": "null"
72
+ }
73
+ ],
74
+ "description": "A JEXL targeting expression used to filter out experiments."
75
+ },
76
+ "startDate": {
77
+ "anyOf": [
78
+ {
79
+ "format": "date",
80
+ "type": "string"
81
+ },
82
+ {
83
+ "type": "null"
84
+ }
85
+ ],
86
+ "description": "Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings."
87
+ },
88
+ "enrollmentEndDate": {
89
+ "anyOf": [
90
+ {
91
+ "format": "date",
92
+ "type": "string"
93
+ },
94
+ {
95
+ "type": "null"
96
+ }
97
+ ],
98
+ "description": "Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings."
99
+ },
100
+ "endDate": {
101
+ "anyOf": [
102
+ {
103
+ "format": "date",
104
+ "type": "string"
105
+ },
106
+ {
107
+ "type": "null"
108
+ }
109
+ ],
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"
119
+ },
120
+ "referenceBranch": {
121
+ "anyOf": [
122
+ {
123
+ "type": "string"
124
+ },
125
+ {
126
+ "type": "null"
127
+ }
128
+ ],
129
+ "description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
130
+ },
131
+ "locales": {
132
+ "anyOf": [
133
+ {
134
+ "items": {
135
+ "type": "string"
136
+ },
137
+ "type": "array"
138
+ },
139
+ {
140
+ "type": "null"
141
+ }
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."
144
+ },
145
+ "localizations": {
146
+ "anyOf": [
147
+ {
148
+ "$ref": "#/$defs/ExperimentLocalizations"
149
+ },
150
+ {
151
+ "type": "null"
152
+ }
153
+ ],
154
+ "description": "Per-locale localization substitutions."
155
+ },
156
+ "publishedDate": {
157
+ "anyOf": [
158
+ {
159
+ "format": "date-time",
160
+ "type": "string"
161
+ },
162
+ {
163
+ "type": "null"
164
+ }
165
+ ],
166
+ "description": "The date that this experiment was first published to Remote Settings. If null, it has not yet been published."
167
+ },
168
+ "branches": {
169
+ "description": "Branch configuration for the experiment.",
170
+ "items": {
171
+ "$ref": "#/$defs/BaseExperimentBranch"
172
+ },
173
+ "type": "array"
174
+ },
175
+ "documentationLinks": {
176
+ "description": "All documentation links associated with this experiment.",
177
+ "items": {
178
+ "$ref": "#/$defs/DocumentationLink"
179
+ },
180
+ "type": "array"
181
+ }
182
+ },
183
+ "required": [
184
+ "schemaVersion",
185
+ "slug",
186
+ "id",
187
+ "appName",
188
+ "appId",
189
+ "channel",
190
+ "userFacingName",
191
+ "userFacingDescription",
192
+ "isEnrollmentPaused",
193
+ "bucketConfig",
194
+ "featureIds",
195
+ "startDate",
196
+ "endDate",
197
+ "proposedEnrollment",
198
+ "referenceBranch",
199
+ "branches",
200
+ "documentationLinks"
201
+ ],
202
+ "$defs": {
203
+ "BaseExperimentBranch": {
204
+ "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
+ "features": {
214
+ "description": "An array of feature configurations.",
215
+ "items": {
216
+ "$ref": "#/$defs/ExperimentFeatureConfig"
217
+ },
218
+ "type": "array"
219
+ }
220
+ },
221
+ "required": [
222
+ "slug",
223
+ "ratio",
224
+ "features"
225
+ ],
226
+ "type": "object"
227
+ },
228
+ "DocumentationLink": {
229
+ "properties": {
230
+ "title": {
231
+ "description": "The name associated with the link.",
232
+ "type": "string"
233
+ },
234
+ "link": {
235
+ "description": "The URL associated with the link.",
236
+ "type": "string"
237
+ }
238
+ },
239
+ "required": [
240
+ "title",
241
+ "link"
242
+ ],
243
+ "type": "object"
244
+ },
245
+ "ExperimentBucketConfig": {
246
+ "properties": {
247
+ "randomizationUnit": {
248
+ "$ref": "#/$defs/RandomizationUnit"
249
+ },
250
+ "namespace": {
251
+ "description": "Additional inputs to the hashing function.",
252
+ "type": "string"
253
+ },
254
+ "start": {
255
+ "description": "Index of the starting bucket of the range.",
256
+ "type": "integer"
257
+ },
258
+ "count": {
259
+ "description": "Number of buckets in the range.",
260
+ "type": "integer"
261
+ },
262
+ "total": {
263
+ "description": "The total number of buckets. You can assume this will always be 10000.",
264
+ "type": "integer"
265
+ }
266
+ },
267
+ "required": [
268
+ "randomizationUnit",
269
+ "namespace",
270
+ "start",
271
+ "count",
272
+ "total"
273
+ ],
274
+ "type": "object"
275
+ },
276
+ "ExperimentFeatureConfig": {
277
+ "properties": {
278
+ "featureId": {
279
+ "description": "The identifier for the feature flag.",
280
+ "type": "string"
281
+ },
282
+ "value": {
283
+ "description": "The values that define the feature configuration. This should be validated against a schema.",
284
+ "type": "object"
285
+ }
286
+ },
287
+ "required": [
288
+ "featureId",
289
+ "value"
290
+ ],
291
+ "type": "object"
292
+ },
293
+ "ExperimentLocalizations": {
294
+ "additionalProperties": {
295
+ "additionalProperties": {
296
+ "type": "string"
297
+ },
298
+ "type": "object"
299
+ },
300
+ "description": "Per-locale localization substitutions. The top level key is the locale (e.g., \"en-US\" or \"fr\"). Each entry is a mapping of string IDs to their localized equivalents.",
301
+ "type": "object"
302
+ },
303
+ "ExperimentOutcome": {
304
+ "properties": {
305
+ "slug": {
306
+ "description": "Identifier for the outcome.",
307
+ "type": "string"
308
+ },
309
+ "priority": {
310
+ "description": "e.g., \"primary\" or \"secondary\".",
311
+ "type": "string"
312
+ }
313
+ },
314
+ "required": [
315
+ "slug",
316
+ "priority"
317
+ ],
318
+ "type": "object"
319
+ },
320
+ "RandomizationUnit": {
321
+ "description": "A unique, stable identifier for the user used as an input to bucket hashing.",
322
+ "enum": [
323
+ "normandy_id",
324
+ "nimbus_id",
325
+ "user_id",
326
+ "group_id"
327
+ ],
328
+ "type": "string"
329
+ }
330
+ }
331
+ }
@@ -44,6 +44,10 @@
44
44
  },
45
45
  "description": "The variables that this feature can set.",
46
46
  "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"
47
51
  }
48
52
  },
49
53
  "required": [