@mozilla/nimbus-schemas 3002.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.
package/index.d.ts CHANGED
@@ -153,23 +153,15 @@ export interface DesktopAllVersionsNimbusExperiment {
153
153
  */
154
154
  publishedDate?: string | null;
155
155
  /**
156
- * Branch configuration for the experiment.
157
- */
158
- branches: DesktopAllVersionsExperimentBranch[];
159
- /**
160
- * When this property is set to true, treat this experiment as aFirefox Labs experiment
156
+ * When this property is set to true, treat this experiment as a Firefox Labs experiment
161
157
  */
162
158
  isFirefoxLabsOptIn?: boolean;
163
159
  /**
164
- * The group this should appear under in Firefox Labs
165
- */
166
- firefoxLabsGroup?: string | null;
167
- /**
168
- * The title shown in Firefox Labs (Fluent ID)
160
+ * The title shown in Firefox Labs (Fluent ID or Resource ID)
169
161
  */
170
162
  firefoxLabsTitle?: string | null;
171
163
  /**
172
- * The description shown in Firefox Labs (Fluent ID)
164
+ * The description shown in Firefox Labs (Fluent ID or Resource ID)
173
165
  */
174
166
  firefoxLabsDescription?: string | null;
175
167
  /**
@@ -178,16 +170,24 @@ export interface DesktopAllVersionsNimbusExperiment {
178
170
  firefoxLabsDescriptionLinks?: {
179
171
  [k: string]: string;
180
172
  } | null;
181
- /**
182
- * Opt out of feature schema validation.
183
- */
184
- featureValidationOptOut?: boolean;
185
173
  /**
186
174
  * Does the experiment require a restart to take effect?
187
175
  *
188
176
  * Only used by Firefox Labs Opt-Ins.
189
177
  */
190
178
  requiresRestart?: boolean;
179
+ /**
180
+ * Branch configuration for the experiment.
181
+ */
182
+ branches: DesktopAllVersionsExperimentBranch[];
183
+ /**
184
+ * Opt out of feature schema validation.
185
+ */
186
+ featureValidationOptOut?: boolean;
187
+ /**
188
+ * The group this should appear under in Firefox Labs
189
+ */
190
+ firefoxLabsGroup?: string | null;
191
191
  }
