Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mozilla/nimbus-shared

Package Overview
Dependencies
Maintainers
15
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mozilla/nimbus-shared - npm Package Compare versions

Comparing version 1.10.0 to 2.0.0

dist/types/messaging.d.ts

89

dist/data.json

@@ -229,2 +229,91 @@ {

},
"desktop-113-localizations": {
"appId": "firefox-desktop",
"appName": "firefox_desktop",
"application": "firefox-desktop",
"arguments": {},
"branches": [
{
"feature": {
"featureId": "unused-feature-id-for-legacy-support",
"enabled": false,
"value": {}
},
"features": [
{
"featureId": "nimbus-qa-1",
"value": {
"value": {
"$l10n": {
"id": "control-text",
"text": "English text",
"comment": "Text for the control branch."
}
}
}
}
],
"ratio": 1,
"slug": "control"
},
{
"feature": {
"featureId": "unused-feature-id-for-legacy-support",
"enabled": false,
"value": {}
},
"features": [
{
"featureId": "nimbus-qa-1",
"value": {
"value": {
"$l10n": {
"id": "treatment-text",
"text": "More English text",
"comment": "Text for the treatment branch."
}
}
}
}
],
"ratio": 1,
"slug": "treatment"
}
],
"bucketConfig": {
"count": 10000,
"namespace": "firefox-desktop-localization-test",
"randomizationUnit": "normandy_id",
"start": 0,
"total": 10000
},
"channel": "nightly",
"endDate": null,
"featureIds": [
"nimbus-qa-1"
],
"id": "firefox-desktop-localization-test",
"isEnrollmentPaused": false,
"outcomes": [],
"probeSets": [],
"proposedDuration": 63,
"proposedEnrollment": 7,
"referenceBranch": "control",
"schemaVersion": "1.7.1",
"slug": "firefox-desktop-localization-test",
"startDate": "2021-10-26",
"targeting": "true",
"userFacingDescription": "Test data for a localized experiment",
"userFacingName": "MR2 Upgrade Spotlight Holdback",
"localizations": {
"en-US": {
"control-text": "English text",
"treatment-test": "More English text"
},
"fr": {
"control-text": "Texte en français",
"treatment-text": "Plus de texte en français"
}
}
},
"desktop-90": {

@@ -231,0 +320,0 @@ "appId": "firefox-desktop",

@@ -179,2 +179,62 @@ export declare const data: {

};
"desktop-113-localizations": {
appId: string;
appName: string;
application: string;
arguments: {};
branches: {
feature: {
featureId: string;
enabled: boolean;
value: {};
};
features: {
featureId: string;
value: {
value: {
$l10n: {
id: string;
text: string;
comment: string;
};
};
};
}[];
ratio: number;
slug: string;
}[];
bucketConfig: {
count: number;
namespace: string;
randomizationUnit: string;
start: number;
total: number;
};
channel: string;
endDate: null;
featureIds: string[];
id: string;
isEnrollmentPaused: boolean;
outcomes: never[];
probeSets: never[];
proposedDuration: number;
proposedEnrollment: number;
referenceBranch: string;
schemaVersion: string;
slug: string;
startDate: string;
targeting: string;
userFacingDescription: string;
userFacingName: string;
localizations: {
"en-US": {
"control-text": string;
"treatment-test": string;
};
fr: {
"control-text": string;
"treatment-text": string;
};
};
};
"desktop-90": {

@@ -181,0 +241,0 @@ appId: string;

@@ -104,2 +104,44 @@ "use strict";

], "id": "mr2-upgrade-spotlight-holdback", "isEnrollmentPaused": false, "outcomes": [], "probeSets": [], "proposedDuration": 63, "proposedEnrollment": 7, "referenceBranch": "control", "schemaVersion": "1.7.1", "slug": "firefox-desktop-multifeature-test", "startDate": "2021-10-26", "targeting": "true", "userFacingDescription": "Experimenting on onboarding content when you upgrade Firefox.", "userFacingName": "MR2 Upgrade Spotlight Holdback", "featureValidationOptOut": true
}, "desktop-113-localizations": {
"appId": "firefox-desktop", "appName": "firefox_desktop", "application": "firefox-desktop", "arguments": {}, "branches": [
{
"feature": {
"featureId": "unused-feature-id-for-legacy-support", "enabled": false, "value": {}
}, "features": [
{
"featureId": "nimbus-qa-1", "value": {
"value": {
"$l10n": {
"id": "control-text", "text": "English text", "comment": "Text for the control branch."
}
}
}
}
], "ratio": 1, "slug": "control"
}, {
"feature": {
"featureId": "unused-feature-id-for-legacy-support", "enabled": false, "value": {}
}, "features": [
{
"featureId": "nimbus-qa-1", "value": {
"value": {
"$l10n": {
"id": "treatment-text", "text": "More English text", "comment": "Text for the treatment branch."
}
}
}
}
], "ratio": 1, "slug": "treatment"
}
], "bucketConfig": {
"count": 10000, "namespace": "firefox-desktop-localization-test", "randomizationUnit": "normandy_id", "start": 0, "total": 10000
}, "channel": "nightly", "endDate": null, "featureIds": [
"nimbus-qa-1"
], "id": "firefox-desktop-localization-test", "isEnrollmentPaused": false, "outcomes": [], "probeSets": [], "proposedDuration": 63, "proposedEnrollment": 7, "referenceBranch": "control", "schemaVersion": "1.7.1", "slug": "firefox-desktop-localization-test", "startDate": "2021-10-26", "targeting": "true", "userFacingDescription": "Test data for a localized experiment", "userFacingName": "MR2 Upgrade Spotlight Holdback", "localizations": {
"en-US": {
"control-text": "English text", "treatment-test": "More English text"
}, "fr": {
"control-text": "Texte en fran\u00E7ais", "treatment-text": "Plus de texte en fran\u00E7ais"
}
}
}, "desktop-90": {

@@ -106,0 +148,0 @@ "appId": "firefox-desktop", "appName": "firefox_desktop", "application": "firefox-desktop", "arguments": {}, "branches": [

634

dist/src/_generated/schemas.d.ts

@@ -0,1 +1,51 @@

export declare const test: {
FoodColors: {
$schema: string;
$ref: string;
definitions: {
FoodColors: {
type: string;
properties: {
slug: {
type: string;
};
food: {
type: string;
additionalProperties: {
type: string;
};
};
};
required: string[];
};
};
};
};
export declare const targeting: {
Audience: {
$schema: string;
$ref: string;
definitions: {
Audience: {
type: string;
properties: {
name: {
type: string;
};
description: {
type: string;
};
targeting: {
type: string;
};
desktop_telemetry: {
type: string;
description: string;
};
};
required: string[];
};
};
};
};
export declare const experiments: {

@@ -271,2 +321,12 @@ NimbusExperiment: {

};
localizations: {
type: string;
additionalProperties: {
type: string;
additionalProperties: {
type: string;
};
};
description: string;
};
};

@@ -356,2 +416,186 @@ required: string[];

export declare const normandy: {
ConsoleLogArguments: {
$schema: string;
$ref: string;
definitions: {
ConsoleLogArguments: {
type: string;
properties: {
message: {
type: string;
description: string;
};
};
required: string[];
description: string;
};
};
};
PreferenceRollbackArguments: {
$schema: string;
$ref: string;
definitions: {
PreferenceRollbackArguments: {
type: string;
properties: {
rolloutSlug: {
type: string;
description: string;
};
};
required: string[];
description: string;
};
};
};
PreferenceExperimentArguments: {
$schema: string;
$ref: string;
definitions: {
PreferenceExperimentArguments: {
type: string;
properties: {
branches: {
type: string;
items: {
type: string;
properties: {
slug: {
type: string;
description: string;
pattern: string;
};
value: {
type: string[];
description: string;
};
ratio: {
type: string;
description: string;
minimum: number;
};
};
required: string[];
description: string;
};
description: string;
minItems: number;
};
preferenceName: {
type: string;
description: string;
};
preferenceType: {
type: string;
enum: string[];
description: string;
};
preferenceBranchType: {
type: string;
enum: string[];
description: string;
};
slug: {
type: string;
description: string;
pattern: string;
};
experimentDocumentUrl: {
type: string;
description: string;
default: {}[];
format: string;
};
isEnrollmentPaused: {
type: string;
description: string;
default: boolean;
};
isHighVolume: {
type: string;
description: string;
default: boolean;
};
};
required: string[];
description: string;
};
};
};
ShowHeartbeatArguments: {
$schema: string;
$ref: string;
definitions: {
ShowHeartbeatArguments: {
type: string;
properties: {
surveyId: {
type: string;
description: string;
};
message: {
type: string;
description: string;
};
learnMoreMessage: {
type: string;
description: string;
};
learnMoreUrl: {
type: string;
description: string;
};
postAnswerUrl: {
type: string;
description: string;
};
thanksMessage: {
type: string;
description: string;
};
engagementButtonLabel: {
type: string;
description: string;
};
includeTelemetryUUID: {
type: string;
description: string;
};
repeatOption: {
type: string;
enum: string[];
description: string;
};
repeatEvery: {
type: string;
description: string;
};
};
required: string[];
description: string;
};
};
};
AddonRolloutArguments: {
$schema: string;
$ref: string;
definitions: {
AddonRolloutArguments: {
type: string;
properties: {
slug: {
type: string;
description: string;
pattern: string;
};
extensionApiId: {
type: string;
description: string;
};
};
required: string[];
description: string;
};
};
};
NormandyRecipe: {

@@ -806,56 +1050,2 @@ $schema: string;

};
ShowHeartbeatArguments: {
$schema: string;
$ref: string;
definitions: {
ShowHeartbeatArguments: {
type: string;
properties: {
surveyId: {
type: string;
description: string;
};
message: {
type: string;
description: string;
};
learnMoreMessage: {
type: string;
description: string;
};
learnMoreUrl: {
type: string;
description: string;
};
postAnswerUrl: {
type: string;
description: string;
};
thanksMessage: {
type: string;
description: string;
};
engagementButtonLabel: {
type: string;
description: string;
};
includeTelemetryUUID: {
type: string;
description: string;
};
repeatOption: {
type: string;
enum: string[];
description: string;
};
repeatEvery: {
type: string;
description: string;
};
};
required: string[];
description: string;
};
};
};
PreferenceRolloutArguments: {

@@ -897,26 +1087,24 @@ $schema: string;

};
PreferenceRollbackArguments: {
MessagingExperimentArguments: {
$schema: string;
$ref: string;
definitions: {
PreferenceRollbackArguments: {
MessagingExperimentArguments: {
type: string;
properties: {
rolloutSlug: {
slug: {
type: string;
description: string;
pattern: string;
};
};
required: string[];
description: string;
};
};
};
PreferenceExperimentArguments: {
$schema: string;
$ref: string;
definitions: {
PreferenceExperimentArguments: {
type: string;
properties: {
userFacingName: {
type: string;
description: string;
minLength: number;
};
userFacingDescription: {
type: string;
description: string;
minLength: number;
};
branches: {

@@ -930,8 +1118,3 @@ type: string;

description: string;
pattern: string;
};
value: {
type: string[];
description: string;
};
ratio: {

@@ -942,2 +1125,14 @@ type: string;

};
groups: {
type: string;
items: {
type: string;
};
description: string;
};
value: {
type: string;
additionalProperties: {};
description: string;
};
};

@@ -948,28 +1143,8 @@ required: string[];

description: string;
minItems: number;
};
preferenceName: {
type: string;
description: string;
};
preferenceType: {
type: string;
enum: string[];
description: string;
};
preferenceBranchType: {
type: string;
enum: string[];
description: string;
};
slug: {
type: string;
description: string;
pattern: string;
};
experimentDocumentUrl: {
type: string;
description: string;
default: {}[];
format: string;
default: string;
};

@@ -981,7 +1156,2 @@ isEnrollmentPaused: {

};
isHighVolume: {
type: string;
description: string;
default: boolean;
};
};

@@ -993,10 +1163,10 @@ required: string[];

};
OptOutStudyArguments: {
BranchedAddonStudyArguments: {
$schema: string;
$ref: string;
definitions: {
OptOutStudyArguments: {
BranchedAddonStudyArguments: {
type: string;
properties: {
addonUrl: {
slug: {
type: string;

@@ -1006,3 +1176,3 @@ description: string;

};
name: {
userFacingName: {
type: string;

@@ -1012,3 +1182,3 @@ description: string;

};
description: {
userFacingDescription: {
type: string;

@@ -1018,5 +1188,25 @@ description: string;

};
extensionApiId: {
branches: {
type: string;
items: {
type: string;
properties: {
slug: {
type: string;
description: string;
};
ratio: {
type: string;
description: string;
};
extensionApiId: {
type: string;
description: string;
};
};
required: string[];
description: string;
};
description: string;
minItems: number;
};

@@ -1026,2 +1216,3 @@ isEnrollmentPaused: {

description: string;
default: boolean;
};

@@ -1034,2 +1225,20 @@ };

};
AddonRollbackArguments: {
$schema: string;
$ref: string;
definitions: {
AddonRollbackArguments: {
type: string;
properties: {
rolloutSlug: {
type: string;
description: string;
pattern: string;
};
};
required: string[];
description: string;
};
};
};
MultiPreferenceExperimentArguments: {

@@ -1128,20 +1337,15 @@ $schema: string;

};
MessagingExperimentArguments: {
OptOutStudyArguments: {
$schema: string;
$ref: string;
definitions: {
MessagingExperimentArguments: {
OptOutStudyArguments: {
type: string;
properties: {
slug: {
addonUrl: {
type: string;
description: string;
pattern: string;
};
userFacingName: {
type: string;
description: string;
minLength: number;
};
userFacingDescription: {
name: {
type: string;

@@ -1151,101 +1355,14 @@ description: string;

};
branches: {
description: {
type: string;
items: {
type: string;
properties: {
slug: {
type: string;
description: string;
};
ratio: {
type: string;
description: string;
minimum: number;
};
groups: {
type: string;
items: {
type: string;
};
description: string;
};
value: {
type: string;
additionalProperties: {};
description: string;
};
};
required: string[];
description: string;
};
description: string;
};
experimentDocumentUrl: {
type: string;
description: string;
format: string;
default: string;
};
isEnrollmentPaused: {
type: string;
description: string;
default: boolean;
};
};
required: string[];
description: string;
};
};
};
BranchedAddonStudyArguments: {
$schema: string;
$ref: string;
definitions: {
BranchedAddonStudyArguments: {
type: string;
properties: {
slug: {
type: string;
description: string;
minLength: number;
};
userFacingName: {
extensionApiId: {
type: string;
description: string;
minLength: number;
};
userFacingDescription: {
type: string;
description: string;
minLength: number;
};
branches: {
type: string;
items: {
type: string;
properties: {
slug: {
type: string;
description: string;
};
ratio: {
type: string;
description: string;
};
extensionApiId: {
type: string;
description: string;
};
};
required: string[];
description: string;
};
description: string;
minItems: number;
};
isEnrollmentPaused: {
type: string;
description: string;
default: boolean;
};

@@ -1258,109 +1375,2 @@ };

};
AddonRolloutArguments: {
$schema: string;
$ref: string;
definitions: {
AddonRolloutArguments: {
type: string;
properties: {
slug: {
type: string;
description: string;
pattern: string;
};
extensionApiId: {
type: string;
description: string;
};
};
required: string[];
description: string;
};
};
};
AddonRollbackArguments: {
$schema: string;
$ref: string;
definitions: {
AddonRollbackArguments: {
type: string;
properties: {
rolloutSlug: {
type: string;
description: string;
pattern: string;
};
};
required: string[];
description: string;
};
};
};
ConsoleLogArguments: {
$schema: string;
$ref: string;
definitions: {
ConsoleLogArguments: {
type: string;
properties: {
message: {
type: string;
description: string;
};
};
required: string[];
description: string;
};
};
};
};
export declare const targeting: {
Audience: {
$schema: string;
$ref: string;
definitions: {
Audience: {
type: string;
properties: {
name: {
type: string;
};
description: {
type: string;
};
targeting: {
type: string;
};
desktop_telemetry: {
type: string;
description: string;
};
};
required: string[];
};
};
};
};
export declare const test: {
FoodColors: {
$schema: string;
$ref: string;
definitions: {
FoodColors: {
type: string;
properties: {
slug: {
type: string;
};
food: {
type: string;
additionalProperties: {
type: string;
};
};
};
required: string[];
};
};
};
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.test = exports.targeting = exports.normandy = exports.features = exports.experiments = void 0;
exports.normandy = exports.features = exports.experiments = exports.targeting = exports.test = void 0;
exports.test = {
"FoodColors": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/FoodColors", "definitions": {
"FoodColors": {
"type": "object", "properties": {
"slug": {
"type": "string"
}, "food": {
"type": "object", "additionalProperties": {
"type": "string"
}
}
}, "required": [
"slug", "food"
]
}
}
}
};
exports.targeting = {
"Audience": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/Audience", "definitions": {
"Audience": {
"type": "object", "properties": {
"name": {
"type": "string"
}, "description": {
"type": "string"
}, "targeting": {
"type": "string"
}, "desktop_telemetry": {
"type": "string", "description": "A boolean BigQuery SQL expression expressing whether a single row in telemetry.main would have matched the audience definition. These are used for sizing experiment populations, not for targeting."
}
}, "required": [
"name", "description"
]
}
}
}
};
exports.experiments = {

@@ -173,2 +213,8 @@ "NimbusExperiment": {

"type": "boolean", "description": "Opt out of feature schema validation. Only supported on desktop."
}, "localizations": {
"type": "object", "additionalProperties": {
"type": "object", "additionalProperties": {
"type": "string"
}
}, "description": "Per-locale localization substitutions.\n\nThe top level key is the locale (e.g., \"en-US\" or \"fr\"). Each entry is a mapping of string IDs to their localized equivalents.\n\nOnly supported on desktop."
}

@@ -234,3 +280,119 @@ }, "required": [

exports.normandy = {
"NormandyRecipe": {
"ConsoleLogArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/ConsoleLogArguments", "definitions": {
"ConsoleLogArguments": {
"type": "object", "properties": {
"message": {
"type": "string", "description": "Message to log to the console"
}
}, "required": [
"message"
], "description": "Log a message to the console"
}
}
}, "PreferenceRollbackArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/PreferenceRollbackArguments", "definitions": {
"PreferenceRollbackArguments": {
"type": "object", "properties": {
"rolloutSlug": {
"type": "string", "description": "Unique identifier for the rollout to undo"
}
}, "required": [
"rolloutSlug"
], "description": "Undo a preference rollout"
}
}
}, "PreferenceExperimentArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/PreferenceExperimentArguments", "definitions": {
"PreferenceExperimentArguments": {
"type": "object", "properties": {
"branches": {
"type": "array", "items": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for this branch of the experiment.", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "value": {
"type": [
"number", "string", "boolean"
], "description": "Value to set the preference to for this branch"
}, "ratio": {
"type": "number", "description": "Ratio of users who should be grouped into this branch.", "minimum": 1
}
}, "required": [
"slug", "value", "ratio"
], "description": "A branch in a preference experiment"
}, "description": "List of experimental branches", "minItems": 1
}, "preferenceName": {
"type": "string", "description": "Full dotted path of the preference that controls this experiment"
}, "preferenceType": {
"type": "string", "enum": [
"string", "integer", "boolean"
], "description": "Data type of the preference that controls this experiment"
}, "preferenceBranchType": {
"type": "string", "enum": [
"user", "default"
], "description": "Controls whether the default or user value of the preference is modified."
}, "slug": {
"type": "string", "description": "Unique identifier for this experiment", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "experimentDocumentUrl": {
"type": "string", "description": "URL of a document describing the experiment", "default": [
{}
], "format": "uri"
}, "isEnrollmentPaused": {
"type": "boolean", "description": "If true, new users will not be enrolled in the study.", "default": false
}, "isHighVolume": {
"type": "boolean", "description": "If true, marks the preference as a high population experiment that should be excluded from certain types of telemetry.", "default": false
}
}, "required": [
"branches", "preferenceName", "preferenceType", "preferenceBranchType", "slug", "experimentDocumentUrl"
], "description": "Run a feature experiment activated by a preference"
}
}
}, "ShowHeartbeatArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/ShowHeartbeatArguments", "definitions": {
"ShowHeartbeatArguments": {
"type": "object", "properties": {
"surveyId": {
"type": "string", "description": "Slug unique identifying this survey in telemetry"
}, "message": {
"type": "string", "description": "Message to show to the user"
}, "learnMoreMessage": {
"type": "string", "description": "Text to display in the \"learn more\" link"
}, "learnMoreUrl": {
"type": "string", "description": "URL to show to the user when the click the \"learn more\" link"
}, "postAnswerUrl": {
"type": "string", "description": "URL to redirect the user to after rating Firefox or clicking the engagement button"
}, "thanksMessage": {
"type": "string", "description": "Thanks message to show to the user after they've rated Firefox"
}, "engagementButtonLabel": {
"type": "string", "description": "Text for the engagement button.\n\nIf specified, this button will be shown instead of rating stars."
}, "includeTelemetryUUID": {
"type": "boolean", "description": "Include unique user ID in post-answer-url and Telemetry"
}, "repeatOption": {
"type": "string", "enum": [
"once", "xdays", "nag"
], "description": "Determines how often a prompt is shown executes"
}, "repeatEvery": {
"type": "number", "description": "For repeatOption=xdays, how often (in days) the prompt is displayed"
}
}, "required": [
"surveyId", "message", "learnMoreMessage", "learnMoreUrl", "postAnswerUrl", "thanksMessage"
], "description": "This action shows a single survey"
}
}
}, "AddonRolloutArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/AddonRolloutArguments", "definitions": {
"AddonRolloutArguments": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for the rollout, used in telemetry and rollbacks", "pattern": "^[a-z0-9\\-_]+$"
}, "extensionApiId": {
"type": "number", "description": "The record ID of the extension used for Normandy API calls"
}
}, "required": [
"slug", "extensionApiId"
], "description": "Install an add-on permanently"
}
}
}, "NormandyRecipe": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/NormandyRecipe", "definitions": {

@@ -523,34 +685,2 @@ "NormandyRecipe": {

}
}, "ShowHeartbeatArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/ShowHeartbeatArguments", "definitions": {
"ShowHeartbeatArguments": {
"type": "object", "properties": {
"surveyId": {
"type": "string", "description": "Slug unique identifying this survey in telemetry"
}, "message": {
"type": "string", "description": "Message to show to the user"
}, "learnMoreMessage": {
"type": "string", "description": "Text to display in the \"learn more\" link"
}, "learnMoreUrl": {
"type": "string", "description": "URL to show to the user when the click the \"learn more\" link"
}, "postAnswerUrl": {
"type": "string", "description": "URL to redirect the user to after rating Firefox or clicking the engagement button"
}, "thanksMessage": {
"type": "string", "description": "Thanks message to show to the user after they've rated Firefox"
}, "engagementButtonLabel": {
"type": "string", "description": "Text for the engagement button.\n\nIf specified, this button will be shown instead of rating stars."
}, "includeTelemetryUUID": {
"type": "boolean", "description": "Include unique user ID in post-answer-url and Telemetry"
}, "repeatOption": {
"type": "string", "enum": [
"once", "xdays", "nag"
], "description": "Determines how often a prompt is shown executes"
}, "repeatEvery": {
"type": "number", "description": "For repeatOption=xdays, how often (in days) the prompt is displayed"
}
}, "required": [
"surveyId", "message", "learnMoreMessage", "learnMoreUrl", "postAnswerUrl", "thanksMessage"
], "description": "This action shows a single survey"
}
}
}, "PreferenceRolloutArguments": {

@@ -582,136 +712,2 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/PreferenceRolloutArguments", "definitions": {

}
}, "PreferenceRollbackArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/PreferenceRollbackArguments", "definitions": {
"PreferenceRollbackArguments": {
"type": "object", "properties": {
"rolloutSlug": {
"type": "string", "description": "Unique identifier for the rollout to undo"
}
}, "required": [
"rolloutSlug"
], "description": "Undo a preference rollout"
}
}
}, "PreferenceExperimentArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/PreferenceExperimentArguments", "definitions": {
"PreferenceExperimentArguments": {
"type": "object", "properties": {
"branches": {
"type": "array", "items": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for this branch of the experiment.", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "value": {
"type": [
"number", "string", "boolean"
], "description": "Value to set the preference to for this branch"
}, "ratio": {
"type": "number", "description": "Ratio of users who should be grouped into this branch.", "minimum": 1
}
}, "required": [
"slug", "value", "ratio"
], "description": "A branch in a preference experiment"
}, "description": "List of experimental branches", "minItems": 1
}, "preferenceName": {
"type": "string", "description": "Full dotted path of the preference that controls this experiment"
}, "preferenceType": {
"type": "string", "enum": [
"string", "integer", "boolean"
], "description": "Data type of the preference that controls this experiment"
}, "preferenceBranchType": {
"type": "string", "enum": [
"user", "default"
], "description": "Controls whether the default or user value of the preference is modified."
}, "slug": {
"type": "string", "description": "Unique identifier for this experiment", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "experimentDocumentUrl": {
"type": "string", "description": "URL of a document describing the experiment", "default": [
{}
], "format": "uri"
}, "isEnrollmentPaused": {
"type": "boolean", "description": "If true, new users will not be enrolled in the study.", "default": false
}, "isHighVolume": {
"type": "boolean", "description": "If true, marks the preference as a high population experiment that should be excluded from certain types of telemetry.", "default": false
}
}, "required": [
"branches", "preferenceName", "preferenceType", "preferenceBranchType", "slug", "experimentDocumentUrl"
], "description": "Run a feature experiment activated by a preference"
}
}
}, "OptOutStudyArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/OptOutStudyArguments", "definitions": {
"OptOutStudyArguments": {
"type": "object", "properties": {
"addonUrl": {
"type": "string", "description": "URL of the add-on XPI file to install", "minLength": 1
}, "name": {
"type": "string", "description": "User-facing name of the study", "minLength": 1
}, "description": {
"type": "string", "description": "User-facing description of the study", "minLength": 1
}, "extensionApiId": {
"type": "number", "description": "The record ID of the extension used for Normandy API calls."
}, "isEnrollmentPaused": {
"type": "boolean", "description": "If true, new users will not be enrolled in the study"
}
}, "required": [
"addonUrl", "name", "description", "extensionApiId"
], "description": "Enroll a user in an opt-out add-on study"
}
}
}, "MultiPreferenceExperimentArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/MultiPreferenceExperimentArguments", "definitions": {
"MultiPreferenceExperimentArguments": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for this experiment", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "userFacingDescription": {
"type": "string", "description": "User-facing name of the experiment", "minLength": 1
}, "userFacingName": {
"type": "string", "description": "User-facing description of the experiment", "minLength": 1
}, "branches": {
"type": "array", "items": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for this branch of the experiment", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "ratio": {
"type": "number", "description": "Ratio of users that should be grouped into this branch"
}, "preferences": {
"type": "object", "additionalProperties": {
"type": "object", "properties": {
"preferenceValue": {
"type": [
"number", "string", "boolean"
], "description": "Value for this preference when this branch is chosen"
}, "preferenceBranchType": {
"type": "string", "enum": [
"user", "default"
], "description": "Data type of the preference that controls this experiment"
}, "preferenceType": {
"type": "string", "enum": [
"string", "integer", "boolean"
], "description": "Data type of the preference that controls this experiment"
}
}, "required": [
"preferenceValue", "preferenceBranchType", "preferenceType"
]
}, "description": "The set of preferences to be set if this branch is chosen"
}
}, "required": [
"slug", "ratio", "preferences"
], "description": "A branch in a multi-preference experiment"
}, "description": "List of experimental branches", "minItems": 1
}, "experimentDocumentUrl": {
"type": "string", "description": "URL of a document describing the experiment", "format": "uri", "default": ""
}, "isHighPopulation": {
"type": "boolean", "description": "Marks the preference experiment as a high population experiment, that should be excluded from certain types of telemetry.", "default": false
}, "isHighVolume": {
"type": "boolean", "description": "Incorrect version of `isHighPopulation`. Included here for compatibility, but should not be used."
}, "isEnrollmentPaused": {
"type": "boolean", "description": "If true, new users will not be enrolled in the study.", "default": false
}
}, "required": [
"slug", "userFacingDescription", "userFacingName", "branches"
], "description": "Run a feature experiment activated by a set of preferences"
}
}
}, "MessagingExperimentArguments": {

@@ -787,16 +783,2 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/MessagingExperimentArguments", "definitions": {

}
}, "AddonRolloutArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/AddonRolloutArguments", "definitions": {
"AddonRolloutArguments": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for the rollout, used in telemetry and rollbacks", "pattern": "^[a-z0-9\\-_]+$"
}, "extensionApiId": {
"type": "number", "description": "The record ID of the extension used for Normandy API calls"
}
}, "required": [
"slug", "extensionApiId"
], "description": "Install an add-on permanently"
}
}
}, "AddonRollbackArguments": {

@@ -814,33 +796,76 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/AddonRollbackArguments", "definitions": {

}
}, "ConsoleLogArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/ConsoleLogArguments", "definitions": {
"ConsoleLogArguments": {
}, "MultiPreferenceExperimentArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/MultiPreferenceExperimentArguments", "definitions": {
"MultiPreferenceExperimentArguments": {
"type": "object", "properties": {
"message": {
"type": "string", "description": "Message to log to the console"
"slug": {
"type": "string", "description": "Unique identifier for this experiment", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "userFacingDescription": {
"type": "string", "description": "User-facing name of the experiment", "minLength": 1
}, "userFacingName": {
"type": "string", "description": "User-facing description of the experiment", "minLength": 1
}, "branches": {
"type": "array", "items": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for this branch of the experiment", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "ratio": {
"type": "number", "description": "Ratio of users that should be grouped into this branch"
}, "preferences": {
"type": "object", "additionalProperties": {
"type": "object", "properties": {
"preferenceValue": {
"type": [
"number", "string", "boolean"
], "description": "Value for this preference when this branch is chosen"
}, "preferenceBranchType": {
"type": "string", "enum": [
"user", "default"
], "description": "Data type of the preference that controls this experiment"
}, "preferenceType": {
"type": "string", "enum": [
"string", "integer", "boolean"
], "description": "Data type of the preference that controls this experiment"
}
}, "required": [
"preferenceValue", "preferenceBranchType", "preferenceType"
]
}, "description": "The set of preferences to be set if this branch is chosen"
}
}, "required": [
"slug", "ratio", "preferences"
], "description": "A branch in a multi-preference experiment"
}, "description": "List of experimental branches", "minItems": 1
}, "experimentDocumentUrl": {
"type": "string", "description": "URL of a document describing the experiment", "format": "uri", "default": ""
}, "isHighPopulation": {
"type": "boolean", "description": "Marks the preference experiment as a high population experiment, that should be excluded from certain types of telemetry.", "default": false
}, "isHighVolume": {
"type": "boolean", "description": "Incorrect version of `isHighPopulation`. Included here for compatibility, but should not be used."
}, "isEnrollmentPaused": {
"type": "boolean", "description": "If true, new users will not be enrolled in the study.", "default": false
}
}, "required": [
"message"
], "description": "Log a message to the console"
"slug", "userFacingDescription", "userFacingName", "branches"
], "description": "Run a feature experiment activated by a set of preferences"
}
}
}
};
exports.targeting = {
"Audience": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/Audience", "definitions": {
"Audience": {
}, "OptOutStudyArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/OptOutStudyArguments", "definitions": {
"OptOutStudyArguments": {
"type": "object", "properties": {
"name": {
"type": "string"
"addonUrl": {
"type": "string", "description": "URL of the add-on XPI file to install", "minLength": 1
}, "name": {
"type": "string", "description": "User-facing name of the study", "minLength": 1
}, "description": {
"type": "string"
}, "targeting": {
"type": "string"
}, "desktop_telemetry": {
"type": "string", "description": "A boolean BigQuery SQL expression expressing whether a single row in telemetry.main would have matched the audience definition. These are used for sizing experiment populations, not for targeting."
"type": "string", "description": "User-facing description of the study", "minLength": 1
}, "extensionApiId": {
"type": "number", "description": "The record ID of the extension used for Normandy API calls."
}, "isEnrollmentPaused": {
"type": "boolean", "description": "If true, new users will not be enrolled in the study"
}
}, "required": [
"name", "description"
]
"addonUrl", "name", "description", "extensionApiId"
], "description": "Enroll a user in an opt-out add-on study"
}

@@ -850,20 +875,1 @@ }

};
exports.test = {
"FoodColors": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/FoodColors", "definitions": {
"FoodColors": {
"type": "object", "properties": {
"slug": {
"type": "string"
}, "food": {
"type": "object", "additionalProperties": {
"type": "string"
}
}
}, "required": [
"slug", "food"
]
}
}
}
};
import { SchemaResult } from "../typeGuards";
import type { FoodColors } from "../../types/test";
import type { Audience } from "../../types/targeting";
import type { NimbusExperiment } from "../../types/experiments";
import type { Feature } from "../../types/features";
import type { NormandyRecipe, ShowHeartbeatArguments, PreferenceRolloutArguments, PreferenceRollbackArguments, PreferenceExperimentArguments, OptOutStudyArguments, MultiPreferenceExperimentArguments, MessagingExperimentArguments, BranchedAddonStudyArguments, AddonRolloutArguments, AddonRollbackArguments, ConsoleLogArguments } from "../../types/normandy";
import type { Audience } from "../../types/targeting";
import type { FoodColors } from "../../types/test";
import type { ConsoleLogArguments, PreferenceRollbackArguments, PreferenceExperimentArguments, ShowHeartbeatArguments, NormandyRecipe, AddonRolloutArguments, PreferenceRolloutArguments, MessagingExperimentArguments, BranchedAddonStudyArguments, AddonRollbackArguments, MultiPreferenceExperimentArguments, OptOutStudyArguments } from "../../types/normandy";
export declare function test_isFoodColors(obj: object): obj is FoodColors;
export declare function test_checkFoodColors(obj: object): SchemaResult;
export declare function test_assertFoodColors(obj: object): asserts obj is FoodColors;
export declare function targeting_isAudience(obj: object): obj is Audience;
export declare function targeting_checkAudience(obj: object): SchemaResult;
export declare function targeting_assertAudience(obj: object): asserts obj is Audience;
export declare function experiments_isNimbusExperiment(obj: object): obj is NimbusExperiment;

