@optimizely/optimizely-sdk
Version:
JavaScript SDK for Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts
82 lines (81 loc) • 2.58 kB
TypeScript
/**
* Copyright 2016-2026, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Contains global enums used throughout the library
*/
import { Platform } from '../../platform_support';
export declare const LOG_LEVEL: {
NOTSET: number;
DEBUG: number;
INFO: number;
WARNING: number;
ERROR: number;
};
export declare const enum RESERVED_EVENT_KEYWORDS {
REVENUE = "revenue",
VALUE = "value"
}
export declare const CONTROL_ATTRIBUTES: {
BOT_FILTERING: string;
BUCKETING_ID: string;
STICKY_BUCKETING_KEY: string;
USER_AGENT: string;
};
export declare const JAVASCRIPT_CLIENT_ENGINE = "javascript-sdk";
export declare const NODE_CLIENT_ENGINE = "node-sdk";
export declare const REACT_NATIVE_JS_CLIENT_ENGINE = "react-native-js-sdk";
export declare const CLIENT_VERSION = "6.3.1";
export declare const DECISION_SOURCES: {
readonly FEATURE_TEST: "feature-test";
readonly ROLLOUT: "rollout";
readonly EXPERIMENT: "experiment";
readonly HOLDOUT: "holdout";
};
export type DecisionSource = typeof DECISION_SOURCES[keyof typeof DECISION_SOURCES];
export declare const AUDIENCE_EVALUATION_TYPES: {
RULE: string;
EXPERIMENT: string;
};
export declare const FEATURE_VARIABLE_TYPES: {
BOOLEAN: string;
DOUBLE: string;
INTEGER: string;
STRING: string;
JSON: string;
};
export declare const DATAFILE_VERSIONS: {
V2: string;
V3: string;
V4: string;
};
export declare const enum VERSION_TYPE {
PRE_RELEASE_VERSION_DELIMITER = "-",
BUILD_VERSION_DELIMITER = "+"
}
export declare const DECISION_MESSAGES: {
SDK_NOT_READY: string;
FLAG_KEY_INVALID: string;
VARIABLE_VALUE_INVALID: string;
};
/**
* Default milliseconds before request timeout
*/
export declare const REQUEST_TIMEOUT_MS: number;
export declare const DEFAULT_CMAB_CACHE_TIMEOUT_MS: number;
export declare const DEFAULT_CMAB_CACHE_SIZE = 10000;
export declare const DEFAULT_CMAB_RETRIES = 1;
export declare const DEFAULT_CMAB_BACKOFF_MS = 100;
export declare const __platforms: Platform[];