Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions schemas/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,14 @@ export interface SdkFeatureVariable {
* Only allowed when type is string.
*/
enum?: string[];
setPref?: SetPref1;
}
export interface SetPref1 {
branch: PrefBranch;
/**
* The name of the pref to set.
*/
pref: string;
}
export interface AnalysisError {
analysis_basis?: AnalysisBasis | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ class SdkFeatureVariable(BaseFeatureVariable):
default=None,
)

set_pref: SetPref | SkipJsonSchema[None] = Field(
alias="setPref",
description=(
"A pref that should be set to the value of this variable when enrolling.\n"
"\n"
"Only supported in Firefox for Android 152+.\n"
),
default=None,
)

model_config = ConfigDict(
json_schema_extra={
"dependentSchemas": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,3 +311,27 @@ zoom-feature:
status:
type: boolean
description: "Whether the page zoom feature is enabled or not\n"
pref-feature:
description: A feature with prefs
hasExposure: false
variables:
foo:
type: boolean
description: bool variable
setPref:
pref: test.foo
branch: user

bar:
type: string
description: string variable
setPref:
pref: test.bar
branch: default

baz:
type: int
description: int variable
setPref:
pref: test.baz
branch: user
28 changes: 28 additions & 0 deletions schemas/schemas/SdkFeatureManifest.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
],
"type": "string"
},
"PrefBranch": {
"enum": [
"default",
"user"
],
"type": "string"
},
"SdkFeature": {
"description": "A feature.",
"if": {
Expand Down Expand Up @@ -85,6 +92,10 @@
},
"type": "array"
},
"setPref": {
"$ref": "#/$defs/SetPref",
"description": "A pref that should be set to the value of this variable when enrolling. Only supported in Firefox for Android 152+. "
},
"type": {
"$ref": "#/$defs/FeatureVariableType",
"description": "The field type."
Expand All @@ -95,6 +106,23 @@
"type"
],
"type": "object"
},
"SetPref": {
"properties": {
"branch": {
"$ref": "#/$defs/PrefBranch",
"description": "The branch the pref will be set on. Prefs set on the user branch persists through restarts."
},
"pref": {
"description": "The name of the pref to set.",
"type": "string"
}
},
"required": [
"branch",
"pref"
],
"type": "object"
}
}
}
Loading