@@ -13,23 +19,23 @@ export declare function experiments_checkNimbusExperiment(obj: object): SchemaResult;

export declare function features_assertFeature(obj: object): asserts obj is Feature;
export declare function normandy_isConsoleLogArguments(obj: object): obj is ConsoleLogArguments;
export declare function normandy_checkConsoleLogArguments(obj: object): SchemaResult;
export declare function normandy_assertConsoleLogArguments(obj: object): asserts obj is ConsoleLogArguments;
export declare function normandy_isPreferenceRollbackArguments(obj: object): obj is PreferenceRollbackArguments;
export declare function normandy_checkPreferenceRollbackArguments(obj: object): SchemaResult;
export declare function normandy_assertPreferenceRollbackArguments(obj: object): asserts obj is PreferenceRollbackArguments;
export declare function normandy_isPreferenceExperimentArguments(obj: object): obj is PreferenceExperimentArguments;
export declare function normandy_checkPreferenceExperimentArguments(obj: object): SchemaResult;
export declare function normandy_assertPreferenceExperimentArguments(obj: object): asserts obj is PreferenceExperimentArguments;
export declare function normandy_isShowHeartbeatArguments(obj: object): obj is ShowHeartbeatArguments;
export declare function normandy_checkShowHeartbeatArguments(obj: object): SchemaResult;
export declare function normandy_assertShowHeartbeatArguments(obj: object): asserts obj is ShowHeartbeatArguments;
export declare function normandy_isNormandyRecipe(obj: object): obj is NormandyRecipe;
export declare function normandy_checkNormandyRecipe(obj: object): SchemaResult;
export declare function normandy_assertNormandyRecipe(obj: object): asserts obj is NormandyRecipe;
export declare function normandy_isShowHeartbeatArguments(obj: object): obj is ShowHeartbeatArguments;
export declare function normandy_checkShowHeartbeatArguments(obj: object): SchemaResult;
export declare function normandy_assertShowHeartbeatArguments(obj: object): asserts obj is ShowHeartbeatArguments;
export declare function normandy_isAddonRolloutArguments(obj: object): obj is AddonRolloutArguments;
export declare function normandy_checkAddonRolloutArguments(obj: object): SchemaResult;
export declare function normandy_assertAddonRolloutArguments(obj: object): asserts obj is AddonRolloutArguments;
export declare function normandy_isPreferenceRolloutArguments(obj: object): obj is PreferenceRolloutArguments;
export declare function normandy_checkPreferenceRolloutArguments(obj: object): SchemaResult;
export declare function normandy_assertPreferenceRolloutArguments(obj: object): asserts obj is PreferenceRolloutArguments;
export declare function normandy_isPreferenceRollbackArguments(obj: object): obj is PreferenceRollbackArguments;
export declare function normandy_checkPreferenceRollbackArguments(obj: object): SchemaResult;
export declare function normandy_assertPreferenceRollbackArguments(obj: object): asserts obj is PreferenceRollbackArguments;
export declare function normandy_isPreferenceExperimentArguments(obj: object): obj is PreferenceExperimentArguments;
export declare function normandy_checkPreferenceExperimentArguments(obj: object): SchemaResult;
export declare function normandy_assertPreferenceExperimentArguments(obj: object): asserts obj is PreferenceExperimentArguments;
export declare function normandy_isOptOutStudyArguments(obj: object): obj is OptOutStudyArguments;
export declare function normandy_checkOptOutStudyArguments(obj: object): SchemaResult;
export declare function normandy_assertOptOutStudyArguments(obj: object): asserts obj is OptOutStudyArguments;
export declare function normandy_isMultiPreferenceExperimentArguments(obj: object): obj is MultiPreferenceExperimentArguments;
export declare function normandy_checkMultiPreferenceExperimentArguments(obj: object): SchemaResult;
export declare function normandy_assertMultiPreferenceExperimentArguments(obj: object): asserts obj is MultiPreferenceExperimentArguments;
export declare function normandy_isMessagingExperimentArguments(obj: object): obj is MessagingExperimentArguments;

