@mozilla/nimbus-schemas 2024.10.2 → 2024.11.2

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/README.md CHANGED
@@ -5,8 +5,8 @@ This directory contains a package of schemas published to various repositories f
5
5
 
6
6
  ## Installation/Usage
7
7
  ### Prerequisites
8
- - python ^3.11
9
- - poetry ^1.2.2
8
+ - python ^3.10
9
+ - poetry ^1.8.4
10
10
  - node ^16
11
11
  - yarn ^1.22
12
12
 
package/index.d.ts CHANGED
@@ -262,18 +262,7 @@ export interface NimbusExperiment {
262
262
  * Opt out of feature schema validation. Only supported on desktop.
263
263
  */
264
264
  featureValidationOptOut?: boolean;
265
- /**
266
- * Per-locale localization substitutions.
267
- *
268
- * 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.
269
- *
270
- * Only supported on desktop.
271
- */
272
- localizations?: {
273
- [k: string]: {
274
- [k: string]: string;
275
- };
276
- } | null;
265
+ localizations?: ExperimentLocalizations | null;
277
266
  /**
278
267
  * The list of locale codes (e.g., "en-US" or "fr") that this experiment is targeting.
279
268
  *
@@ -373,7 +362,7 @@ export interface ExperimentMultiFeatureDesktopBranch {
373
362
  /**
374
363
  * An optional string containing the title of the branch
375
364
  */
376
- firefoxLabsTitle: string;
365
+ firefoxLabsTitle?: string;
377
366
  }
378
367
  export interface DesktopTombstoneFeatureConfig {
379
368
  featureId: "unused-feature-id-for-legacy-support";
@@ -403,6 +392,19 @@ export interface ExperimentMultiFeatureMobileBranch {
403
392
  */
404
393
  features: ExperimentFeatureConfig[];
405
394
  }
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
+ }
406
408
  /**
407
409
  * The SDK-specific feature manifest.
408
410
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mozilla/nimbus-schemas",
3
- "version": "2024.10.2",
3
+ "version": "2024.11.2",
4
4
  "description": "Schemas used by Mozilla Nimbus and related projects.",
5
5
  "main": "index.d.ts",
6
6
  "repository": {
@@ -170,19 +170,12 @@
170
170
  "localizations": {
171
171
  "anyOf": [
172
172
  {
173
- "additionalProperties": {
174
- "additionalProperties": {
175
- "type": "string"
176
- },
177
- "type": "object"
178
- },
179
- "type": "object"
173
+ "$ref": "#/$defs/ExperimentLocalizations"
180
174
  },
181
175
  {
182
176
  "type": "null"
183
177
  }
184
- ],
185
- "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. Only supported on desktop."
178
+ ]
186
179
  },
187
180
  "locales": {
188
181
  "anyOf": [
@@ -344,6 +337,16 @@
344
337
  ],
345
338
  "type": "object"
346
339
  },
340
+ "ExperimentLocalizations": {
341
+ "additionalProperties": {
342
+ "additionalProperties": {
343
+ "type": "string"
344
+ },
345
+ "type": "object"
346
+ },
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. Only supported on desktop.",
348
+ "type": "object"
349
+ },
347
350
  "ExperimentMultiFeatureDesktopBranch": {
348
351
  "description": "The branch definition supported on Firefox Desktop 95+.",
349
352
  "properties": {
@@ -375,8 +378,7 @@
375
378
  "slug",
376
379
  "ratio",
377
380
  "features",
378
- "feature",
379
- "firefoxLabsTitle"
381
+ "feature"
380
382
  ],
381
383
  "type": "object"
382
384
  },