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