Home Reference Source

lib6/notification-filter.js

/**
 * @typedef {'WARNING' | 'INFORMATION' | 'OFF'} NotificationFilterMinimumSeverityLevel
 */
/**
 * Constants that represents the minimum Severity level in the {@link NotificationFilter}
 */
const notificationFilterMinimumSeverityLevel = {
    OFF: 'OFF',
    WARNING: 'WARNING',
    INFORMATION: 'INFORMATION'
};
Object.freeze(notificationFilterMinimumSeverityLevel);
/**
 * @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC'} NotificationFilterDisabledCategory
 */
/**
 * Constants that represents the disabled categories in the {@link NotificationFilter}
 */
const notificationFilterDisabledCategory = {
    HINT: 'HINT',
    UNRECOGNIZED: 'UNRECOGNIZED',
    UNSUPPORTED: 'UNSUPPORTED',
    PERFORMANCE: 'PERFORMANCE',
    TOPOLOGY: 'TOPOLOGY',
    SECURITY: 'SECURITY',
    DEPRECATION: 'DEPRECATION',
    GENERIC: 'GENERIC'
};
Object.freeze(notificationFilterDisabledCategory);
/**
 * @typedef {NotificationFilterDisabledCategory} NotificationFilterDisabledClassification
 * @experimental
 */
/**
 * Constants that represents the disabled classifications in the {@link NotificationFilter}
 *
 * @type {notificationFilterDisabledCategory}
 * @experimental
 */
const notificationFilterDisabledClassification = notificationFilterDisabledCategory;
/**
 * The notification filter object which can be configured in
 * the session and driver creation.
 *
 * Values not defined are interpreted as default.
 *
 * @interface
 */
class NotificationFilter {
    /**
     * @constructor
     * @private
     */
    constructor() {
        /**
         * The minimum level of all notifications to receive.
         *
         * @public
         * @type {?NotificationFilterMinimumSeverityLevel}
         */
        this.minimumSeverityLevel = undefined;
        /**
         * Categories the user would like to opt-out of receiving.
         *
         *
         * This property is equivalent to {@link NotificationFilter#disabledClassifications}
         * and it must not be enabled at same time.
         *
         * @type {?NotificationFilterDisabledCategory[]}
         */
        this.disabledCategories = undefined;
        /**
         * Classifications the user would like to opt-out of receiving.
         *
         * This property is equivalent to {@link NotificationFilter#disabledCategories}
         * and it must not be enabled at same time.
         *
         * @type {?NotificationFilterDisabledClassification[]}
         * @experimental
         */
        this.disabledClassifications = undefined;
        throw new Error('Not implemented');
    }
}
export default NotificationFilter;
export { notificationFilterMinimumSeverityLevel, notificationFilterDisabledCategory, notificationFilterDisabledClassification };