import { Event } from "../../../base/common/event.js"; import type { IExperimentationFilterProvider } from "tas-client"; export declare const ASSIGNMENT_STORAGE_KEY = "VSCode.ABExp.FeatureData"; export declare const ASSIGNMENT_REFETCH_INTERVAL: number; export interface IAssignmentService { readonly _serviceBrand: undefined; readonly onDidRefetchAssignments: Event; getTreatment(name: string): Promise; } export declare enum TargetPopulation { Insiders = "insider", Public = "public", Exploration = "exploration" } export declare enum Filters { /** * The market in which the extension is distributed. */ Market = "X-MSEdge-Market", /** * The corporation network. */ CorpNet = "X-FD-Corpnet", /** * Version of the application which uses experimentation service. */ ApplicationVersion = "X-VSCode-AppVersion", /** * Insiders vs Stable. */ Build = "X-VSCode-Build", /** * Client Id which is used as primary unit for the experimentation. */ ClientId = "X-MSEdge-ClientId", /** * Developer Device Id which can be used as an alternate unit for experimentation. */ DeveloperDeviceId = "X-VSCode-DevDeviceId", /** * Extension header. */ ExtensionName = "X-VSCode-ExtensionName", /** * The version of the extension. */ ExtensionVersion = "X-VSCode-ExtensionVersion", /** * The language in use by VS Code */ Language = "X-VSCode-Language", /** * The target population. * This is used to separate internal, early preview, GA, etc. */ TargetPopulation = "X-VSCode-TargetPopulation", /** * The platform (OS) on which VS Code is running. */ Platform = "X-VSCode-Platform", /** * The release/build date of VS Code (UTC) in the format yyyymmddHH. */ ReleaseDate = "X-VSCode-ReleaseDate", /** * The kind of window VS Code is running in (`editor` or `agents`). */ WindowKind = "X-VSCode-WindowKind" } export declare enum WindowKind { Editor = "editor", Agents = "agents" } export declare class AssignmentFilterProvider implements IExperimentationFilterProvider { private version; private appName; private machineId; private devDeviceId; private targetPopulation; private releaseDate; private windowKind; constructor(version: string, appName: string, machineId: string, devDeviceId: string, targetPopulation: TargetPopulation, releaseDate: string, windowKind: WindowKind); getFilterValue(filter: string): string | null; getFilters(): Map; } /** * userParam names for the new TAS assignments API (POST /api/v1/assignments), emitted by * {@link VSCodeCoreAssignmentsFilterProvider}. These replace the legacy header keys and * are sent only to the new endpoint. */ export declare enum AssignmentsFilters { ApplicationVersion = "vscode_core_appversion", Build = "vscode_core_build", DeveloperDeviceId = "devdeviceid", ExtensionName = "vscode_core_extensionname", ExtensionNameShort = "extensionname", TargetPopulation = "vscode_core_targetpopulation", Platform = "vscode_core_platform", ReleaseDate = "vscode_core_releasedate", WindowKind = "vscode_core_windowkind" } /** * Emits the generic VS Code core filters for the new TAS assignments API using the new * userParam key names, so the assignments endpoint never receives the legacy header keys. */ export declare class VSCodeCoreAssignmentsFilterProvider implements IExperimentationFilterProvider { private version; private appName; private devDeviceId; private targetPopulation; private releaseDate; private windowKind; constructor(version: string, appName: string, devDeviceId: string, targetPopulation: TargetPopulation, releaseDate: string, windowKind: WindowKind); getFilterValue(filter: string): string | null; getFilters(): Map; } export declare function getInternalOrg(organisations: readonly string[] | undefined): "vscode" | "github" | "microsoft" | undefined; /** Whether the account is staff or belongs to an internal org; the machine half is `verifyMicrosoftInternalDomain`. */ export declare function isInternalAccount(isStaff: boolean | undefined, organisations: readonly string[] | undefined): boolean;