UNPKG

@optimizely/optimizely-sdk

Version:

JavaScript SDK for Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts

90 lines (89 loc) 7.78 kB
/** * Copyright 2024-2025, 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 * * https://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. */ import { Platform } from '../platform_support'; export declare const NOTIFICATION_LISTENER_EXCEPTION = "Notification listener for (%s) threw exception: %s"; export declare const CONDITION_EVALUATOR_ERROR = "Error evaluating audience condition of type %s: %s"; export declare const EXPERIMENT_KEY_NOT_IN_DATAFILE = "Experiment key %s is not in datafile."; export declare const FEATURE_NOT_IN_DATAFILE = "Feature key %s is not in datafile."; export declare const INVALID_ATTRIBUTES = "Provided attributes are in an invalid format."; export declare const INVALID_BUCKETING_ID = "Unable to generate hash for bucketing ID %s: %s"; export declare const INVALID_DATAFILE = "Datafile is invalid - property %s: %s"; export declare const INVALID_DATAFILE_MALFORMED = "Datafile is invalid because it is malformed."; export declare const INVALID_CONFIG = "Provided Optimizely config is in an invalid format."; export declare const INVALID_JSON = "JSON object is not valid."; export declare const INVALID_EVENT_TAGS = "Provided event tags are in an invalid format."; export declare const INVALID_EXPERIMENT_KEY = "Experiment key %s is not in datafile. It is either invalid, paused, or archived."; export declare const INVALID_EXPERIMENT_ID = "Experiment ID %s is not in datafile."; export declare const INVALID_GROUP_ID = "Group ID %s is not in datafile."; export declare const INVALID_USER_ID = "Provided user ID is in an invalid format."; export declare const INVALID_USER_PROFILE_SERVICE = "Provided user profile service instance is in an invalid format: %s."; export declare const MISSING_INTEGRATION_KEY = "Integration key missing from datafile. All integrations should include a key."; export declare const NO_DATAFILE_SPECIFIED = "No datafile specified. Cannot start optimizely."; export declare const NO_JSON_PROVIDED = "No JSON object to validate against schema."; export declare const NO_EVENT_PROCESSOR = "No event processor is provided"; export declare const NO_VARIATION_FOR_EXPERIMENT_KEY = "No variation key %s defined in datafile for experiment %s."; export declare const ODP_CONFIG_NOT_AVAILABLE = "ODP config is not available."; export declare const ODP_EVENT_FAILED = "ODP event send failed."; export declare const ODP_EVENTS_SHOULD_HAVE_ATLEAST_ONE_KEY_VALUE = "ODP events should have at least one key-value pair in identifiers."; export declare const ODP_MANAGER_MISSING = "ODP Manager is missing. %s failed."; export declare const ODP_NOT_INTEGRATED = "ODP is not integrated"; export declare const UNDEFINED_ATTRIBUTE = "Provided attribute: %s has an undefined value."; export declare const UNRECOGNIZED_ATTRIBUTE = "Unrecognized attribute %s provided. Pruning before sending event to Optimizely."; export declare const UNABLE_TO_CAST_VALUE = "Unable to cast value %s to type %s, returning null."; export declare const USER_NOT_IN_FORCED_VARIATION = "User %s is not in the forced variation map. Cannot remove their forced variation."; export declare const USER_PROFILE_LOOKUP_ERROR = "Error while looking up user profile for user ID \"%s\": %s."; export declare const USER_PROFILE_SAVE_ERROR = "Error while saving user profile for user ID \"%s\": %s."; export declare const VARIABLE_KEY_NOT_IN_DATAFILE = "Variable with key \"%s\" associated with feature with key \"%s\" is not in datafile."; export declare const VARIATION_ID_NOT_IN_DATAFILE = "Variation ID %s is not in the datafile."; export declare const INVALID_INPUT_FORMAT = "Provided %s is in an invalid format."; export declare const INVALID_DATAFILE_VERSION = "This version of the JavaScript SDK does not support the given datafile version: %s"; export declare const INVALID_VARIATION_KEY = "Provided variation key is in an invalid format."; export declare const ERROR_FETCHING_DATAFILE = "Error fetching datafile: %s"; export declare const DATAFILE_FETCH_REQUEST_FAILED = "Datafile fetch request failed with status: %s"; export declare const EVENT_DATA_INVALID = "Event data invalid."; export declare const EVENT_ACTION_INVALID = "Event action invalid."; export declare const FAILED_TO_SEND_ODP_EVENTS = "failed to send odp events"; export declare const UNABLE_TO_GET_VUID_VUID_MANAGER_NOT_AVAILABLE = "Unable to get VUID - VuidManager is not available"; export declare const UNKNOWN_CONDITION_TYPE = "Audience condition %s has an unknown condition type. You may need to upgrade to a newer release of the Optimizely SDK."; export declare const UNKNOWN_MATCH_TYPE = "Audience condition %s uses an unknown match type. You may need to upgrade to a newer release of the Optimizely SDK."; export declare const UNRECOGNIZED_DECIDE_OPTION = "Unrecognized decide option %s provided."; export declare const NO_PROJECT_CONFIG_FAILURE = "No project config available. Failing %s."; export declare const EVENT_KEY_NOT_FOUND = "Event key %s is not in datafile."; export declare const NOT_TRACKING_USER = "Not tracking user %s."; export declare const VARIABLE_REQUESTED_WITH_WRONG_TYPE = "Requested variable type \"%s\", but variable is of type \"%s\". Use correct API to retrieve value. Returning None."; export declare const UNEXPECTED_RESERVED_ATTRIBUTE_PREFIX = "Attribute %s unexpectedly has reserved prefix %s; using attribute ID instead of reserved attribute name."; export declare const BUCKETING_ID_NOT_STRING = "BucketingID attribute is not a string. Defaulted to userId"; export declare const UNEXPECTED_CONDITION_VALUE = "Audience condition %s evaluated to UNKNOWN because the condition value is not supported."; export declare const UNEXPECTED_TYPE = "Audience condition %s evaluated to UNKNOWN because a value of type \"%s\" was passed for user attribute \"%s\"."; export declare const OUT_OF_BOUNDS = "Audience condition %s evaluated to UNKNOWN because the number value for user attribute \"%s\" is not in the range [-2^53, +2^53]."; export declare const REQUEST_TIMEOUT = "Request timeout"; export declare const REQUEST_ERROR = "Request error"; export declare const NO_STATUS_CODE_IN_RESPONSE = "No status code in response"; export declare const UNSUPPORTED_PROTOCOL = "Unsupported protocol: %s"; export declare const RETRY_CANCELLED = "Retry cancelled"; export declare const ONLY_POST_REQUESTS_ARE_SUPPORTED = "Only POST requests are supported"; export declare const SEND_BEACON_FAILED = "sendBeacon failed"; export declare const FAILED_TO_DISPATCH_EVENTS = "Failed to dispatch events, status: %s"; export declare const ODP_EVENT_MANAGER_STOPPED = "ODP event manager stopped before it could start"; export declare const UNABLE_TO_ATTACH_UNLOAD = "unable to bind optimizely.close() to page unload event: \"%s\""; export declare const UNABLE_TO_PARSE_AND_SKIPPED_HEADER = "Unable to parse & skipped header item"; export declare const CMAB_FETCH_FAILED = "CMAB decision fetch failed with status: %s"; export declare const INVALID_CMAB_FETCH_RESPONSE = "Invalid CMAB fetch response"; export declare const PROMISE_NOT_ALLOWED = "Promise value is not allowed in sync operation"; export declare const SERVICE_NOT_RUNNING = "%s not running"; export declare const EVENT_STORE_FULL = "Event store is full. Not saving event with id %d."; export declare const messages: string[]; export declare const __platforms: Platform[];