@@ -41,16 +47,10 @@ export declare function normandy_checkMessagingExperimentArguments(obj: object): SchemaResult;

export declare function normandy_assertBranchedAddonStudyArguments(obj: object): asserts obj is BranchedAddonStudyArguments;
export declare function normandy_isAddonRolloutArguments(obj: object): obj is AddonRolloutArguments;
export declare function normandy_checkAddonRolloutArguments(obj: object): SchemaResult;
export declare function normandy_assertAddonRolloutArguments(obj: object): asserts obj is AddonRolloutArguments;
export declare function normandy_isAddonRollbackArguments(obj: object): obj is AddonRollbackArguments;
export declare function normandy_checkAddonRollbackArguments(obj: object): SchemaResult;
export declare function normandy_assertAddonRollbackArguments(obj: object): asserts obj is AddonRollbackArguments;
export declare function normandy_isConsoleLogArguments(obj: object): obj is ConsoleLogArguments;
export declare function normandy_checkConsoleLogArguments(obj: object): SchemaResult;
export declare function normandy_assertConsoleLogArguments(obj: object): asserts obj is ConsoleLogArguments;
export declare function targeting_isAudience(obj: object): obj is Audience;
export declare function targeting_checkAudience(obj: object): SchemaResult;
export declare function targeting_assertAudience(obj: object): asserts obj is Audience;
export declare function test_isFoodColors(obj: object): obj is FoodColors;
export declare function test_checkFoodColors(obj: object): SchemaResult;
export declare function test_assertFoodColors(obj: object): asserts obj is FoodColors;
export declare function normandy_isMultiPreferenceExperimentArguments(obj: object): obj is MultiPreferenceExperimentArguments;
export declare function normandy_checkMultiPreferenceExperimentArguments(obj: object): SchemaResult;
export declare function normandy_assertMultiPreferenceExperimentArguments(obj: object): asserts obj is MultiPreferenceExperimentArguments;
export declare function normandy_isOptOutStudyArguments(obj: object): obj is OptOutStudyArguments;
export declare function normandy_checkOptOutStudyArguments(obj: object): SchemaResult;
export declare function normandy_assertOptOutStudyArguments(obj: object): asserts obj is OptOutStudyArguments;
"use strict";
/* eslint-disable @typescript-eslint/ban-types */
Object.defineProperty(exports, "__esModule", { value: true });
exports.test_assertFoodColors = exports.test_checkFoodColors = exports.test_isFoodColors = exports.targeting_assertAudience = exports.targeting_checkAudience = exports.targeting_isAudience = exports.normandy_assertConsoleLogArguments = exports.normandy_checkConsoleLogArguments = exports.normandy_isConsoleLogArguments = exports.normandy_assertAddonRollbackArguments = exports.normandy_checkAddonRollbackArguments = exports.normandy_isAddonRollbackArguments = exports.normandy_assertAddonRolloutArguments = exports.normandy_checkAddonRolloutArguments = exports.normandy_isAddonRolloutArguments = exports.normandy_assertBranchedAddonStudyArguments = exports.normandy_checkBranchedAddonStudyArguments = exports.normandy_isBranchedAddonStudyArguments = exports.normandy_assertMessagingExperimentArguments = exports.normandy_checkMessagingExperimentArguments = exports.normandy_isMessagingExperimentArguments = exports.normandy_assertMultiPreferenceExperimentArguments = exports.normandy_checkMultiPreferenceExperimentArguments = exports.normandy_isMultiPreferenceExperimentArguments = exports.normandy_assertOptOutStudyArguments = exports.normandy_checkOptOutStudyArguments = exports.normandy_isOptOutStudyArguments = exports.normandy_assertPreferenceExperimentArguments = exports.normandy_checkPreferenceExperimentArguments = exports.normandy_isPreferenceExperimentArguments = exports.normandy_assertPreferenceRollbackArguments = exports.normandy_checkPreferenceRollbackArguments = exports.normandy_isPreferenceRollbackArguments = exports.normandy_assertPreferenceRolloutArguments = exports.normandy_checkPreferenceRolloutArguments = exports.normandy_isPreferenceRolloutArguments = exports.normandy_assertShowHeartbeatArguments = exports.normandy_checkShowHeartbeatArguments = exports.normandy_isShowHeartbeatArguments = exports.normandy_assertNormandyRecipe = exports.normandy_checkNormandyRecipe = exports.normandy_isNormandyRecipe = exports.features_assertFeature = exports.features_checkFeature = exports.features_isFeature = exports.experiments_assertNimbusExperiment = exports.experiments_checkNimbusExperiment = exports.experiments_isNimbusExperiment = void 0;
exports.normandy_assertOptOutStudyArguments = exports.normandy_checkOptOutStudyArguments = exports.normandy_isOptOutStudyArguments = exports.normandy_assertMultiPreferenceExperimentArguments = exports.normandy_checkMultiPreferenceExperimentArguments = exports.normandy_isMultiPreferenceExperimentArguments = exports.normandy_assertAddonRollbackArguments = exports.normandy_checkAddonRollbackArguments = exports.normandy_isAddonRollbackArguments = exports.normandy_assertBranchedAddonStudyArguments = exports.normandy_checkBranchedAddonStudyArguments = exports.normandy_isBranchedAddonStudyArguments = exports.normandy_assertMessagingExperimentArguments = exports.normandy_checkMessagingExperimentArguments = exports.normandy_isMessagingExperimentArguments = exports.normandy_assertPreferenceRolloutArguments = exports.normandy_checkPreferenceRolloutArguments = exports.normandy_isPreferenceRolloutArguments = exports.normandy_assertAddonRolloutArguments = exports.normandy_checkAddonRolloutArguments = exports.normandy_isAddonRolloutArguments = exports.normandy_assertNormandyRecipe = exports.normandy_checkNormandyRecipe = exports.normandy_isNormandyRecipe = exports.normandy_assertShowHeartbeatArguments = exports.normandy_checkShowHeartbeatArguments = exports.normandy_isShowHeartbeatArguments = exports.normandy_assertPreferenceExperimentArguments = exports.normandy_checkPreferenceExperimentArguments = exports.normandy_isPreferenceExperimentArguments = exports.normandy_assertPreferenceRollbackArguments = exports.normandy_checkPreferenceRollbackArguments = exports.normandy_isPreferenceRollbackArguments = exports.normandy_assertConsoleLogArguments = exports.normandy_checkConsoleLogArguments = exports.normandy_isConsoleLogArguments = exports.features_assertFeature = exports.features_checkFeature = exports.features_isFeature = exports.experiments_assertNimbusExperiment = exports.experiments_checkNimbusExperiment = exports.experiments_isNimbusExperiment = exports.targeting_assertAudience = exports.targeting_checkAudience = exports.targeting_isAudience = exports.test_assertFoodColors = exports.test_checkFoodColors = exports.test_isFoodColors = void 0;
const typeGuards_1 = require("../typeGuards");
function test_isFoodColors(obj) { return typeGuards_1.isSchema("test/FoodColors", obj); }
exports.test_isFoodColors = test_isFoodColors;
function test_checkFoodColors(obj) { return typeGuards_1.checkSchema("test/FoodColors", obj); }
exports.test_checkFoodColors = test_checkFoodColors;
function test_assertFoodColors(obj) { return typeGuards_1.assertSchema("test/FoodColors", obj); }
exports.test_assertFoodColors = test_assertFoodColors;
function targeting_isAudience(obj) { return typeGuards_1.isSchema("targeting/Audience", obj); }
exports.targeting_isAudience = targeting_isAudience;
function targeting_checkAudience(obj) { return typeGuards_1.checkSchema("targeting/Audience", obj); }
exports.targeting_checkAudience = targeting_checkAudience;
function targeting_assertAudience(obj) { return typeGuards_1.assertSchema("targeting/Audience", obj); }
exports.targeting_assertAudience = targeting_assertAudience;
function experiments_isNimbusExperiment(obj) { return typeGuards_1.isSchema("experiments/NimbusExperiment", obj); }

