Optional
realtime: RealtimeCreates a new event.
Response wrapped in IResult
Example
const mandantoryObject: IEvent = {
source: device,
text: 'I am an Event!',
time: '2018-05-02T10:08:00Z',
type: 'device-type-here',
};
(async () => {
const {data, res} = await eventService.create(mandantoryObject);
})();
Event object with mandantory fragments.
entity or id of the event.
Example
const eventId: number = 1;
(async () => {
const {data, res} = await eventService.delete(eventId);
// data will be null
})();
Gets the details of a specific event.
Response wrapped in IResult
Example
const eventId: number = 1;
(async () => {
const {data, res} = await eventService.detail(eventId);
})();
Entity or Id of the entity.
Object containing filters for querying events.
Example
const filter: object = {
pageSize: 100,
withTotalPages: true
};
(async () => {
const {data, res, paging} = await eventService.list(filter);
})();
Updates event data.
Response wrapped in IResult
Example
const partialUpdateObject: Partial<IEvent> = {
source: device,
text: 'Changed Event!'
};
(async () => {
const {data, res} = await eventService.update(partialUpdateObject);
})();
Event is partially updatable.
This class allows managing for events.