@mozilla/nimbus-schemas 2023.9.1 → 2023.9.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.
Files changed (2) hide show
  1. package/index.d.ts +68 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -60,6 +60,72 @@ export interface Outcome {
60
60
  metrics: string[];
61
61
  slug: string;
62
62
  }
63
+ export interface NimbusExperiment {
64
+ schemaVersion: string;
65
+ slug: string;
66
+ id: string;
67
+ appName: string;
68
+ appId: string;
69
+ channel: string;
70
+ userFacingName: string;
71
+ userFacingDescription: string;
72
+ isEnrollmentPaused: boolean;
73
+ isRollout?: boolean;
74
+ bucketConfig: ExperimentBucketConfig;
75
+ outcomes?: ExperimentOutcome[];
76
+ featureIds: string[];
77
+ branches: (
78
+ | ExperimentSingleFeatureBranch
79
+ | ExperimentMultiFeatureDesktopBranch
80
+ | ExperimentMultiFeatureMobileBranch
81
+ )[];
82
+ targeting?: string;
83
+ startDate?: string;
84
+ enrollmentEndDate?: string;
85
+ endDate?: string;
86
+ proposedDuration?: number;
87
+ proposedEnrollment?: number;
88
+ referenceBranch?: string;
89
+ featureValidationOptOut?: boolean;
90
+ localizations?: {
91
+ [k: string]: unknown;
92
+ };
93
+ locales?: string[];
94
+ }
95
+ export interface ExperimentBucketConfig {
96
+ randomizationUnit: string;
97
+ namespace: string;
98
+ start: number;
99
+ count: number;
100
+ total: number;
101
+ }
102
+ export interface ExperimentOutcome {
103
+ slug: string;
104
+ priority: string;
105
+ }
106
+ export interface ExperimentSingleFeatureBranch {
107
+ slug: string;
108
+ ratio: number;
109
+ feature: ExperimentFeatureConfig;
110
+ }
111
+ export interface ExperimentFeatureConfig {
112
+ featureId: string;
113
+ enabled?: boolean;
114
+ value: {
115
+ [k: string]: unknown;
116
+ };
117
+ }
118
+ export interface ExperimentMultiFeatureDesktopBranch {
119
+ slug: string;
120
+ ratio: number;
121
+ feature: ExperimentFeatureConfig;
122
+ features: ExperimentFeatureConfig[];
123
+ }
124
+ export interface ExperimentMultiFeatureMobileBranch {
125
+ slug: string;
126
+ ratio: number;
127
+ features: ExperimentFeatureConfig[];
128
+ }
63
129
  /**
64
130
  * `extra=Extra.allow` is needed for the pydantic2ts generation of
65
131
  * typescript definitions. Without this, models with only a custom
@@ -97,7 +163,8 @@ export interface SizingTarget {
97
163
  export interface SizingRecipe {
98
164
  app_id: string;
99
165
  channel: SizingReleaseChannel;
100
- locale: string;
166
+ locale?: string;
167
+ language?: string;
101
168
  country: string;
102
169
  new_or_existing: SizingUserType;
103
170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mozilla/nimbus-schemas",
3
- "version": "2023.9.1",
3
+ "version": "2023.9.3",
4
4
  "description": "Schemas used by Mozilla Nimbus and related projects.",
5
5
  "main": "index.d.ts",
6
6
  "repository": {