@@ -18,2 +30,26 @@ exports.experiments_isNimbusExperiment = experiments_isNimbusExperiment;

exports.features_assertFeature = features_assertFeature;
function normandy_isConsoleLogArguments(obj) { return typeGuards_1.isSchema("normandy/ConsoleLogArguments", obj); }
exports.normandy_isConsoleLogArguments = normandy_isConsoleLogArguments;
function normandy_checkConsoleLogArguments(obj) { return typeGuards_1.checkSchema("normandy/ConsoleLogArguments", obj); }
exports.normandy_checkConsoleLogArguments = normandy_checkConsoleLogArguments;
function normandy_assertConsoleLogArguments(obj) { return typeGuards_1.assertSchema("normandy/ConsoleLogArguments", obj); }
exports.normandy_assertConsoleLogArguments = normandy_assertConsoleLogArguments;
function normandy_isPreferenceRollbackArguments(obj) { return typeGuards_1.isSchema("normandy/PreferenceRollbackArguments", obj); }
exports.normandy_isPreferenceRollbackArguments = normandy_isPreferenceRollbackArguments;
function normandy_checkPreferenceRollbackArguments(obj) { return typeGuards_1.checkSchema("normandy/PreferenceRollbackArguments", obj); }
exports.normandy_checkPreferenceRollbackArguments = normandy_checkPreferenceRollbackArguments;
function normandy_assertPreferenceRollbackArguments(obj) { return typeGuards_1.assertSchema("normandy/PreferenceRollbackArguments", obj); }
exports.normandy_assertPreferenceRollbackArguments = normandy_assertPreferenceRollbackArguments;
function normandy_isPreferenceExperimentArguments(obj) { return typeGuards_1.isSchema("normandy/PreferenceExperimentArguments", obj); }
exports.normandy_isPreferenceExperimentArguments = normandy_isPreferenceExperimentArguments;
function normandy_checkPreferenceExperimentArguments(obj) { return typeGuards_1.checkSchema("normandy/PreferenceExperimentArguments", obj); }
exports.normandy_checkPreferenceExperimentArguments = normandy_checkPreferenceExperimentArguments;
function normandy_assertPreferenceExperimentArguments(obj) { return typeGuards_1.assertSchema("normandy/PreferenceExperimentArguments", obj); }
exports.normandy_assertPreferenceExperimentArguments = normandy_assertPreferenceExperimentArguments;
function normandy_isShowHeartbeatArguments(obj) { return typeGuards_1.isSchema("normandy/ShowHeartbeatArguments", obj); }
exports.normandy_isShowHeartbeatArguments = normandy_isShowHeartbeatArguments;
function normandy_checkShowHeartbeatArguments(obj) { return typeGuards_1.checkSchema("normandy/ShowHeartbeatArguments", obj); }
exports.normandy_checkShowHeartbeatArguments = normandy_checkShowHeartbeatArguments;
function normandy_assertShowHeartbeatArguments(obj) { return typeGuards_1.assertSchema("normandy/ShowHeartbeatArguments", obj); }
exports.normandy_assertShowHeartbeatArguments = normandy_assertShowHeartbeatArguments;
function normandy_isNormandyRecipe(obj) { return typeGuards_1.isSchema("normandy/NormandyRecipe", obj); }

