import Subscription from './Subscription'; import * as types from '../types'; export default class ContentDistributionView extends Subscription { /** * Get the query attributes. * * @returns {Array} */ getAttributes(): Array { return ['Id', 'IsDeleted', 'IsDownload', 'IsInternal', 'CreatedById', 'CreatedDate', 'ParentViewId', 'DistributionId', 'SystemModstamp']; } /** * Get the subscription context. * * @returns {types.Context} */ getContext(): types.Context { return { name: 'salesforce', subscription: 'contentDistributionView', }; } /** * Get the subscription name. * * @returns {String} */ getName(): String { return 'ContentDistributionView'; } /** * Get the subscription query. * * @returns {String} */ getQuery(): String { const attributes = this.getAttributes().join(', '); const time = this.getLastQueryTime(); return `SELECT ${attributes} FROM ContentDistributionView WHERE CreatedDate >= ${time}`; } }