@mozilla/nimbus-schemas 2024.11.1 → 2024.11.3
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.
package/index.d.ts
CHANGED
|
@@ -134,12 +134,9 @@ export interface DesktopFeatureManifest {
|
|
|
134
134
|
[k: string]: DesktopFeature;
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* 1. The Nimbus SDK via Remote Settings
|
|
140
|
-
* 2. Jetstream via the Experimenter API
|
|
137
|
+
* A Nimbus experiment for Firefox Desktop.
|
|
141
138
|
*/
|
|
142
|
-
export interface
|
|
139
|
+
export interface DesktopNimbusExperiment {
|
|
143
140
|
/**
|
|
144
141
|
* Version of the NimbusExperiment schema this experiment refers to
|
|
145
142
|
*/
|
|
@@ -192,18 +189,6 @@ export interface NimbusExperiment {
|
|
|
192
189
|
* See-also: https://mozilla-hub.atlassian.net/browse/SDK-405
|
|
193
190
|
*/
|
|
194
191
|
isRollout?: boolean;
|
|
195
|
-
/**
|
|
196
|
-
* When this property is set to true, treat this experiment as aFirefox Labs experiment
|
|
197
|
-
*/
|
|
198
|
-
isFirefoxLabsOptIn?: boolean;
|
|
199
|
-
/**
|
|
200
|
-
* An optional string containing the Fluent ID for the title of the opt-in
|
|
201
|
-
*/
|
|
202
|
-
firefoxLabsTitle?: string;
|
|
203
|
-
/**
|
|
204
|
-
* An optional string containing the Fluent ID for the description of the opt-in
|
|
205
|
-
*/
|
|
206
|
-
firefoxLabsDescription?: string;
|
|
207
192
|
bucketConfig: ExperimentBucketConfig;
|
|
208
193
|
/**
|
|
209
194
|
* A list of outcomes relevant to the experiment analysis.
|
|
@@ -213,13 +198,6 @@ export interface NimbusExperiment {
|
|
|
213
198
|
* A list of featureIds the experiment contains configurations for.
|
|
214
199
|
*/
|
|
215
200
|
featureIds?: string[];
|
|
216
|
-
/**
|
|
217
|
-
* Branch configuration for the experiment.
|
|
218
|
-
*/
|
|
219
|
-
branches:
|
|
220
|
-
| ExperimentSingleFeatureBranch[]
|
|
221
|
-
| ExperimentMultiFeatureDesktopBranch[]
|
|
222
|
-
| ExperimentMultiFeatureMobileBranch[];
|
|
223
201
|
/**
|
|
224
202
|
* A JEXL targeting expression used to filter out experiments.
|
|
225
203
|
*/
|
|
@@ -258,11 +236,6 @@ export interface NimbusExperiment {
|
|
|
258
236
|
* The slug of the reference branch (i.e., the branch we consider "control").
|
|
259
237
|
*/
|
|
260
238
|
referenceBranch: string | null;
|
|
261
|
-
/**
|
|
262
|
-
* Opt out of feature schema validation. Only supported on desktop.
|
|
263
|
-
*/
|
|
264
|
-
featureValidationOptOut?: boolean;
|
|
265
|
-
localizations?: ExperimentLocalizations | null;
|
|
266
239
|
/**
|
|
267
240
|
* The list of locale codes (e.g., "en-US" or "fr") that this experiment is targeting.
|
|
268
241
|
*
|
|
@@ -275,6 +248,27 @@ export interface NimbusExperiment {
|
|
|
275
248
|
* If null, it has not yet been published.
|
|
276
249
|
*/
|
|
277
250
|
publishedDate?: string | null;
|
|
251
|
+
/**
|
|
252
|
+
* Branch configuration for the experiment.
|
|
253
|
+
*/
|
|
254
|
+
branches: DesktopExperimentBranch[];
|
|
255
|
+
/**
|
|
256
|
+
* When this property is set to true, treat this experiment as aFirefox Labs experiment
|
|
257
|
+
*/
|
|
258
|
+
isFirefoxLabsOptIn?: boolean;
|
|
259
|
+
/**
|
|
260
|
+
* An optional string containing the Fluent ID for the title of the opt-in
|
|
261
|
+
*/
|
|
262
|
+
firefoxLabsTitle?: string;
|
|
263
|
+
/**
|
|
264
|
+
* An optional string containing the Fluent ID for the description of the opt-in
|
|
265
|
+
*/
|
|
266
|
+
firefoxLabsDescription?: string;
|
|
267
|
+
/**
|
|
268
|
+
* Opt out of feature schema validation.
|
|
269
|
+
*/
|
|
270
|
+
featureValidationOptOut?: boolean;
|
|
271
|
+
localizations?: ExperimentLocalizations | null;
|
|
278
272
|
}
|
|
279
273
|
export interface ExperimentBucketConfig {
|
|
280
274
|
randomizationUnit: RandomizationUnit;
|
|
@@ -308,12 +302,9 @@ export interface ExperimentOutcome {
|
|
|
308
302
|
priority: string;
|
|
309
303
|
}
|
|
310
304
|
/**
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
* Supported by Firefox Desktop for versions before 95, Firefox for Android for versions
|
|
314
|
-
* before 96, and Firefox for iOS for versions before 39.
|
|
305
|
+
* The branch definition supported on Firefox Desktop 95+.
|
|
315
306
|
*/
|
|
316
|
-
export interface
|
|
307
|
+
export interface DesktopExperimentBranch {
|
|
317
308
|
/**
|
|
318
309
|
* Identifier for the branch.
|
|
319
310
|
*/
|
|
@@ -324,7 +315,15 @@ export interface ExperimentSingleFeatureBranch {
|
|
|
324
315
|
* e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.
|
|
325
316
|
*/
|
|
326
317
|
ratio: number;
|
|
327
|
-
|
|
318
|
+
/**
|
|
319
|
+
* An array of feature configurations.
|
|
320
|
+
*/
|
|
321
|
+
features: ExperimentFeatureConfig[];
|
|
322
|
+
feature: DesktopTombstoneFeatureConfig;
|
|
323
|
+
/**
|
|
324
|
+
* An optional string containing the title of the branch
|
|
325
|
+
*/
|
|
326
|
+
firefoxLabsTitle?: string;
|
|
328
327
|
}
|
|
329
328
|
export interface ExperimentFeatureConfig {
|
|
330
329
|
/**
|
|
@@ -340,30 +339,6 @@ export interface ExperimentFeatureConfig {
|
|
|
340
339
|
[k: string]: unknown;
|
|
341
340
|
};
|
|
342
341
|
}
|
|
343
|
-
/**
|
|
344
|
-
* The branch definition supported on Firefox Desktop 95+.
|
|
345
|
-
*/
|
|
346
|
-
export interface ExperimentMultiFeatureDesktopBranch {
|
|
347
|
-
/**
|
|
348
|
-
* Identifier for the branch.
|
|
349
|
-
*/
|
|
350
|
-
slug: string;
|
|
351
|
-
/**
|
|
352
|
-
* Relative ratio of population for the branch.
|
|
353
|
-
*
|
|
354
|
-
* e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.
|
|
355
|
-
*/
|
|
356
|
-
ratio: number;
|
|
357
|
-
/**
|
|
358
|
-
* An array of feature configurations.
|
|
359
|
-
*/
|
|
360
|
-
features: ExperimentFeatureConfig[];
|
|
361
|
-
feature: DesktopTombstoneFeatureConfig;
|
|
362
|
-
/**
|
|
363
|
-
* An optional string containing the title of the branch
|
|
364
|
-
*/
|
|
365
|
-
firefoxLabsTitle: string;
|
|
366
|
-
}
|
|
367
342
|
export interface DesktopTombstoneFeatureConfig {
|
|
368
343
|
featureId: "unused-feature-id-for-legacy-support";
|
|
369
344
|
value: {
|
|
@@ -372,11 +347,32 @@ export interface DesktopTombstoneFeatureConfig {
|
|
|
372
347
|
enabled: false;
|
|
373
348
|
}
|
|
374
349
|
/**
|
|
375
|
-
*
|
|
350
|
+
* Per-locale localization substitutions.
|
|
351
|
+
*
|
|
352
|
+
* The top level key is the locale (e.g., "en-US" or "fr"). Each entry is a mapping of
|
|
353
|
+
* string IDs to their localized equivalents.
|
|
354
|
+
*/
|
|
355
|
+
export interface ExperimentLocalizations {
|
|
356
|
+
[k: string]: {
|
|
357
|
+
[k: string]: string;
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* A Nimbus experiment for Nimbus SDK-based applications.
|
|
362
|
+
*/
|
|
363
|
+
export interface SdkNimbusExperiment {
|
|
364
|
+
/**
|
|
365
|
+
* Branch configuration for the experiment.
|
|
366
|
+
*/
|
|
367
|
+
branches: SdkExperimentBranch[];
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* The branch definition for SDK-based applications
|
|
376
371
|
*
|
|
377
|
-
* Supported on Firefox for Android 96+ and Firefox for iOS 39
|
|
372
|
+
* Supported on Firefox for Android 96+ and Firefox for iOS 39+ and all versions of
|
|
373
|
+
* Cirrus.
|
|
378
374
|
*/
|
|
379
|
-
export interface
|
|
375
|
+
export interface SdkExperimentBranch {
|
|
380
376
|
/**
|
|
381
377
|
* Identifier for the branch.
|
|
382
378
|
*/
|
|
@@ -392,19 +388,6 @@ export interface ExperimentMultiFeatureMobileBranch {
|
|
|
392
388
|
*/
|
|
393
389
|
features: ExperimentFeatureConfig[];
|
|
394
390
|
}
|
|
395
|
-
/**
|
|
396
|
-
* Per-locale localization substitutions.
|
|
397
|
-
*
|
|
398
|
-
* The top level key is the locale (e.g., "en-US" or "fr"). Each entry is a mapping of
|
|
399
|
-
* string IDs to their localized equivalents.
|
|
400
|
-
*
|
|
401
|
-
* Only supported on desktop.
|
|
402
|
-
*/
|
|
403
|
-
export interface ExperimentLocalizations {
|
|
404
|
-
[k: string]: {
|
|
405
|
-
[k: string]: string;
|
|
406
|
-
};
|
|
407
|
-
}
|
|
408
391
|
/**
|
|
409
392
|
* The SDK-specific feature manifest.
|
|
410
393
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
3
|
-
"title": "
|
|
4
|
-
"description": "
|
|
3
|
+
"title": "DesktopNimbusExperiment",
|
|
4
|
+
"description": "A Nimbus experiment for Firefox Desktop.",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"schemaVersion": {
|
|
@@ -44,18 +44,6 @@
|
|
|
44
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
45
|
"type": "boolean"
|
|
46
46
|
},
|
|
47
|
-
"isFirefoxLabsOptIn": {
|
|
48
|
-
"description": "When this property is set to true, treat this experiment as aFirefox Labs experiment",
|
|
49
|
-
"type": "boolean"
|
|
50
|
-
},
|
|
51
|
-
"firefoxLabsTitle": {
|
|
52
|
-
"description": "An optional string containing the Fluent ID for the title of the opt-in",
|
|
53
|
-
"type": "string"
|
|
54
|
-
},
|
|
55
|
-
"firefoxLabsDescription": {
|
|
56
|
-
"description": "An optional string containing the Fluent ID for the description of the opt-in",
|
|
57
|
-
"type": "string"
|
|
58
|
-
},
|
|
59
47
|
"bucketConfig": {
|
|
60
48
|
"$ref": "#/$defs/ExperimentBucketConfig",
|
|
61
49
|
"description": "Bucketing configuration."
|
|
@@ -74,29 +62,6 @@
|
|
|
74
62
|
},
|
|
75
63
|
"type": "array"
|
|
76
64
|
},
|
|
77
|
-
"branches": {
|
|
78
|
-
"anyOf": [
|
|
79
|
-
{
|
|
80
|
-
"items": {
|
|
81
|
-
"$ref": "#/$defs/ExperimentSingleFeatureBranch"
|
|
82
|
-
},
|
|
83
|
-
"type": "array"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"items": {
|
|
87
|
-
"$ref": "#/$defs/ExperimentMultiFeatureDesktopBranch"
|
|
88
|
-
},
|
|
89
|
-
"type": "array"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"items": {
|
|
93
|
-
"$ref": "#/$defs/ExperimentMultiFeatureMobileBranch"
|
|
94
|
-
},
|
|
95
|
-
"type": "array"
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
"description": "Branch configuration for the experiment."
|
|
99
|
-
},
|
|
100
65
|
"targeting": {
|
|
101
66
|
"anyOf": [
|
|
102
67
|
{
|
|
@@ -163,20 +128,6 @@
|
|
|
163
128
|
],
|
|
164
129
|
"description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
|
|
165
130
|
},
|
|
166
|
-
"featureValidationOptOut": {
|
|
167
|
-
"description": "Opt out of feature schema validation. Only supported on desktop.",
|
|
168
|
-
"type": "boolean"
|
|
169
|
-
},
|
|
170
|
-
"localizations": {
|
|
171
|
-
"anyOf": [
|
|
172
|
-
{
|
|
173
|
-
"$ref": "#/$defs/ExperimentLocalizations"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"type": "null"
|
|
177
|
-
}
|
|
178
|
-
]
|
|
179
|
-
},
|
|
180
131
|
"locales": {
|
|
181
132
|
"anyOf": [
|
|
182
133
|
{
|
|
@@ -202,6 +153,39 @@
|
|
|
202
153
|
}
|
|
203
154
|
],
|
|
204
155
|
"description": "The date that this experiment was first published to Remote Settings. If null, it has not yet been published."
|
|
156
|
+
},
|
|
157
|
+
"branches": {
|
|
158
|
+
"description": "Branch configuration for the experiment.",
|
|
159
|
+
"items": {
|
|
160
|
+
"$ref": "#/$defs/DesktopExperimentBranch"
|
|
161
|
+
},
|
|
162
|
+
"type": "array"
|
|
163
|
+
},
|
|
164
|
+
"isFirefoxLabsOptIn": {
|
|
165
|
+
"description": "When this property is set to true, treat this experiment as aFirefox Labs experiment",
|
|
166
|
+
"type": "boolean"
|
|
167
|
+
},
|
|
168
|
+
"firefoxLabsTitle": {
|
|
169
|
+
"description": "An optional string containing the Fluent ID for the title of the opt-in",
|
|
170
|
+
"type": "string"
|
|
171
|
+
},
|
|
172
|
+
"firefoxLabsDescription": {
|
|
173
|
+
"description": "An optional string containing the Fluent ID for the description of the opt-in",
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
"featureValidationOptOut": {
|
|
177
|
+
"description": "Opt out of feature schema validation.",
|
|
178
|
+
"type": "boolean"
|
|
179
|
+
},
|
|
180
|
+
"localizations": {
|
|
181
|
+
"anyOf": [
|
|
182
|
+
{
|
|
183
|
+
"$ref": "#/$defs/ExperimentLocalizations"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"type": "null"
|
|
187
|
+
}
|
|
188
|
+
]
|
|
205
189
|
}
|
|
206
190
|
},
|
|
207
191
|
"required": [
|
|
@@ -215,11 +199,11 @@
|
|
|
215
199
|
"userFacingDescription",
|
|
216
200
|
"isEnrollmentPaused",
|
|
217
201
|
"bucketConfig",
|
|
218
|
-
"branches",
|
|
219
202
|
"startDate",
|
|
220
203
|
"endDate",
|
|
221
204
|
"proposedEnrollment",
|
|
222
|
-
"referenceBranch"
|
|
205
|
+
"referenceBranch",
|
|
206
|
+
"branches"
|
|
223
207
|
],
|
|
224
208
|
"dependentSchemas": {
|
|
225
209
|
"isFirefoxLabsOptIn": {
|
|
@@ -268,6 +252,41 @@
|
|
|
268
252
|
}
|
|
269
253
|
},
|
|
270
254
|
"$defs": {
|
|
255
|
+
"DesktopExperimentBranch": {
|
|
256
|
+
"description": "The branch definition supported on Firefox Desktop 95+.",
|
|
257
|
+
"properties": {
|
|
258
|
+
"slug": {
|
|
259
|
+
"description": "Identifier for the branch.",
|
|
260
|
+
"type": "string"
|
|
261
|
+
},
|
|
262
|
+
"ratio": {
|
|
263
|
+
"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.",
|
|
264
|
+
"type": "integer"
|
|
265
|
+
},
|
|
266
|
+
"features": {
|
|
267
|
+
"description": "An array of feature configurations.",
|
|
268
|
+
"items": {
|
|
269
|
+
"$ref": "#/$defs/ExperimentFeatureConfig"
|
|
270
|
+
},
|
|
271
|
+
"type": "array"
|
|
272
|
+
},
|
|
273
|
+
"feature": {
|
|
274
|
+
"$ref": "#/$defs/DesktopTombstoneFeatureConfig",
|
|
275
|
+
"description": "The feature key must be provided with values to prevent crashes if the is encountered by Desktop clients earlier than version 95."
|
|
276
|
+
},
|
|
277
|
+
"firefoxLabsTitle": {
|
|
278
|
+
"description": "An optional string containing the title of the branch",
|
|
279
|
+
"type": "string"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"required": [
|
|
283
|
+
"slug",
|
|
284
|
+
"ratio",
|
|
285
|
+
"features",
|
|
286
|
+
"feature"
|
|
287
|
+
],
|
|
288
|
+
"type": "object"
|
|
289
|
+
},
|
|
271
290
|
"DesktopTombstoneFeatureConfig": {
|
|
272
291
|
"properties": {
|
|
273
292
|
"featureId": {
|
|
@@ -344,69 +363,7 @@
|
|
|
344
363
|
},
|
|
345
364
|
"type": "object"
|
|
346
365
|
},
|
|
347
|
-
"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.
|
|
348
|
-
"type": "object"
|
|
349
|
-
},
|
|
350
|
-
"ExperimentMultiFeatureDesktopBranch": {
|
|
351
|
-
"description": "The branch definition supported on Firefox Desktop 95+.",
|
|
352
|
-
"properties": {
|
|
353
|
-
"slug": {
|
|
354
|
-
"description": "Identifier for the branch.",
|
|
355
|
-
"type": "string"
|
|
356
|
-
},
|
|
357
|
-
"ratio": {
|
|
358
|
-
"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.",
|
|
359
|
-
"type": "integer"
|
|
360
|
-
},
|
|
361
|
-
"features": {
|
|
362
|
-
"description": "An array of feature configurations.",
|
|
363
|
-
"items": {
|
|
364
|
-
"$ref": "#/$defs/ExperimentFeatureConfig"
|
|
365
|
-
},
|
|
366
|
-
"type": "array"
|
|
367
|
-
},
|
|
368
|
-
"feature": {
|
|
369
|
-
"$ref": "#/$defs/DesktopTombstoneFeatureConfig",
|
|
370
|
-
"description": "The feature key must be provided with values to prevent crashes if the is encountered by Desktop clients earlier than version 95."
|
|
371
|
-
},
|
|
372
|
-
"firefoxLabsTitle": {
|
|
373
|
-
"description": "An optional string containing the title of the branch",
|
|
374
|
-
"type": "string"
|
|
375
|
-
}
|
|
376
|
-
},
|
|
377
|
-
"required": [
|
|
378
|
-
"slug",
|
|
379
|
-
"ratio",
|
|
380
|
-
"features",
|
|
381
|
-
"feature",
|
|
382
|
-
"firefoxLabsTitle"
|
|
383
|
-
],
|
|
384
|
-
"type": "object"
|
|
385
|
-
},
|
|
386
|
-
"ExperimentMultiFeatureMobileBranch": {
|
|
387
|
-
"description": "The branch definition for mobile browsers. Supported on Firefox for Android 96+ and Firefox for iOS 39+.",
|
|
388
|
-
"properties": {
|
|
389
|
-
"slug": {
|
|
390
|
-
"description": "Identifier for the branch.",
|
|
391
|
-
"type": "string"
|
|
392
|
-
},
|
|
393
|
-
"ratio": {
|
|
394
|
-
"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.",
|
|
395
|
-
"type": "integer"
|
|
396
|
-
},
|
|
397
|
-
"features": {
|
|
398
|
-
"description": "An array of feature configurations.",
|
|
399
|
-
"items": {
|
|
400
|
-
"$ref": "#/$defs/ExperimentFeatureConfig"
|
|
401
|
-
},
|
|
402
|
-
"type": "array"
|
|
403
|
-
}
|
|
404
|
-
},
|
|
405
|
-
"required": [
|
|
406
|
-
"slug",
|
|
407
|
-
"ratio",
|
|
408
|
-
"features"
|
|
409
|
-
],
|
|
366
|
+
"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.",
|
|
410
367
|
"type": "object"
|
|
411
368
|
},
|
|
412
369
|
"ExperimentOutcome": {
|
|
@@ -426,29 +383,6 @@
|
|
|
426
383
|
],
|
|
427
384
|
"type": "object"
|
|
428
385
|
},
|
|
429
|
-
"ExperimentSingleFeatureBranch": {
|
|
430
|
-
"description": "A single-feature branch definition. Supported by Firefox Desktop for versions before 95, Firefox for Android for versions before 96, and Firefox for iOS for versions before 39.",
|
|
431
|
-
"properties": {
|
|
432
|
-
"slug": {
|
|
433
|
-
"description": "Identifier for the branch.",
|
|
434
|
-
"type": "string"
|
|
435
|
-
},
|
|
436
|
-
"ratio": {
|
|
437
|
-
"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.",
|
|
438
|
-
"type": "integer"
|
|
439
|
-
},
|
|
440
|
-
"feature": {
|
|
441
|
-
"$ref": "#/$defs/ExperimentFeatureConfig",
|
|
442
|
-
"description": "A single feature configuration."
|
|
443
|
-
}
|
|
444
|
-
},
|
|
445
|
-
"required": [
|
|
446
|
-
"slug",
|
|
447
|
-
"ratio",
|
|
448
|
-
"feature"
|
|
449
|
-
],
|
|
450
|
-
"type": "object"
|
|
451
|
-
},
|
|
452
386
|
"RandomizationUnit": {
|
|
453
387
|
"description": "A unique, stable indentifier for the user used as an input to bucket hashing.",
|
|
454
388
|
"enum": [
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
3
|
+
"title": "SdkNimbusExperiment",
|
|
4
|
+
"description": "A Nimbus experiment for Nimbus SDK-based applications.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"branches": {
|
|
8
|
+
"description": "Branch configuration for the experiment.",
|
|
9
|
+
"items": {
|
|
10
|
+
"$ref": "#/$defs/SdkExperimentBranch"
|
|
11
|
+
},
|
|
12
|
+
"type": "array"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required": [
|
|
16
|
+
"branches"
|
|
17
|
+
],
|
|
18
|
+
"$defs": {
|
|
19
|
+
"ExperimentFeatureConfig": {
|
|
20
|
+
"properties": {
|
|
21
|
+
"featureId": {
|
|
22
|
+
"description": "The identifier for the feature flag.",
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"value": {
|
|
26
|
+
"description": "The values that define the feature configuration. This should be validated against a schema.",
|
|
27
|
+
"type": "object"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": [
|
|
31
|
+
"featureId",
|
|
32
|
+
"value"
|
|
33
|
+
],
|
|
34
|
+
"type": "object"
|
|
35
|
+
},
|
|
36
|
+
"SdkExperimentBranch": {
|
|
37
|
+
"description": "The branch definition for SDK-based applications Supported on Firefox for Android 96+ and Firefox for iOS 39+ and all versions of Cirrus.",
|
|
38
|
+
"properties": {
|
|
39
|
+
"slug": {
|
|
40
|
+
"description": "Identifier for the branch.",
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
"ratio": {
|
|
44
|
+
"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.",
|
|
45
|
+
"type": "integer"
|
|
46
|
+
},
|
|
47
|
+
"features": {
|
|
48
|
+
"description": "An array of feature configurations.",
|
|
49
|
+
"items": {
|
|
50
|
+
"$ref": "#/$defs/ExperimentFeatureConfig"
|
|
51
|
+
},
|
|
52
|
+
"type": "array"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"required": [
|
|
56
|
+
"slug",
|
|
57
|
+
"ratio",
|
|
58
|
+
"features"
|
|
59
|
+
],
|
|
60
|
+
"type": "object"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|