Notification
Mixin Extends:
Helper class representing a user Notification.
Constructor Summary
Public Constructor | ||
public |
constructor(json: Object) Constructor for helper class representing a Notification |
Method Summary
Public Methods | ||
public |
async delete(): Promise<Notification> Deletes a notification |
|
public |
async read(): Promise<Notification> Sets the status of the current instance of Notification to read |
|
public |
async save(): Promise<Notification> Updates an existing notification (insert is not currently supported) |
Inherited Summary
From class NotificationModel | ||
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Public Constructors
public constructor(json: Object) source
Constructor for helper class representing a Notification
Override:
NotificationModel#constructorParams:
Name | Type | Attribute | Description |
json | Object | json api response from server |
Public Members
Private Members
Public Methods
public async delete(): Promise<Notification> source
Deletes a notification
Example:
import { Notification, notificationService } from 'clinical6';
const notification = new Notification({...});
// Deletes notification
notification.delete();
public async read(): Promise<Notification> source
Sets the status of the current instance of Notification to read
Example:
import { Notification } from 'clinical6';
// Read notification from manually created notification
notification = new Notification({ id: '16' });
notification.read();
// Read notification from the list of notifications
notificationService.get().then(notifications => notifications[0].read());
public async save(): Promise<Notification> source
Updates an existing notification (insert is not currently supported)
Example:
import { Notification, notificationService } from 'clinical6';
const notification = new Notification({ id: 16, ...});
// Updates notification
notification.save();