@@ -25,8 +61,8 @@ exports.normandy_isNormandyRecipe = normandy_isNormandyRecipe;

exports.normandy_assertNormandyRecipe = normandy_assertNormandyRecipe;
function normandy_isShowHeartbeatArguments(obj) { return typeGuards_1.isSchema("normandy/ShowHeartbeatArguments", obj); }
exports.normandy_isShowHeartbeatArguments = normandy_isShowHeartbeatArguments;
function normandy_checkShowHeartbeatArguments(obj) { return typeGuards_1.checkSchema("normandy/ShowHeartbeatArguments", obj); }
exports.normandy_checkShowHeartbeatArguments = normandy_checkShowHeartbeatArguments;
function normandy_assertShowHeartbeatArguments(obj) { return typeGuards_1.assertSchema("normandy/ShowHeartbeatArguments", obj); }
exports.normandy_assertShowHeartbeatArguments = normandy_assertShowHeartbeatArguments;
function normandy_isAddonRolloutArguments(obj) { return typeGuards_1.isSchema("normandy/AddonRolloutArguments", obj); }
exports.normandy_isAddonRolloutArguments = normandy_isAddonRolloutArguments;
function normandy_checkAddonRolloutArguments(obj) { return typeGuards_1.checkSchema("normandy/AddonRolloutArguments", obj); }
exports.normandy_checkAddonRolloutArguments = normandy_checkAddonRolloutArguments;
function normandy_assertAddonRolloutArguments(obj) { return typeGuards_1.assertSchema("normandy/AddonRolloutArguments", obj); }
exports.normandy_assertAddonRolloutArguments = normandy_assertAddonRolloutArguments;
function normandy_isPreferenceRolloutArguments(obj) { return typeGuards_1.isSchema("normandy/PreferenceRolloutArguments", obj); }

@@ -38,26 +74,2 @@ exports.normandy_isPreferenceRolloutArguments = normandy_isPreferenceRolloutArguments;

exports.normandy_assertPreferenceRolloutArguments = normandy_assertPreferenceRolloutArguments;
function normandy_isPreferenceRollbackArguments(obj) { return typeGuards_1.isSchema("normandy/PreferenceRollbackArguments", obj); }
exports.normandy_isPreferenceRollbackArguments = normandy_isPreferenceRollbackArguments;
function normandy_checkPreferenceRollbackArguments(obj) { return typeGuards_1.checkSchema("normandy/PreferenceRollbackArguments", obj); }
exports.normandy_checkPreferenceRollbackArguments = normandy_checkPreferenceRollbackArguments;
function normandy_assertPreferenceRollbackArguments(obj) { return typeGuards_1.assertSchema("normandy/PreferenceRollbackArguments", obj); }
exports.normandy_assertPreferenceRollbackArguments = normandy_assertPreferenceRollbackArguments;
function normandy_isPreferenceExperimentArguments(obj) { return typeGuards_1.isSchema("normandy/PreferenceExperimentArguments", obj); }
exports.normandy_isPreferenceExperimentArguments = normandy_isPreferenceExperimentArguments;
function normandy_checkPreferenceExperimentArguments(obj) { return typeGuards_1.checkSchema("normandy/PreferenceExperimentArguments", obj); }
exports.normandy_checkPreferenceExperimentArguments = normandy_checkPreferenceExperimentArguments;
function normandy_assertPreferenceExperimentArguments(obj) { return typeGuards_1.assertSchema("normandy/PreferenceExperimentArguments", obj); }
exports.normandy_assertPreferenceExperimentArguments = normandy_assertPreferenceExperimentArguments;
function normandy_isOptOutStudyArguments(obj) { return typeGuards_1.isSchema("normandy/OptOutStudyArguments", obj); }
exports.normandy_isOptOutStudyArguments = normandy_isOptOutStudyArguments;
function normandy_checkOptOutStudyArguments(obj) { return typeGuards_1.checkSchema("normandy/OptOutStudyArguments", obj); }
exports.normandy_checkOptOutStudyArguments = normandy_checkOptOutStudyArguments;
function normandy_assertOptOutStudyArguments(obj) { return typeGuards_1.assertSchema("normandy/OptOutStudyArguments", obj); }
exports.normandy_assertOptOutStudyArguments = normandy_assertOptOutStudyArguments;
function normandy_isMultiPreferenceExperimentArguments(obj) { return typeGuards_1.isSchema("normandy/MultiPreferenceExperimentArguments", obj); }
exports.normandy_isMultiPreferenceExperimentArguments = normandy_isMultiPreferenceExperimentArguments;
function normandy_checkMultiPreferenceExperimentArguments(obj) { return typeGuards_1.checkSchema("normandy/MultiPreferenceExperimentArguments", obj); }
exports.normandy_checkMultiPreferenceExperimentArguments = normandy_checkMultiPreferenceExperimentArguments;
function normandy_assertMultiPreferenceExperimentArguments(obj) { return typeGuards_1.assertSchema("normandy/MultiPreferenceExperimentArguments", obj); }
exports.normandy_assertMultiPreferenceExperimentArguments = normandy_assertMultiPreferenceExperimentArguments;
function normandy_isMessagingExperimentArguments(obj) { return typeGuards_1.isSchema("normandy/MessagingExperimentArguments", obj); }

@@ -75,8 +87,2 @@ exports.normandy_isMessagingExperimentArguments = normandy_isMessagingExperimentArguments;

exports.normandy_assertBranchedAddonStudyArguments = normandy_assertBranchedAddonStudyArguments;
function normandy_isAddonRolloutArguments(obj) { return typeGuards_1.isSchema("normandy/AddonRolloutArguments", obj); }
exports.normandy_isAddonRolloutArguments = normandy_isAddonRolloutArguments;
function normandy_checkAddonRolloutArguments(obj) { return typeGuards_1.checkSchema("normandy/AddonRolloutArguments", obj); }
exports.normandy_checkAddonRolloutArguments = normandy_checkAddonRolloutArguments;
function normandy_assertAddonRolloutArguments(obj) { return typeGuards_1.assertSchema("normandy/AddonRolloutArguments", obj); }
exports.normandy_assertAddonRolloutArguments = normandy_assertAddonRolloutArguments;
function normandy_isAddonRollbackArguments(obj) { return typeGuards_1.isSchema("normandy/AddonRollbackArguments", obj); }

@@ -88,19 +94,13 @@ exports.normandy_isAddonRollbackArguments = normandy_isAddonRollbackArguments;

