import Subscription from './Subscription'; import * as types from '../types'; export default class ContentDistribution extends Subscription { /** * Get the query attributes. * * @returns {Array} */ getAttributes(): Array { return ['Id', 'Name', 'OwnerId', 'Password', 'IsDeleted', 'ViewCount', 'ExpiryDate', 'CreatedById', 'CreatedDate', 'LastViewDate', 'FirstViewDate', 'SystemModstamp', 'RelatedRecordId', 'ContentVersionId', 'LastModifiedById', 'LastModifiedDate', 'ContentDocumentId', 'PreferencesExpires', 'DistributionPublicUrl', 'PreferencesNotifyOnVisit', 'PreferencesAllowPDFDownload', 'PreferencesPasswordRequired', 'PreferencesLinkLatestVersion', 'PreferencesAllowViewInBrowser', 'PreferencesNotifyRndtnComplete', 'PreferencesAllowOriginalDownload']; } /** * Get the subscription context. * * @returns {types.Context} */ getContext(): types.Context { return { name: 'salesforce', subscription: 'contentDistribution', }; } /** * Get the subscription name. * * @returns {String} */ getName(): String { return 'ContentDistribution'; } /** * Get the subscription query. * * @returns {String} */ getQuery(): String { const attributes = this.getAttributes().join(', '); const time = this.getLastQueryTime(); return `SELECT ${attributes} FROM ContentDistribution WHERE CreatedDate >= ${time}`; } }