192
192
  export interface ExperimentBucketConfig {
193
193
  randomizationUnit: RandomizationUnit;
@@ -399,23 +399,15 @@ export interface DesktopNimbusExperiment {
399
399
  */
400
400
  publishedDate?: string | null;
401
401
  /**
402
- * Branch configuration for the experiment.
403
- */
404
- branches: DesktopExperimentBranch[];
405
- /**
406
- * When this property is set to true, treat this experiment as aFirefox Labs experiment
402
+ * When this property is set to true, treat this experiment as a Firefox Labs experiment
407
403
  */
408
404
  isFirefoxLabsOptIn?: boolean;
409
405
  /**
410
- * The group this should appear under in Firefox Labs
411
- */
412
- firefoxLabsGroup?: string | null;
413
- /**
414
- * The title shown in Firefox Labs (Fluent ID)
406
+ * The title shown in Firefox Labs (Fluent ID or Resource ID)
415
407
  */
416
408
  firefoxLabsTitle?: string | null;
417
409
  /**
418
- * The description shown in Firefox Labs (Fluent ID)
410
+ * The description shown in Firefox Labs (Fluent ID or Resource ID)
419
411
  */
420
412
  firefoxLabsDescription?: string | null;
421
413
  /**
@@ -424,16 +416,24 @@ export interface DesktopNimbusExperiment {
424
416
  firefoxLabsDescriptionLinks?: {
425
417
  [k: string]: string;
426
418
  } | null;
427
- /**
428
- * Opt out of feature schema validation.
429
- */
430
- featureValidationOptOut?: boolean;
431
419
  /**
432
420
  * Does the experiment require a restart to take effect?
433
421
  *
434
422
  * Only used by Firefox Labs Opt-Ins.
435
423
  */
436
424
  requiresRestart?: boolean;
425
+ /**
426
+ * Branch configuration for the experiment.
427
+ */
428
+ branches: DesktopExperimentBranch[];
429
+ /**
430
+ * Opt out of feature schema validation.
431
+ */
432
+ featureValidationOptOut?: boolean;
433
+ /**
434
+ * The group this should appear under in Firefox Labs
435
+ */
436
+ firefoxLabsGroup?: string | null;
437
437
  }
438
438
  /**
439
439
  * The branch definition supported on Firefox Desktop 95+.
@@ -577,6 +577,30 @@ export interface SdkNimbusExperiment {
577
577
  * If null, it has not yet been published.
578
578
  */
579
579
  publishedDate?: string | null;
580
+ /**
581
+ * When this property is set to true, treat this experiment as a Firefox Labs experiment
582
+ */
583
+ isFirefoxLabsOptIn?: boolean;
584
+ /**
585
+ * The title shown in Firefox Labs (Fluent ID or Resource ID)
586
+ */
587
+ firefoxLabsTitle?: string | null;
588
+ /**
589
+ * The description shown in Firefox Labs (Fluent ID or Resource ID)
590
+ */
591
+ firefoxLabsDescription?: string | null;
592
+ /**
593
+ * Links that will be used with the firefoxLabsDescription Fluent ID. May be null for Firefox Labs Opt-In recipes that do not use links.
594
+ */
595
+ firefoxLabsDescriptionLinks?: {
596
+ [k: string]: string;
597
+ } | null;
598
+ /**
599
+ * Does the experiment require a restart to take effect?
600
+ *
601
+ * Only used by Firefox Labs Opt-Ins.
602
+ */
603
+ requiresRestart?: boolean;
580
604
  /**
581
605
  * Branch configuration for the SDK experiment.
582
606
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mozilla/nimbus-schemas",
3
- "version": "3002.0.0",
3
+ "version": "3003.0.0",
4
4
  "description": "Schemas used by Mozilla Nimbus and related projects.",
5
5
  "main": "index.d.ts",
6
6
  "repository": {
@@ -71,7 +71,7 @@
71
71
  "type": "null"
72
72
  }
73
73
  ],
74
- "description": "The description shown in Firefox Labs (Fluent ID)"
74
+ "description": "The description shown in Firefox Labs (Fluent ID or Resource ID)"
75
75
  },
76
76
  "firefoxLabsDescriptionLinks": {
77
77
  "anyOf": [
@@ -110,7 +110,7 @@
110
110
  "type": "null"
111
111
  }
112
112
  ],
113
- "description": "The title shown in Firefox Labs (Fluent ID)"
113
+ "description": "The title shown in Firefox Labs (Fluent ID or Resource ID)"
114
114
  },
115
115
  "id": {
116
116
  "description": "Unique identifier for the experiiment. This is a duplicate of slug, but is required field for all Remote Settings records.",
@@ -121,7 +121,7 @@
121
121
  "type": "boolean"
122
122
  },
123
123
  "isFirefoxLabsOptIn": {
124
- "description": "When this property is set to true, treat this experiment as aFirefox Labs experiment",
124
+ "description": "When this property is set to true, treat this experiment as a Firefox Labs experiment",
125
125
  "type": "boolean"
126
126
  },
127
127
  "isRollout": {
@@ -274,7 +274,6 @@
274
274
  },
275
275
  "required": [
276
276
  "firefoxLabsDescription",
277
- "firefoxLabsDescriptionLinks",
278
277
  "firefoxLabsGroup",
279
278
  "firefoxLabsTitle"
280
279
  ],
@@ -71,7 +71,7 @@
71
71
  "type": "null"
72
72
  }
73
73
  ],
74
- "description": "The description shown in Firefox Labs (Fluent ID)"
74
+ "description": "The description shown in Firefox Labs (Fluent ID or Resource ID)"
75
75
  },
76
76
  "firefoxLabsDescriptionLinks": {
77
77
  "anyOf": [
@@ -110,7 +110,7 @@
110
110
  "type": "null"
111
111
  }
112
112
  ],
113
- "description": "The title shown in Firefox Labs (Fluent ID)"
113
+ "description": "The title shown in Firefox Labs (Fluent ID or Resource ID)"
114
114
  },
115
115
  "id": {
116
116
  "description": "Unique identifier for the experiiment. This is a duplicate of slug, but is required field for all Remote Settings records.",
@@ -121,7 +121,7 @@
121
121
  "type": "boolean"
122
122
  },
123
123
  "isFirefoxLabsOptIn": {
124
- "description": "When this property is set to true, treat this experiment as aFirefox Labs experiment",
124
+ "description": "When this property is set to true, treat this experiment as a Firefox Labs experiment",
125
125
  "type": "boolean"
126
126
  },
127
127
  "isRollout": {
@@ -274,7 +274,6 @@
274
274
  },
275
275
  "required": [
276
276
  "firefoxLabsDescription",
277
- "firefoxLabsDescriptionLinks",
278
277
  "firefoxLabsGroup",
279
278
  "firefoxLabsTitle"
280
279
  ],
@@ -65,6 +65,45 @@
65
65
  },
66
66
  "type": "array"
67
67
  },
68
+ "firefoxLabsDescription": {
69
+ "anyOf": [
70
+ {
71
+ "type": "string"
72
+ },
73
+ {
74
+ "type": "null"
75
+ }
76
+ ],
77
+ "description": "The description shown in Firefox Labs (Fluent ID or Resource ID)"
78
+ },
79
+ "firefoxLabsDescriptionLinks": {
80
+ "anyOf": [
81
+ {
82
+ "additionalProperties": {
83
+ "format": "uri",
84
+ "maxLength": 2083,
85
+ "minLength": 1,
86
+ "type": "string"
87
+ },
88
+ "type": "object"
89
+ },
90
+ {
91
+ "type": "null"
92
+ }
93
+ ],
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."
95
+ },
96
+ "firefoxLabsTitle": {
97
+ "anyOf": [
98
+ {
99
+ "type": "string"
100
+ },
101
+ {
102
+ "type": "null"
103
+ }
104
+ ],
105
+ "description": "The title shown in Firefox Labs (Fluent ID or Resource ID)"
106
+ },
68
107
  "id": {
69
108
  "description": "Unique identifier for the experiiment. This is a duplicate of slug, but is required field for all Remote Settings records.",
70
109
  "type": "string"
@@ -73,6 +112,10 @@
73
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.",
74
113
  "type": "boolean"
75
114
  },
115
+ "isFirefoxLabsOptIn": {
116
+ "description": "When this property is set to true, treat this experiment as a Firefox Labs experiment",
117
+ "type": "boolean"
118
+ },
76
119
  "isRollout": {
77
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",
78
121
  "type": "boolean"
@@ -140,6 +183,10 @@
140
183
  ],
141
184
  "description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
142
185
  },
186
+ "requiresRestart": {
187
+ "description": "Does the experiment require a restart to take effect? Only used by Firefox Labs Opt-Ins.",
188
+ "type": "boolean"
189
+ },
143
190
  "schemaVersion": {
144
191
  "description": "Version of the NimbusExperiment schema this experiment refers to",
145
192
  "type": "string"
@@ -199,6 +246,23 @@
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": {
@@ -58,6 +58,45 @@
58
58
  },
59
59
  "type": "array"
60
60
  },
61
+ "firefoxLabsDescription": {
62
+ "anyOf": [
63
+ {
64
+ "type": "string"
65
+ },
66
+ {
67
+ "type": "null"
68
+ }
69
+ ],
70
+ "description": "The description shown in Firefox Labs (Fluent ID or Resource ID)"
71
+ },
72
+ "firefoxLabsDescriptionLinks": {
73
+ "anyOf": [
74
+ {
75
+ "additionalProperties": {
76
+ "format": "uri",
77
+ "maxLength": 2083,
78
+ "minLength": 1,
79
+ "type": "string"
80
+ },
81
+ "type": "object"
82
+ },
83
+ {
84
+ "type": "null"
85
+ }
86
+ ],
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."
88
+ },
89
+ "firefoxLabsTitle": {
90
+ "anyOf": [
91
+ {
92
+ "type": "string"
93
+ },
94
+ {
95
+ "type": "null"
96
+ }
97
+ ],
98
+ "description": "The title shown in Firefox Labs (Fluent ID or Resource ID)"
99
+ },
61
100
  "id": {
62
101
  "description": "Unique identifier for the experiiment. This is a duplicate of slug, but is required field for all Remote Settings records.",
63
102
  "type": "string"
@@ -66,6 +105,10 @@
66
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.",
67
106
  "type": "boolean"
68
107
  },
108
+ "isFirefoxLabsOptIn": {
109
+ "description": "When this property is set to true, treat this experiment as a Firefox Labs experiment",
110
+ "type": "boolean"
111
+ },
69
112
  "isRollout": {
70
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",
71
114
  "type": "boolean"
@@ -133,6 +176,10 @@
133
176
  ],
134
177
  "description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
135
178
  },
179
+ "requiresRestart": {
180
+ "description": "Does the experiment require a restart to take effect? Only used by Firefox Labs Opt-Ins.",
181
+ "type": "boolean"
182
+ },
136
183
  "schemaVersion": {
137
184
  "description": "Version of the NimbusExperiment schema this experiment refers to",
138
185
  "type": "string"
@@ -191,6 +238,30 @@
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": {