exports.normandy_assertAddonRollbackArguments = normandy_assertAddonRollbackArguments;
function normandy_isConsoleLogArguments(obj) { return typeGuards_1.isSchema("normandy/ConsoleLogArguments", obj); }
exports.normandy_isConsoleLogArguments = normandy_isConsoleLogArguments;
function normandy_checkConsoleLogArguments(obj) { return typeGuards_1.checkSchema("normandy/ConsoleLogArguments", obj); }
exports.normandy_checkConsoleLogArguments = normandy_checkConsoleLogArguments;
function normandy_assertConsoleLogArguments(obj) { return typeGuards_1.assertSchema("normandy/ConsoleLogArguments", obj); }
exports.normandy_assertConsoleLogArguments = normandy_assertConsoleLogArguments;
function targeting_isAudience(obj) { return typeGuards_1.isSchema("targeting/Audience", obj); }
exports.targeting_isAudience = targeting_isAudience;
function targeting_checkAudience(obj) { return typeGuards_1.checkSchema("targeting/Audience", obj); }
exports.targeting_checkAudience = targeting_checkAudience;
function targeting_assertAudience(obj) { return typeGuards_1.assertSchema("targeting/Audience", obj); }
exports.targeting_assertAudience = targeting_assertAudience;
function test_isFoodColors(obj) { return typeGuards_1.isSchema("test/FoodColors", obj); }
exports.test_isFoodColors = test_isFoodColors;
function test_checkFoodColors(obj) { return typeGuards_1.checkSchema("test/FoodColors", obj); }
exports.test_checkFoodColors = test_checkFoodColors;
function test_assertFoodColors(obj) { return typeGuards_1.assertSchema("test/FoodColors", obj); }
exports.test_assertFoodColors = test_assertFoodColors;
function normandy_isMultiPreferenceExperimentArguments(obj) { return typeGuards_1.isSchema("normandy/MultiPreferenceExperimentArguments", obj); }
exports.normandy_isMultiPreferenceExperimentArguments = normandy_isMultiPreferenceExperimentArguments;
function normandy_checkMultiPreferenceExperimentArguments(obj) { return typeGuards_1.checkSchema("normandy/MultiPreferenceExperimentArguments", obj); }
exports.normandy_checkMultiPreferenceExperimentArguments = normandy_checkMultiPreferenceExperimentArguments;
function normandy_assertMultiPreferenceExperimentArguments(obj) { return typeGuards_1.assertSchema("normandy/MultiPreferenceExperimentArguments", obj); }
exports.normandy_assertMultiPreferenceExperimentArguments = normandy_assertMultiPreferenceExperimentArguments;
function normandy_isOptOutStudyArguments(obj) { return typeGuards_1.isSchema("normandy/OptOutStudyArguments", obj); }
exports.normandy_isOptOutStudyArguments = normandy_isOptOutStudyArguments;
function normandy_checkOptOutStudyArguments(obj) { return typeGuards_1.checkSchema("normandy/OptOutStudyArguments", obj); }
exports.normandy_checkOptOutStudyArguments = normandy_checkOptOutStudyArguments;
function normandy_assertOptOutStudyArguments(obj) { return typeGuards_1.assertSchema("normandy/OptOutStudyArguments", obj); }
exports.normandy_assertOptOutStudyArguments = normandy_assertOptOutStudyArguments;

@@ -95,2 +95,13 @@ /**

featureValidationOptOut?: boolean;
/**
* 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.
*/
localizations?: {
[locale: string]: Record<string, string>;
};
}

@@ -97,0 +108,0 @@ interface BucketConfig {

{
"name": "@mozilla/nimbus-shared",
"version": "1.10.0",
"version": "2.0.0",
"license": "MPL-2.0",

@@ -5,0 +5,0 @@ "engines": {

@@ -317,2 +317,12 @@ {

"description": "Opt out of feature schema validation. Only supported on desktop."
},
"localizations": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"description": "Per-locale localization substitutions.\n\nThe top level key is the locale (e.g., \"en-US\" or \"fr\"). Each entry is a mapping of string IDs to their localized equivalents.\n\nOnly supported on desktop."
}

@@ -319,0 +329,0 @@ },

@@ -101,2 +101,44 @@ export const data = {

], "id": "mr2-upgrade-spotlight-holdback", "isEnrollmentPaused": false, "outcomes": [], "probeSets": [], "proposedDuration": 63, "proposedEnrollment": 7, "referenceBranch": "control", "schemaVersion": "1.7.1", "slug": "firefox-desktop-multifeature-test", "startDate": "2021-10-26", "targeting": "true", "userFacingDescription": "Experimenting on onboarding content when you upgrade Firefox.", "userFacingName": "MR2 Upgrade Spotlight Holdback", "featureValidationOptOut": true
}, "desktop-113-localizations": {
"appId": "firefox-desktop", "appName": "firefox_desktop", "application": "firefox-desktop", "arguments": {}, "branches": [
{
"feature": {
"featureId": "unused-feature-id-for-legacy-support", "enabled": false, "value": {}
}, "features": [
{
"featureId": "nimbus-qa-1", "value": {
"value": {
"$l10n": {
"id": "control-text", "text": "English text", "comment": "Text for the control branch."
}
}
}
}
], "ratio": 1, "slug": "control"
}, {
"feature": {
"featureId": "unused-feature-id-for-legacy-support", "enabled": false, "value": {}
}, "features": [
{
"featureId": "nimbus-qa-1", "value": {
"value": {
"$l10n": {
"id": "treatment-text", "text": "More English text", "comment": "Text for the treatment branch."
}
}
}
}
], "ratio": 1, "slug": "treatment"
}
], "bucketConfig": {
"count": 10000, "namespace": "firefox-desktop-localization-test", "randomizationUnit": "normandy_id", "start": 0, "total": 10000
}, "channel": "nightly", "endDate": null, "featureIds": [
"nimbus-qa-1"
], "id": "firefox-desktop-localization-test", "isEnrollmentPaused": false, "outcomes": [], "probeSets": [], "proposedDuration": 63, "proposedEnrollment": 7, "referenceBranch": "control", "schemaVersion": "1.7.1", "slug": "firefox-desktop-localization-test", "startDate": "2021-10-26", "targeting": "true", "userFacingDescription": "Test data for a localized experiment", "userFacingName": "MR2 Upgrade Spotlight Holdback", "localizations": {
"en-US": {
"control-text": "English text", "treatment-test": "More English text"
}, "fr": {
"control-text": "Texte en fran\u00E7ais", "treatment-text": "Plus de texte en fran\u00E7ais"
}
}
}, "desktop-90": {

@@ -103,0 +145,0 @@ "appId": "firefox-desktop", "appName": "firefox_desktop", "application": "firefox-desktop", "arguments": {}, "branches": [

@@ -0,1 +1,43 @@

export const test = {
"FoodColors": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/FoodColors", "definitions": {
"FoodColors": {
"type": "object", "properties": {
"slug": {
"type": "string"
}, "food": {
"type": "object", "additionalProperties": {
"type": "string"
}
}
}, "required": [
"slug", "food"
]
}
}
}
};
export const targeting = {
"Audience": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/Audience", "definitions": {
"Audience": {
"type": "object", "properties": {
"name": {
"type": "string"
}, "description": {
"type": "string"
}, "targeting": {
"type": "string"
}, "desktop_telemetry": {
"type": "string", "description": "A boolean BigQuery SQL expression expressing whether a single row in telemetry.main would have matched the audience definition. These are used for sizing experiment populations, not for targeting."
}
}, "required": [
"name", "description"
]
}
}
}
};
export const experiments = {

@@ -170,2 +212,8 @@ "NimbusExperiment": {

"type": "boolean", "description": "Opt out of feature schema validation. Only supported on desktop."
}, "localizations": {
"type": "object", "additionalProperties": {
"type": "object", "additionalProperties": {
"type": "string"
}
}, "description": "Per-locale localization substitutions.\n\nThe top level key is the locale (e.g., \"en-US\" or \"fr\"). Each entry is a mapping of string IDs to their localized equivalents.\n\nOnly supported on desktop."
}

@@ -233,3 +281,119 @@ }, "required": [

export const normandy = {
"NormandyRecipe": {
"ConsoleLogArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/ConsoleLogArguments", "definitions": {
"ConsoleLogArguments": {
"type": "object", "properties": {
"message": {
"type": "string", "description": "Message to log to the console"
}
}, "required": [
"message"
], "description": "Log a message to the console"
}
}
}, "PreferenceRollbackArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/PreferenceRollbackArguments", "definitions": {
"PreferenceRollbackArguments": {
"type": "object", "properties": {
"rolloutSlug": {
"type": "string", "description": "Unique identifier for the rollout to undo"
}
}, "required": [
"rolloutSlug"
], "description": "Undo a preference rollout"
}
}
}, "PreferenceExperimentArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/PreferenceExperimentArguments", "definitions": {
"PreferenceExperimentArguments": {
"type": "object", "properties": {
"branches": {
"type": "array", "items": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for this branch of the experiment.", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "value": {
"type": [
"number", "string", "boolean"
], "description": "Value to set the preference to for this branch"
}, "ratio": {
"type": "number", "description": "Ratio of users who should be grouped into this branch.", "minimum": 1
}
}, "required": [
"slug", "value", "ratio"
], "description": "A branch in a preference experiment"
}, "description": "List of experimental branches", "minItems": 1
}, "preferenceName": {
"type": "string", "description": "Full dotted path of the preference that controls this experiment"
}, "preferenceType": {
"type": "string", "enum": [
"string", "integer", "boolean"
], "description": "Data type of the preference that controls this experiment"
}, "preferenceBranchType": {
"type": "string", "enum": [
"user", "default"
], "description": "Controls whether the default or user value of the preference is modified."
}, "slug": {
"type": "string", "description": "Unique identifier for this experiment", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "experimentDocumentUrl": {
"type": "string", "description": "URL of a document describing the experiment", "default": [
{}
], "format": "uri"
}, "isEnrollmentPaused": {
"type": "boolean", "description": "If true, new users will not be enrolled in the study.", "default": false
}, "isHighVolume": {
"type": "boolean", "description": "If true, marks the preference as a high population experiment that should be excluded from certain types of telemetry.", "default": false
}
}, "required": [
"branches", "preferenceName", "preferenceType", "preferenceBranchType", "slug", "experimentDocumentUrl"
], "description": "Run a feature experiment activated by a preference"
}
}
}, "ShowHeartbeatArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/ShowHeartbeatArguments", "definitions": {
"ShowHeartbeatArguments": {
"type": "object", "properties": {
"surveyId": {
"type": "string", "description": "Slug unique identifying this survey in telemetry"
}, "message": {
"type": "string", "description": "Message to show to the user"
}, "learnMoreMessage": {
"type": "string", "description": "Text to display in the \"learn more\" link"
}, "learnMoreUrl": {
"type": "string", "description": "URL to show to the user when the click the \"learn more\" link"
}, "postAnswerUrl": {
"type": "string", "description": "URL to redirect the user to after rating Firefox or clicking the engagement button"
}, "thanksMessage": {
"type": "string", "description": "Thanks message to show to the user after they've rated Firefox"
}, "engagementButtonLabel": {
"type": "string", "description": "Text for the engagement button.\n\nIf specified, this button will be shown instead of rating stars."
}, "includeTelemetryUUID": {
"type": "boolean", "description": "Include unique user ID in post-answer-url and Telemetry"
}, "repeatOption": {
"type": "string", "enum": [
"once", "xdays", "nag"
], "description": "Determines how often a prompt is shown executes"
}, "repeatEvery": {
"type": "number", "description": "For repeatOption=xdays, how often (in days) the prompt is displayed"
}
}, "required": [
"surveyId", "message", "learnMoreMessage", "learnMoreUrl", "postAnswerUrl", "thanksMessage"
], "description": "This action shows a single survey"
}
}
}, "AddonRolloutArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/AddonRolloutArguments", "definitions": {
"AddonRolloutArguments": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for the rollout, used in telemetry and rollbacks", "pattern": "^[a-z0-9\\-_]+$"
}, "extensionApiId": {
"type": "number", "description": "The record ID of the extension used for Normandy API calls"
}
}, "required": [
"slug", "extensionApiId"
], "description": "Install an add-on permanently"
}
}
}, "NormandyRecipe": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/NormandyRecipe", "definitions": {

