UNPKG

@splitsoftware/splitio-commons

Version:
44 lines (43 loc) 2.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ControlType = exports.OCCUPANCY = exports.CONTROL = exports.RB_SEGMENT_UPDATE = exports.SPLIT_UPDATE = exports.SPLIT_KILL = exports.SEGMENT_UPDATE = exports.MEMBERSHIPS_LS_UPDATE = exports.MEMBERSHIPS_MS_UPDATE = exports.PUSH_SUBSYSTEM_DOWN = exports.PUSH_SUBSYSTEM_UP = exports.PUSH_RETRYABLE_ERROR = exports.PUSH_NONRETRYABLE_ERROR = exports.SECONDS_BEFORE_EXPIRATION = void 0; // time for refresh token exports.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 */ exports.PUSH_NONRETRYABLE_ERROR = 'PUSH_NONRETRYABLE_ERROR'; /** * emitted on SSE and Authenticate recoverable errors * triggers `handleRetryableError` call */ exports.PUSH_RETRYABLE_ERROR = 'PUSH_RETRYABLE_ERROR'; /** * emitted on STREAMING_RESUMED control notification, OCCUPANCY different than 0, and SSE onopen event * triggers `stopPollingAndSyncAll` call */ exports.PUSH_SUBSYSTEM_UP = 'PUSH_SUBSYSTEM_UP'; /** * emitted on STREAMING_PAUSED control notification, OCCUPANCY equal to 0, PUSH_NONRETRYABLE_ERROR and PUSH_RETRYABLE_ERROR events. * triggers `startPolling` and `stopWorkers` calls */ exports.PUSH_SUBSYSTEM_DOWN = 'PUSH_SUBSYSTEM_DOWN'; // Update-type push notifications, handled by NotificationProcessor exports.MEMBERSHIPS_MS_UPDATE = 'MEMBERSHIPS_MS_UPDATE'; exports.MEMBERSHIPS_LS_UPDATE = 'MEMBERSHIPS_LS_UPDATE'; exports.SEGMENT_UPDATE = 'SEGMENT_UPDATE'; exports.SPLIT_KILL = 'SPLIT_KILL'; exports.SPLIT_UPDATE = 'SPLIT_UPDATE'; exports.RB_SEGMENT_UPDATE = 'RB_SEGMENT_UPDATE'; // Control-type push notifications, handled by NotificationKeeper exports.CONTROL = 'CONTROL'; exports.OCCUPANCY = 'OCCUPANCY'; 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 = exports.ControlType || (exports.ControlType = {}));