import Subscription from './Subscription'; import * as types from '../types'; export default class ContentWorkspace extends Subscription { /** * Get the query attributes. * * @returns {Array} */ getAttributes(): Array { return ['Id', 'Name', 'TagModel', 'CreatedById', 'CreatedDate', 'Description', 'DeveloperName', 'WorkspaceType', 'SystemModstamp', 'NamespacePrefix', 'LastModifiedById', 'LastModifiedDate', 'DefaultRecordTypeId', 'RootContentFolderId', 'IsRestrictContentTypes', 'LastWorkspaceActivityDate', 'IsRestrictLinkedContentTypes']; } /** * Get the subscription context. * * @returns {types.Context} */ getContext(): types.Context { return { name: 'salesforce', subscription: 'contentWorkspace', }; } /** * Get the subscription name. * * @returns {String} */ getName(): String { return 'ContentWorkspace'; } /** * Get the subscription query. * * @returns {String} */ getQuery(): String { const attributes = this.getAttributes().join(', '); const time = this.getLastQueryTime(); return `SELECT ${attributes} FROM ContentWorkspace WHERE CreatedDate >= ${time}`; } }