@@ -522,34 +686,2 @@ "NormandyRecipe": {

}
}, "ShowHeartbeatArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/ShowHeartbeatArguments", "definitions": {
"ShowHeartbeatArguments": {
"type": "object", "properties": {
"surveyId": {
"type": "string", "description": "Slug unique identifying this survey in telemetry"
}, "message": {
"type": "string", "description": "Message to show to the user"
}, "learnMoreMessage": {
"type": "string", "description": "Text to display in the \"learn more\" link"
}, "learnMoreUrl": {
"type": "string", "description": "URL to show to the user when the click the \"learn more\" link"
}, "postAnswerUrl": {
"type": "string", "description": "URL to redirect the user to after rating Firefox or clicking the engagement button"
}, "thanksMessage": {
"type": "string", "description": "Thanks message to show to the user after they've rated Firefox"
}, "engagementButtonLabel": {
"type": "string", "description": "Text for the engagement button.\n\nIf specified, this button will be shown instead of rating stars."
}, "includeTelemetryUUID": {
"type": "boolean", "description": "Include unique user ID in post-answer-url and Telemetry"
}, "repeatOption": {
"type": "string", "enum": [
"once", "xdays", "nag"
], "description": "Determines how often a prompt is shown executes"
}, "repeatEvery": {
"type": "number", "description": "For repeatOption=xdays, how often (in days) the prompt is displayed"
}
}, "required": [
"surveyId", "message", "learnMoreMessage", "learnMoreUrl", "postAnswerUrl", "thanksMessage"
], "description": "This action shows a single survey"
}
}
}, "PreferenceRolloutArguments": {

@@ -581,136 +713,2 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/PreferenceRolloutArguments", "definitions": {

}
}, "PreferenceRollbackArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/PreferenceRollbackArguments", "definitions": {
"PreferenceRollbackArguments": {
"type": "object", "properties": {
"rolloutSlug": {
"type": "string", "description": "Unique identifier for the rollout to undo"
}
}, "required": [
"rolloutSlug"
], "description": "Undo a preference rollout"
}
}
}, "PreferenceExperimentArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/PreferenceExperimentArguments", "definitions": {
"PreferenceExperimentArguments": {
"type": "object", "properties": {
"branches": {
"type": "array", "items": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for this branch of the experiment.", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "value": {
"type": [
"number", "string", "boolean"
], "description": "Value to set the preference to for this branch"
}, "ratio": {
"type": "number", "description": "Ratio of users who should be grouped into this branch.", "minimum": 1
}
}, "required": [
"slug", "value", "ratio"
], "description": "A branch in a preference experiment"
}, "description": "List of experimental branches", "minItems": 1
}, "preferenceName": {
"type": "string", "description": "Full dotted path of the preference that controls this experiment"
}, "preferenceType": {
"type": "string", "enum": [
"string", "integer", "boolean"
], "description": "Data type of the preference that controls this experiment"
}, "preferenceBranchType": {
"type": "string", "enum": [
"user", "default"
], "description": "Controls whether the default or user value of the preference is modified."
}, "slug": {
"type": "string", "description": "Unique identifier for this experiment", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "experimentDocumentUrl": {
"type": "string", "description": "URL of a document describing the experiment", "default": [
{}
], "format": "uri"
}, "isEnrollmentPaused": {
"type": "boolean", "description": "If true, new users will not be enrolled in the study.", "default": false
}, "isHighVolume": {
"type": "boolean", "description": "If true, marks the preference as a high population experiment that should be excluded from certain types of telemetry.", "default": false
}
}, "required": [
"branches", "preferenceName", "preferenceType", "preferenceBranchType", "slug", "experimentDocumentUrl"
], "description": "Run a feature experiment activated by a preference"
}
}
}, "OptOutStudyArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/OptOutStudyArguments", "definitions": {
"OptOutStudyArguments": {
"type": "object", "properties": {
"addonUrl": {
"type": "string", "description": "URL of the add-on XPI file to install", "minLength": 1
}, "name": {
"type": "string", "description": "User-facing name of the study", "minLength": 1
}, "description": {
"type": "string", "description": "User-facing description of the study", "minLength": 1
}, "extensionApiId": {
"type": "number", "description": "The record ID of the extension used for Normandy API calls."
}, "isEnrollmentPaused": {
"type": "boolean", "description": "If true, new users will not be enrolled in the study"
}
}, "required": [
"addonUrl", "name", "description", "extensionApiId"
], "description": "Enroll a user in an opt-out add-on study"
}
}
}, "MultiPreferenceExperimentArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/MultiPreferenceExperimentArguments", "definitions": {
"MultiPreferenceExperimentArguments": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for this experiment", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "userFacingDescription": {
"type": "string", "description": "User-facing name of the experiment", "minLength": 1
}, "userFacingName": {
"type": "string", "description": "User-facing description of the experiment", "minLength": 1
}, "branches": {
"type": "array", "items": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for this branch of the experiment", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "ratio": {
"type": "number", "description": "Ratio of users that should be grouped into this branch"
}, "preferences": {
"type": "object", "additionalProperties": {
"type": "object", "properties": {
"preferenceValue": {
"type": [
"number", "string", "boolean"
], "description": "Value for this preference when this branch is chosen"
}, "preferenceBranchType": {
"type": "string", "enum": [
"user", "default"
], "description": "Data type of the preference that controls this experiment"
}, "preferenceType": {
"type": "string", "enum": [
"string", "integer", "boolean"
], "description": "Data type of the preference that controls this experiment"
}
}, "required": [
"preferenceValue", "preferenceBranchType", "preferenceType"
]
}, "description": "The set of preferences to be set if this branch is chosen"
}
}, "required": [
"slug", "ratio", "preferences"
], "description": "A branch in a multi-preference experiment"
}, "description": "List of experimental branches", "minItems": 1
}, "experimentDocumentUrl": {
"type": "string", "description": "URL of a document describing the experiment", "format": "uri", "default": ""
}, "isHighPopulation": {
"type": "boolean", "description": "Marks the preference experiment as a high population experiment, that should be excluded from certain types of telemetry.", "default": false
}, "isHighVolume": {
"type": "boolean", "description": "Incorrect version of `isHighPopulation`. Included here for compatibility, but should not be used."
}, "isEnrollmentPaused": {
"type": "boolean", "description": "If true, new users will not be enrolled in the study.", "default": false
}
}, "required": [
"slug", "userFacingDescription", "userFacingName", "branches"
], "description": "Run a feature experiment activated by a set of preferences"
}
}
}, "MessagingExperimentArguments": {

@@ -786,16 +784,2 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/MessagingExperimentArguments", "definitions": {

}
}, "AddonRolloutArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/AddonRolloutArguments", "definitions": {
"AddonRolloutArguments": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for the rollout, used in telemetry and rollbacks", "pattern": "^[a-z0-9\\-_]+$"
}, "extensionApiId": {
"type": "number", "description": "The record ID of the extension used for Normandy API calls"
}
}, "required": [
"slug", "extensionApiId"
], "description": "Install an add-on permanently"
}
}
}, "AddonRollbackArguments": {

@@ -813,57 +797,79 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/AddonRollbackArguments", "definitions": {

}
}, "ConsoleLogArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/ConsoleLogArguments", "definitions": {
"ConsoleLogArguments": {
}, "MultiPreferenceExperimentArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/MultiPreferenceExperimentArguments", "definitions": {
"MultiPreferenceExperimentArguments": {
"type": "object", "properties": {
"message": {
"type": "string", "description": "Message to log to the console"
"slug": {
"type": "string", "description": "Unique identifier for this experiment", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "userFacingDescription": {
"type": "string", "description": "User-facing name of the experiment", "minLength": 1
}, "userFacingName": {
"type": "string", "description": "User-facing description of the experiment", "minLength": 1
}, "branches": {
"type": "array", "items": {
"type": "object", "properties": {
"slug": {
"type": "string", "description": "Unique identifier for this branch of the experiment", "pattern": "^[A-Za-z0-9\\-_]+$"
}, "ratio": {
"type": "number", "description": "Ratio of users that should be grouped into this branch"
}, "preferences": {
"type": "object", "additionalProperties": {
"type": "object", "properties": {
"preferenceValue": {
"type": [
"number", "string", "boolean"
], "description": "Value for this preference when this branch is chosen"
}, "preferenceBranchType": {
"type": "string", "enum": [
"user", "default"
], "description": "Data type of the preference that controls this experiment"
}, "preferenceType": {
"type": "string", "enum": [
"string", "integer", "boolean"
], "description": "Data type of the preference that controls this experiment"
}
}, "required": [
"preferenceValue", "preferenceBranchType", "preferenceType"
]
}, "description": "The set of preferences to be set if this branch is chosen"
}
}, "required": [
"slug", "ratio", "preferences"
], "description": "A branch in a multi-preference experiment"
}, "description": "List of experimental branches", "minItems": 1
}, "experimentDocumentUrl": {
"type": "string", "description": "URL of a document describing the experiment", "format": "uri", "default": ""
}, "isHighPopulation": {
"type": "boolean", "description": "Marks the preference experiment as a high population experiment, that should be excluded from certain types of telemetry.", "default": false
}, "isHighVolume": {
"type": "boolean", "description": "Incorrect version of `isHighPopulation`. Included here for compatibility, but should not be used."
}, "isEnrollmentPaused": {
"type": "boolean", "description": "If true, new users will not be enrolled in the study.", "default": false
}
}, "required": [
"message"
], "description": "Log a message to the console"
"slug", "userFacingDescription", "userFacingName", "branches"
], "description": "Run a feature experiment activated by a set of preferences"
}
}
}
};
export const targeting = {
"Audience": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/Audience", "definitions": {
"Audience": {
}, "OptOutStudyArguments": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/OptOutStudyArguments", "definitions": {
"OptOutStudyArguments": {
"type": "object", "properties": {
"name": {
"type": "string"
"addonUrl": {
"type": "string", "description": "URL of the add-on XPI file to install", "minLength": 1
}, "name": {
"type": "string", "description": "User-facing name of the study", "minLength": 1
}, "description": {
"type": "string"
}, "targeting": {
"type": "string"
}, "desktop_telemetry": {
"type": "string", "description": "A boolean BigQuery SQL expression expressing whether a single row in telemetry.main would have matched the audience definition. These are used for sizing experiment populations, not for targeting."
"type": "string", "description": "User-facing description of the study", "minLength": 1
}, "extensionApiId": {
"type": "number", "description": "The record ID of the extension used for Normandy API calls."
}, "isEnrollmentPaused": {
"type": "boolean", "description": "If true, new users will not be enrolled in the study"
}
}, "required": [
"name", "description"
]
"addonUrl", "name", "description", "extensionApiId"
], "description": "Enroll a user in an opt-out add-on study"
}
}
}
};
export const test = {
"FoodColors": {
"$schema": "http://json-schema.org/draft-07/schema#", "$ref": "#/definitions/FoodColors", "definitions": {
"FoodColors": {
"type": "object", "properties": {
"slug": {
"type": "string"
}, "food": {
"type": "object", "additionalProperties": {
"type": "string"
}
}
}, "required": [
"slug", "food"
]
}
}
}
};
/* eslint-disable @typescript-eslint/ban-types */
import { checkSchema, isSchema, assertSchema, SchemaResult } from "../typeGuards";
import type { FoodColors } from "../../types/test";
import type { Audience } from "../../types/targeting";
import type { NimbusExperiment } from "../../types/experiments";
import type { Feature } from "../../types/features";
import type { NormandyRecipe, ShowHeartbeatArguments, PreferenceRolloutArguments, PreferenceRollbackArguments, PreferenceExperimentArguments, OptOutStudyArguments, MultiPreferenceExperimentArguments, MessagingExperimentArguments, BranchedAddonStudyArguments, AddonRolloutArguments, AddonRollbackArguments, ConsoleLogArguments } from "../../types/normandy";
import type { Audience } from "../../types/targeting";
import type { FoodColors } from "../../types/test";
import type { ConsoleLogArguments, PreferenceRollbackArguments, PreferenceExperimentArguments, ShowHeartbeatArguments, NormandyRecipe, AddonRolloutArguments, PreferenceRolloutArguments, MessagingExperimentArguments, BranchedAddonStudyArguments, AddonRollbackArguments, MultiPreferenceExperimentArguments, OptOutStudyArguments } from "../../types/normandy";
export function test_isFoodColors(obj: object): obj is FoodColors { return isSchema("test/FoodColors", obj); }
export function test_checkFoodColors(obj: object): SchemaResult { return checkSchema("test/FoodColors", obj); }
export function test_assertFoodColors(obj: object): asserts obj is FoodColors { return assertSchema("test/FoodColors", obj); }
export function targeting_isAudience(obj: object): obj is Audience { return isSchema("targeting/Audience", obj); }
export function targeting_checkAudience(obj: object): SchemaResult { return checkSchema("targeting/Audience", obj); }
export function targeting_assertAudience(obj: object): asserts obj is Audience { return assertSchema("targeting/Audience", obj); }
export function experiments_isNimbusExperiment(obj: object): obj is NimbusExperiment { return isSchema("experiments/NimbusExperiment", obj); }

