@limetech/lime-web-components
Advanced tools
Comparing version 5.33.0 to 5.33.1
@@ -7,7 +7,44 @@ /** | ||
*/ | ||
export type Notification = { | ||
export type Notification<T = unknown> = { | ||
/** | ||
* The notification id | ||
*/ | ||
id: number; | ||
iduser: number; | ||
read: Boolean; | ||
/** | ||
* Type of notification | ||
*/ | ||
type?: NotificationType; | ||
/** | ||
* ID of the user the notification belongs to | ||
*/ | ||
userId: number; | ||
/** | ||
* Date when the notification was marked as read | ||
*/ | ||
read?: Date; | ||
/** | ||
* Date when the notification was created | ||
*/ | ||
createdTime: Date; | ||
/** | ||
* ID of the user that created the notification | ||
*/ | ||
createdUser: number; | ||
/** | ||
* Limetype that the notification is attached to | ||
*/ | ||
limetype?: string; | ||
/** | ||
* ID of the object the notification is attached to | ||
*/ | ||
objectId?: number; | ||
/** | ||
* Data attached to the notification | ||
*/ | ||
data?: T; | ||
}; | ||
/** | ||
* @alpha | ||
*/ | ||
export type NotificationType = 'mention'; | ||
//# sourceMappingURL=notification.d.ts.map |
@@ -10,3 +10,3 @@ import { Notification } from './notification'; | ||
/** | ||
* Gets all notifications | ||
* Load all notifications belonging to the logged in user from the server | ||
* | ||
@@ -17,29 +17,23 @@ * @param options - options to provide when loading notifications | ||
*/ | ||
loadNotifications(options?: NotificationLoadOptions): Promise<NotificationResponse | undefined>; | ||
loadAll(options?: NotificationLoadOptions): Promise<NotificationResponse>; | ||
/** | ||
* Creates a notification | ||
* Gets a loaded notification by its id | ||
* | ||
* @returns the created notification | ||
*/ | ||
createNotification(): Promise<Notification | undefined>; | ||
/** | ||
* Gets a notification by its id | ||
* | ||
* @param notificationId - the id of the notification to get | ||
* @returns the fetched notification | ||
*/ | ||
getNotification(notificationId: number): Promise<Notification | undefined>; | ||
get(notificationId: number): Notification | undefined; | ||
/** | ||
* Deletes a notification by its id | ||
* Delete a notification | ||
* | ||
* @param notificationId - the id of the notification to delete | ||
* @param notification - the notification to delete | ||
*/ | ||
deleteNotification(notificationId: number): Promise<void>; | ||
delete(notification: Notification): Promise<void>; | ||
/** | ||
* Marks a notification as read | ||
* | ||
* @param notificationId - the id of the notification to mark as read | ||
* @returns the read notification | ||
* @param notification - the notification to mark as read | ||
* @returns the updated notification | ||
*/ | ||
markNotificationAsRead(notificationId: number): Promise<Notification | undefined>; | ||
markAsRead(notification: Notification): Promise<Notification>; | ||
} | ||
@@ -46,0 +40,0 @@ /** |
{ | ||
"name": "@limetech/lime-web-components", | ||
"version": "5.33.0", | ||
"version": "5.33.1", | ||
"description": "Lime Web Components", | ||
@@ -5,0 +5,0 @@ "author": "Lime Technologies", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1141887
34269