Client side repository event observables for sensenet

Usage no npm install needed!

<script type="module">
  import sensenetRepositoryEvents from 'https://cdn.skypack.dev/@sensenet/repository-events';



This NPM package contains event observables that can be used for tracking sensenet repository events.

NPM version NPM downloads License: GPL v2


# Yarn
yarn add @sensenet/repository-events

npm install @sensenet/repository-events


const repository = new Repository({})
const eventHub = new EventHub(repository)

// subscribe to a Content Created event
eventHub.onContentCreated.subscribe(createdContent => {
  console.log('New Content created:', createdContent)

The available events are:

  • onContentCreated
  • onContentCreateFailed
  • onContentModified
  • onContentModificationFailed
  • onContentLoaded
  • onContentDeleted
  • onContentDeleteFailed
  • onCustomActionExecuted
  • onCustomActionFailed
  • onContentMoved
  • onContentMoveFailed
  • onContentCopyFailed
  • onUploadFinished
  • onUploadFailed