@splitsoftware/splitio-commons
Version:
Split JavaScript SDK common components
41 lines (40 loc) • 1.83 kB
JavaScript
// time for refresh token
export var SECONDS_BEFORE_EXPIRATION = 600;
// Internal SDK events, subscribed by SyncManager and PushManager
/**
* emitted on SSE and Authenticate non-recoverable errors, STREAMING_DISABLED control notification and authentication with pushEnabled false
* triggers `handleNonRetryableError` call
*/
export var PUSH_NON_RETRYABLE_ERROR = 'PUSH_NON_RETRYABLE_ERROR';
/**
* emitted on SSE and Authenticate recoverable errors
* triggers `handleRetryableError` call
*/
export var PUSH_RETRYABLE_ERROR = 'PUSH_RETRYABLE_ERROR';
/**
* emitted on STREAMING_RESUMED control notification, OCCUPANCY different than 0, and SSE onopen event
* triggers `stopPollingAndSyncAll` call
*/
export var PUSH_SUBSYSTEM_UP = 'PUSH_SUBSYSTEM_UP';
/**
* emitted on STREAMING_PAUSED control notification, OCCUPANCY equal to 0, PUSH_NON_RETRYABLE_ERROR and PUSH_RETRYABLE_ERROR events.
* triggers `startPolling` and `stopWorkers` calls
*/
export var PUSH_SUBSYSTEM_DOWN = 'PUSH_SUBSYSTEM_DOWN';
// Update-type push notifications, handled by NotificationProcessor
export var MEMBERSHIPS_MS_UPDATE = 'MEMBERSHIPS_MS_UPDATE';
export var MEMBERSHIPS_LS_UPDATE = 'MEMBERSHIPS_LS_UPDATE';
export var SEGMENT_UPDATE = 'SEGMENT_UPDATE';
export var SPLIT_KILL = 'SPLIT_KILL';
export var SPLIT_UPDATE = 'SPLIT_UPDATE';
export var RB_SEGMENT_UPDATE = 'RB_SEGMENT_UPDATE';
// Control-type push notifications, handled by NotificationKeeper
export var CONTROL = 'CONTROL';
export var OCCUPANCY = 'OCCUPANCY';
export var ControlType;
(function (ControlType) {
ControlType["STREAMING_DISABLED"] = "STREAMING_DISABLED";
ControlType["STREAMING_PAUSED"] = "STREAMING_PAUSED";
ControlType["STREAMING_RESUMED"] = "STREAMING_RESUMED";
ControlType["STREAMING_RESET"] = "STREAMING_RESET";
})(ControlType || (ControlType = {}));