@mozilla/nimbus-schemas 2023.8.4 → 2023.9.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/index.d.ts +199 -0
- package/package.json +3 -3
package/index.d.ts
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
/* This file was automatically generated from pydantic models by running pydantic2ts.
|
|
5
|
+
/* Do not modify it by hand - just update the pydantic models and then re-run the script
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type AnalysisBasis = "enrollments" | "exposures";
|
|
9
|
+
export type LogSource = "jetstream" | "sizing" | "jetstream-preview";
|
|
10
|
+
export type AnalysisErrors = AnalysisError[];
|
|
11
|
+
export type SizingReleaseChannel = "release" | "beta" | "nightly";
|
|
12
|
+
export type SizingUserType = "new" | "existing";
|
|
13
|
+
export type Statistics = Statistic[];
|
|
14
|
+
|
|
15
|
+
export interface AnalysisError {
|
|
16
|
+
analysis_basis?: AnalysisBasis;
|
|
17
|
+
source?: LogSource;
|
|
18
|
+
exception?: string;
|
|
19
|
+
exception_type?: string;
|
|
20
|
+
experiment?: string;
|
|
21
|
+
filename: string;
|
|
22
|
+
func_name: string;
|
|
23
|
+
log_level: string;
|
|
24
|
+
message: string;
|
|
25
|
+
metric?: string;
|
|
26
|
+
segment?: string;
|
|
27
|
+
statistic?: string;
|
|
28
|
+
timestamp: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ExternalConfig {
|
|
31
|
+
reference_branch?: string;
|
|
32
|
+
end_date?: string;
|
|
33
|
+
start_date?: string;
|
|
34
|
+
enrollment_period?: number;
|
|
35
|
+
skip?: boolean;
|
|
36
|
+
url: string;
|
|
37
|
+
}
|
|
38
|
+
export interface Metadata {
|
|
39
|
+
analysis_start_time?: string;
|
|
40
|
+
external_config?: ExternalConfig;
|
|
41
|
+
metrics: {
|
|
42
|
+
[k: string]: Metric;
|
|
43
|
+
};
|
|
44
|
+
outcomes?: {
|
|
45
|
+
[k: string]: Outcome;
|
|
46
|
+
};
|
|
47
|
+
schema_version?: number;
|
|
48
|
+
}
|
|
49
|
+
export interface Metric {
|
|
50
|
+
analysis_bases: AnalysisBasis[];
|
|
51
|
+
bigger_is_better: boolean;
|
|
52
|
+
description?: string;
|
|
53
|
+
friendly_name?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface Outcome {
|
|
56
|
+
commit_hash?: string;
|
|
57
|
+
default_metrics: string[];
|
|
58
|
+
description: string;
|
|
59
|
+
friendly_name: string;
|
|
60
|
+
metrics: string[];
|
|
61
|
+
slug: string;
|
|
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
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* `extra=Extra.allow` is needed for the pydantic2ts generation of
|
|
131
|
+
* typescript definitions. Without this, models with only a custom
|
|
132
|
+
* __root__ dictionary field will generate as empty types.
|
|
133
|
+
*
|
|
134
|
+
* See https://github.com/phillipdupuis/pydantic-to-typescript/blob/master/pydantic2ts/cli/script.py#L150-L153
|
|
135
|
+
* and https://github.com/phillipdupuis/pydantic-to-typescript/issues/39
|
|
136
|
+
* for more info.
|
|
137
|
+
*
|
|
138
|
+
* If this is fixed we should remove `extra=Extra.allow`.
|
|
139
|
+
*/
|
|
140
|
+
export interface SampleSizes {
|
|
141
|
+
[k: string]: SizingByUserType;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* `extra=Extra.allow` is needed for the pydantic2ts generation of
|
|
145
|
+
* typescript definitions. Without this, models with only a custom
|
|
146
|
+
* __root__ dictionary field will generate as empty types.
|
|
147
|
+
*
|
|
148
|
+
* See https://github.com/phillipdupuis/pydantic-to-typescript/blob/master/pydantic2ts/cli/script.py#L150-L153
|
|
149
|
+
* and https://github.com/phillipdupuis/pydantic-to-typescript/issues/39
|
|
150
|
+
* for more info.
|
|
151
|
+
*
|
|
152
|
+
* If this is fixed we should remove `extra=Extra.allow`.
|
|
153
|
+
*/
|
|
154
|
+
export interface SizingByUserType {
|
|
155
|
+
[k: string]: SizingTarget;
|
|
156
|
+
}
|
|
157
|
+
export interface SizingTarget {
|
|
158
|
+
target_recipe: SizingRecipe;
|
|
159
|
+
sample_sizes: {
|
|
160
|
+
[k: string]: SizingDetails;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
export interface SizingRecipe {
|
|
164
|
+
app_id: string;
|
|
165
|
+
channel: SizingReleaseChannel;
|
|
166
|
+
locale: string;
|
|
167
|
+
country: string;
|
|
168
|
+
new_or_existing: SizingUserType;
|
|
169
|
+
}
|
|
170
|
+
export interface SizingDetails {
|
|
171
|
+
metrics: {
|
|
172
|
+
[k: string]: SizingMetric;
|
|
173
|
+
};
|
|
174
|
+
parameters: SizingParameters;
|
|
175
|
+
}
|
|
176
|
+
export interface SizingMetric {
|
|
177
|
+
number_of_clients_targeted: number;
|
|
178
|
+
sample_size_per_branch: number;
|
|
179
|
+
population_percent_per_branch: number;
|
|
180
|
+
}
|
|
181
|
+
export interface SizingParameters {
|
|
182
|
+
power: number;
|
|
183
|
+
effect_size: number;
|
|
184
|
+
}
|
|
185
|
+
export interface Statistic {
|
|
186
|
+
metric: string;
|
|
187
|
+
statistic: string;
|
|
188
|
+
branch: string;
|
|
189
|
+
parameter?: number;
|
|
190
|
+
comparison?: string;
|
|
191
|
+
comparison_to_branch?: string;
|
|
192
|
+
ci_width?: number;
|
|
193
|
+
point?: number;
|
|
194
|
+
lower?: number;
|
|
195
|
+
upper?: number;
|
|
196
|
+
segment?: string;
|
|
197
|
+
analysis_basis?: AnalysisBasis;
|
|
198
|
+
window_index?: string;
|
|
199
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mozilla/nimbus-schemas",
|
|
3
|
-
"version": "2023.
|
|
3
|
+
"version": "2023.9.2",
|
|
4
4
|
"description": "Schemas used by Mozilla Nimbus and related projects.",
|
|
5
|
-
"main": "index.ts",
|
|
5
|
+
"main": "index.d.ts",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/mozilla/experimenter.git"
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"typescript": "^5.1.6"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
|
-
"index.ts"
|
|
21
|
+
"index.d.ts"
|
|
22
22
|
]
|
|
23
23
|
}
|