UNPKG

@splitsoftware/splitio-commons

Version:
101 lines (100 loc) 5.58 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MEMBERSHIPS = exports.SEGMENT = exports.TOKEN = exports.TELEMETRY = exports.EVENTS = exports.IMPRESSIONS_COUNT = exports.IMPRESSIONS = exports.SPLITS = exports.NONE_ENUM = exports.DEBUG_ENUM = exports.OPTIMIZED_ENUM = exports.CONSUMER_PARTIAL_ENUM = exports.CONSUMER_ENUM = exports.STANDALONE_ENUM = exports.DEDUPED = exports.DROPPED = exports.QUEUED = exports.NAMES_FN_LABEL = exports.SPLITS_FN_LABEL = exports.SPLIT_FN_LABEL = exports.TRACK_FN_LABEL = exports.GET_TREATMENTS_WITH_CONFIG_BY_FLAG_SETS = exports.GET_TREATMENTS_WITH_CONFIG_BY_FLAG_SET = exports.GET_TREATMENTS_BY_FLAG_SETS = exports.GET_TREATMENTS_BY_FLAG_SET = exports.GET_TREATMENTS_WITH_CONFIG = exports.GET_TREATMENT_WITH_CONFIG = exports.GET_TREATMENTS = exports.GET_TREATMENT = exports.CONSENT_UNKNOWN = exports.CONSENT_DECLINED = exports.CONSENT_GRANTED = exports.STORAGE_PLUGGABLE = exports.STORAGE_REDIS = exports.STORAGE_LOCALSTORAGE = exports.STORAGE_MEMORY = exports.CONSUMER_PARTIAL_MODE = exports.CONSUMER_MODE = exports.PRODUCER_MODE = exports.STANDALONE_MODE = exports.LOCALHOST_MODE = exports.NONE = exports.OPTIMIZED = exports.DEBUG = exports.SPLIT_EVENT = exports.SPLIT_IMPRESSION = exports.NA = exports.UNKNOWN = exports.CONTROL_WITH_CONFIG = exports.CONTROL = void 0; exports.RULE_BASED_SEGMENT = exports.LARGE_SEGMENT = exports.STANDARD_SEGMENT = exports.IN_RULE_BASED_SEGMENT = exports.IN_LARGE_SEGMENT = exports.IN_SEGMENT = exports.FLAG_SPEC_VERSION = exports.PAUSED = exports.ENABLED = exports.DISABLED = exports.NON_REQUESTED = exports.REQUESTED = exports.POLLING = exports.STREAMING = exports.AUTH_REJECTION = exports.SYNC_MODE_UPDATE = exports.ABLY_ERROR = exports.TOKEN_REFRESH = exports.SSE_CONNECTION_ERROR = exports.STREAMING_STATUS = exports.OCCUPANCY_SEC = exports.OCCUPANCY_PRI = exports.CONNECTION_ESTABLISHED = exports.TRACK = exports.TREATMENTS_WITH_CONFIG_BY_FLAGSETS = exports.TREATMENTS_WITH_CONFIG_BY_FLAGSET = exports.TREATMENTS_BY_FLAGSETS = exports.TREATMENTS_BY_FLAGSET = exports.TREATMENTS_WITH_CONFIG = exports.TREATMENT_WITH_CONFIG = exports.TREATMENTS = exports.TREATMENT = void 0; // Special treatments exports.CONTROL = 'control'; exports.CONTROL_WITH_CONFIG = { treatment: exports.CONTROL, config: null }; // Constants for unknown and not-applicable values exports.UNKNOWN = 'unknown'; exports.NA = 'NA'; // Integration data types exports.SPLIT_IMPRESSION = 'IMPRESSION'; exports.SPLIT_EVENT = 'EVENT'; // Impression collection modes exports.DEBUG = 'DEBUG'; exports.OPTIMIZED = 'OPTIMIZED'; exports.NONE = 'NONE'; // SDK Modes exports.LOCALHOST_MODE = 'localhost'; exports.STANDALONE_MODE = 'standalone'; exports.PRODUCER_MODE = 'producer'; exports.CONSUMER_MODE = 'consumer'; exports.CONSUMER_PARTIAL_MODE = 'consumer_partial'; // Storage types exports.STORAGE_MEMORY = 'MEMORY'; exports.STORAGE_LOCALSTORAGE = 'LOCALSTORAGE'; exports.STORAGE_REDIS = 'REDIS'; exports.STORAGE_PLUGGABLE = 'PLUGGABLE'; // User consent exports.CONSENT_GRANTED = 'GRANTED'; // The user has granted consent for tracking events and impressions exports.CONSENT_DECLINED = 'DECLINED'; // The user has declined consent for tracking events and impressions exports.CONSENT_UNKNOWN = 'UNKNOWN'; // The user has neither granted nor declined consent for tracking events and impressions // Client method names exports.GET_TREATMENT = 'getTreatment'; exports.GET_TREATMENTS = 'getTreatments'; exports.GET_TREATMENT_WITH_CONFIG = 'getTreatmentWithConfig'; exports.GET_TREATMENTS_WITH_CONFIG = 'getTreatmentsWithConfig'; exports.GET_TREATMENTS_BY_FLAG_SET = 'getTreatmentsByFlagSet'; exports.GET_TREATMENTS_BY_FLAG_SETS = 'getTreatmentsByFlagSets'; exports.GET_TREATMENTS_WITH_CONFIG_BY_FLAG_SET = 'getTreatmentsWithConfigByFlagSet'; exports.GET_TREATMENTS_WITH_CONFIG_BY_FLAG_SETS = 'getTreatmentsWithConfigByFlagSets'; exports.TRACK_FN_LABEL = 'track'; // Manager method names exports.SPLIT_FN_LABEL = 'split'; exports.SPLITS_FN_LABEL = 'splits'; exports.NAMES_FN_LABEL = 'names'; // Telemetry exports.QUEUED = 0; exports.DROPPED = 1; exports.DEDUPED = 2; exports.STANDALONE_ENUM = 0; exports.CONSUMER_ENUM = 1; exports.CONSUMER_PARTIAL_ENUM = 2; exports.OPTIMIZED_ENUM = 0; exports.DEBUG_ENUM = 1; exports.NONE_ENUM = 2; exports.SPLITS = 'sp'; exports.IMPRESSIONS = 'im'; exports.IMPRESSIONS_COUNT = 'ic'; exports.EVENTS = 'ev'; exports.TELEMETRY = 'te'; exports.TOKEN = 'to'; exports.SEGMENT = 'se'; exports.MEMBERSHIPS = 'ms'; exports.TREATMENT = 't'; exports.TREATMENTS = 'ts'; exports.TREATMENT_WITH_CONFIG = 'tc'; exports.TREATMENTS_WITH_CONFIG = 'tcs'; exports.TREATMENTS_BY_FLAGSET = 'tf'; exports.TREATMENTS_BY_FLAGSETS = 'tfs'; exports.TREATMENTS_WITH_CONFIG_BY_FLAGSET = 'tcf'; exports.TREATMENTS_WITH_CONFIG_BY_FLAGSETS = 'tcfs'; exports.TRACK = 'tr'; exports.CONNECTION_ESTABLISHED = 0; exports.OCCUPANCY_PRI = 10; exports.OCCUPANCY_SEC = 20; exports.STREAMING_STATUS = 30; exports.SSE_CONNECTION_ERROR = 40; exports.TOKEN_REFRESH = 50; exports.ABLY_ERROR = 60; exports.SYNC_MODE_UPDATE = 70; exports.AUTH_REJECTION = 80; exports.STREAMING = 0; exports.POLLING = 1; exports.REQUESTED = 0; exports.NON_REQUESTED = 1; exports.DISABLED = 0; exports.ENABLED = 1; exports.PAUSED = 2; exports.FLAG_SPEC_VERSION = '1.3'; // Matcher types exports.IN_SEGMENT = 'IN_SEGMENT'; exports.IN_LARGE_SEGMENT = 'IN_LARGE_SEGMENT'; exports.IN_RULE_BASED_SEGMENT = 'IN_RULE_BASED_SEGMENT'; exports.STANDARD_SEGMENT = 'standard'; exports.LARGE_SEGMENT = 'large'; exports.RULE_BASED_SEGMENT = 'rule-based';