UNPKG

@firebolt-js/discovery-sdk

Version:
106 lines (90 loc) 2.16 kB
/* * Copyright 2021 Comcast Cable Communications Management, LLC * * 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 * * http://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. * * SPDX-License-Identifier: Apache-2.0 */ import Transport from '../Transport/index.mjs' import Events from '../Events/index.mjs' import { registerEvents } from '../Events/index.mjs' registerEvents('Content', ['userInterest']) // onUserInterest is accessed via listen('userInterest, ...) // Methods function clear(...args) { return Events.clear('Content', ...args) } function listen(...args) { return Events.listen('Content', ...args) } function once(...args) { return Events.once('Content', ...args) } function requestUserInterest(type, reason) { const transforms = null return Transport.send( 'Content', 'requestUserInterest', { type, reason }, transforms, ) } export default { Events: { USER_INTEREST: 'userInterest', }, /** * */ InterestType: { INTEREST: 'interest', DISINTEREST: 'disinterest', }, /** * */ InterestReason: { PLAYLIST: 'playlist', REACTION: 'reaction', RECORDING: 'recording', }, /** * The offering type of the WayToWatch. */ OfferingType: { FREE: 'free', SUBSCRIBE: 'subscribe', BUY: 'buy', RENT: 'rent', }, /** * */ AudioProfile: { STEREO: 'stereo', DOLBY_DIGITAL_5_1: 'dolbyDigital5.1', DOLBY_DIGITAL_5_1_PLUS: 'dolbyDigital5.1+', DOLBY_ATMOS: 'dolbyAtmos', }, /** * In the case of a music `entityType`, specifies the type of music entity. */ MusicType: { SONG: 'song', ALBUM: 'album', }, clear, listen, once, requestUserInterest, }