@@ -20,17 +30,7 @@ export function experiments_checkNimbusExperiment(obj: object): SchemaResult { return checkSchema("experiments/NimbusExperiment", obj); }

export function normandy_isNormandyRecipe(obj: object): obj is NormandyRecipe { return isSchema("normandy/NormandyRecipe", obj); }
export function normandy_checkNormandyRecipe(obj: object): SchemaResult { return checkSchema("normandy/NormandyRecipe", obj); }
export function normandy_assertNormandyRecipe(obj: object): asserts obj is NormandyRecipe { return assertSchema("normandy/NormandyRecipe", obj); }
export function normandy_isConsoleLogArguments(obj: object): obj is ConsoleLogArguments { return isSchema("normandy/ConsoleLogArguments", obj); }
export function normandy_checkConsoleLogArguments(obj: object): SchemaResult { return checkSchema("normandy/ConsoleLogArguments", obj); }
export function normandy_assertConsoleLogArguments(obj: object): asserts obj is ConsoleLogArguments { return assertSchema("normandy/ConsoleLogArguments", obj); }
export function normandy_isShowHeartbeatArguments(obj: object): obj is ShowHeartbeatArguments { return isSchema("normandy/ShowHeartbeatArguments", obj); }
export function normandy_checkShowHeartbeatArguments(obj: object): SchemaResult { return checkSchema("normandy/ShowHeartbeatArguments", obj); }
export function normandy_assertShowHeartbeatArguments(obj: object): asserts obj is ShowHeartbeatArguments { return assertSchema("normandy/ShowHeartbeatArguments", obj); }
export function normandy_isPreferenceRolloutArguments(obj: object): obj is PreferenceRolloutArguments { return isSchema("normandy/PreferenceRolloutArguments", obj); }
export function normandy_checkPreferenceRolloutArguments(obj: object): SchemaResult { return checkSchema("normandy/PreferenceRolloutArguments", obj); }
export function normandy_assertPreferenceRolloutArguments(obj: object): asserts obj is PreferenceRolloutArguments { return assertSchema("normandy/PreferenceRolloutArguments", obj); }
export function normandy_isPreferenceRollbackArguments(obj: object): obj is PreferenceRollbackArguments { return isSchema("normandy/PreferenceRollbackArguments", obj); }

@@ -46,12 +46,22 @@ export function normandy_checkPreferenceRollbackArguments(obj: object): SchemaResult { return checkSchema("normandy/PreferenceRollbackArguments", obj); }

export function normandy_isOptOutStudyArguments(obj: object): obj is OptOutStudyArguments { return isSchema("normandy/OptOutStudyArguments", obj); }
export function normandy_checkOptOutStudyArguments(obj: object): SchemaResult { return checkSchema("normandy/OptOutStudyArguments", obj); }
export function normandy_assertOptOutStudyArguments(obj: object): asserts obj is OptOutStudyArguments { return assertSchema("normandy/OptOutStudyArguments", obj); }
export function normandy_isShowHeartbeatArguments(obj: object): obj is ShowHeartbeatArguments { return isSchema("normandy/ShowHeartbeatArguments", obj); }
export function normandy_checkShowHeartbeatArguments(obj: object): SchemaResult { return checkSchema("normandy/ShowHeartbeatArguments", obj); }
export function normandy_assertShowHeartbeatArguments(obj: object): asserts obj is ShowHeartbeatArguments { return assertSchema("normandy/ShowHeartbeatArguments", obj); }
export function normandy_isMultiPreferenceExperimentArguments(obj: object): obj is MultiPreferenceExperimentArguments { return isSchema("normandy/MultiPreferenceExperimentArguments", obj); }
export function normandy_checkMultiPreferenceExperimentArguments(obj: object): SchemaResult { return checkSchema("normandy/MultiPreferenceExperimentArguments", obj); }
export function normandy_assertMultiPreferenceExperimentArguments(obj: object): asserts obj is MultiPreferenceExperimentArguments { return assertSchema("normandy/MultiPreferenceExperimentArguments", obj); }
export function normandy_isNormandyRecipe(obj: object): obj is NormandyRecipe { return isSchema("normandy/NormandyRecipe", obj); }
export function normandy_checkNormandyRecipe(obj: object): SchemaResult { return checkSchema("normandy/NormandyRecipe", obj); }
export function normandy_assertNormandyRecipe(obj: object): asserts obj is NormandyRecipe { return assertSchema("normandy/NormandyRecipe", obj); }
export function normandy_isAddonRolloutArguments(obj: object): obj is AddonRolloutArguments { return isSchema("normandy/AddonRolloutArguments", obj); }
export function normandy_checkAddonRolloutArguments(obj: object): SchemaResult { return checkSchema("normandy/AddonRolloutArguments", obj); }
export function normandy_assertAddonRolloutArguments(obj: object): asserts obj is AddonRolloutArguments { return assertSchema("normandy/AddonRolloutArguments", obj); }
export function normandy_isPreferenceRolloutArguments(obj: object): obj is PreferenceRolloutArguments { return isSchema("normandy/PreferenceRolloutArguments", obj); }
export function normandy_checkPreferenceRolloutArguments(obj: object): SchemaResult { return checkSchema("normandy/PreferenceRolloutArguments", obj); }
export function normandy_assertPreferenceRolloutArguments(obj: object): asserts obj is PreferenceRolloutArguments { return assertSchema("normandy/PreferenceRolloutArguments", obj); }
export function normandy_isMessagingExperimentArguments(obj: object): obj is MessagingExperimentArguments { return isSchema("normandy/MessagingExperimentArguments", obj); }

@@ -67,7 +77,2 @@ export function normandy_checkMessagingExperimentArguments(obj: object): SchemaResult { return checkSchema("normandy/MessagingExperimentArguments", obj); }

export function normandy_isAddonRolloutArguments(obj: object): obj is AddonRolloutArguments { return isSchema("normandy/AddonRolloutArguments", obj); }
export function normandy_checkAddonRolloutArguments(obj: object): SchemaResult { return checkSchema("normandy/AddonRolloutArguments", obj); }
export function normandy_assertAddonRolloutArguments(obj: object): asserts obj is AddonRolloutArguments { return assertSchema("normandy/AddonRolloutArguments", obj); }
export function normandy_isAddonRollbackArguments(obj: object): obj is AddonRollbackArguments { return isSchema("normandy/AddonRollbackArguments", obj); }

@@ -78,16 +83,11 @@ export function normandy_checkAddonRollbackArguments(obj: object): SchemaResult { return checkSchema("normandy/AddonRollbackArguments", obj); }

export function normandy_isConsoleLogArguments(obj: object): obj is ConsoleLogArguments { return isSchema("normandy/ConsoleLogArguments", obj); }
export function normandy_checkConsoleLogArguments(obj: object): SchemaResult { return checkSchema("normandy/ConsoleLogArguments", obj); }
export function normandy_assertConsoleLogArguments(obj: object): asserts obj is ConsoleLogArguments { return assertSchema("normandy/ConsoleLogArguments", obj); }
export function normandy_isMultiPreferenceExperimentArguments(obj: object): obj is MultiPreferenceExperimentArguments { return isSchema("normandy/MultiPreferenceExperimentArguments", obj); }
export function normandy_checkMultiPreferenceExperimentArguments(obj: object): SchemaResult { return checkSchema("normandy/MultiPreferenceExperimentArguments", obj); }
export function normandy_assertMultiPreferenceExperimentArguments(obj: object): asserts obj is MultiPreferenceExperimentArguments { return assertSchema("normandy/MultiPreferenceExperimentArguments", obj); }
export function targeting_isAudience(obj: object): obj is Audience { return isSchema("targeting/Audience", obj); }
export function targeting_checkAudience(obj: object): SchemaResult { return checkSchema("targeting/Audience", obj); }
export function targeting_assertAudience(obj: object): asserts obj is Audience { return assertSchema("targeting/Audience", obj); }
export function normandy_isOptOutStudyArguments(obj: object): obj is OptOutStudyArguments { return isSchema("normandy/OptOutStudyArguments", obj); }
export function normandy_checkOptOutStudyArguments(obj: object): SchemaResult { return checkSchema("normandy/OptOutStudyArguments", obj); }
export function normandy_assertOptOutStudyArguments(obj: object): asserts obj is OptOutStudyArguments { return assertSchema("normandy/OptOutStudyArguments", obj); }
export function test_isFoodColors(obj: object): obj is FoodColors { return isSchema("test/FoodColors", obj); }
export function test_checkFoodColors(obj: object): SchemaResult { return checkSchema("test/FoodColors", obj); }
export function test_assertFoodColors(obj: object): asserts obj is FoodColors { return assertSchema("test/FoodColors", obj); }

@@ -120,2 +120,14 @@ /**

featureValidationOptOut?: boolean;
/**
* 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.
*/
localizations?: {
[locale: string]: Record<string, string>;
};
}

@@ -122,0 +134,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc