@limetech/lime-web-components 5.33.0 → 5.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [5.33.1](https://github.com/Lundalogik/lime-web-components/compare/v5.33.0...v5.33.1) (2024-09-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **notifications:** update interfaces to better align with other services ([900b937](https://github.com/Lundalogik/lime-web-components/commit/900b93711ff3e7ade43010536948afcd58fae753)), closes [Lundalogik/crm-feature#4341](https://github.com/Lundalogik/crm-feature/issues/4341)
|
|
8
|
+
|
|
1
9
|
## [5.33.0](https://github.com/Lundalogik/lime-web-components/compare/v5.32.0...v5.33.0) (2024-08-30)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -4,9 +4,46 @@
|
|
|
4
4
|
* @alpha
|
|
5
5
|
* @group NotificationRepository
|
|
6
6
|
*/
|
|
7
|
-
export type Notification = {
|
|
7
|
+
export type Notification<T = unknown> = {
|
|
8
|
+
/**
|
|
9
|
+
* The notification id
|
|
10
|
+
*/
|
|
8
11
|
id: number;
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Type of notification
|
|
14
|
+
*/
|
|
15
|
+
type?: NotificationType;
|
|
16
|
+
/**
|
|
17
|
+
* ID of the user the notification belongs to
|
|
18
|
+
*/
|
|
19
|
+
userId: number;
|
|
20
|
+
/**
|
|
21
|
+
* Date when the notification was marked as read
|
|
22
|
+
*/
|
|
23
|
+
read?: Date;
|
|
24
|
+
/**
|
|
25
|
+
* Date when the notification was created
|
|
26
|
+
*/
|
|
27
|
+
createdTime: Date;
|
|
28
|
+
/**
|
|
29
|
+
* ID of the user that created the notification
|
|
30
|
+
*/
|
|
31
|
+
createdUser: number;
|
|
32
|
+
/**
|
|
33
|
+
* Limetype that the notification is attached to
|
|
34
|
+
*/
|
|
35
|
+
limetype?: string;
|
|
36
|
+
/**
|
|
37
|
+
* ID of the object the notification is attached to
|
|
38
|
+
*/
|
|
39
|
+
objectId?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Data attached to the notification
|
|
42
|
+
*/
|
|
43
|
+
data?: T;
|
|
11
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* @alpha
|
|
47
|
+
*/
|
|
48
|
+
export type NotificationType = 'mention';
|
|
12
49
|
//# sourceMappingURL=notification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../src/notification-service/notification.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../src/notification-service/notification.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,OAAO,IAAI;IACpC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IAExB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;OAEG;IACH,WAAW,EAAE,IAAI,CAAC;IAElB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,CAAC;CACZ,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC"}
|
|
@@ -7,39 +7,33 @@ import { Notification } from './notification';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface NotificationRepository {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Load all notifications belonging to the logged in user from the server
|
|
11
11
|
*
|
|
12
12
|
* @param options - options to provide when loading notifications
|
|
13
13
|
*
|
|
14
14
|
* @returns the saved notifications
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
loadAll(options?: NotificationLoadOptions): Promise<NotificationResponse>;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* @returns the created notification
|
|
21
|
-
*/
|
|
22
|
-
createNotification(): Promise<Notification | undefined>;
|
|
23
|
-
/**
|
|
24
|
-
* Gets a notification by its id
|
|
18
|
+
* Gets a loaded notification by its id
|
|
25
19
|
*
|
|
26
20
|
* @param notificationId - the id of the notification to get
|
|
27
21
|
* @returns the fetched notification
|
|
28
22
|
*/
|
|
29
|
-
|
|
23
|
+
get(notificationId: number): Notification | undefined;
|
|
30
24
|
/**
|
|
31
|
-
*
|
|
25
|
+
* Delete a notification
|
|
32
26
|
*
|
|
33
|
-
* @param
|
|
27
|
+
* @param notification - the notification to delete
|
|
34
28
|
*/
|
|
35
|
-
|
|
29
|
+
delete(notification: Notification): Promise<void>;
|
|
36
30
|
/**
|
|
37
31
|
* Marks a notification as read
|
|
38
32
|
*
|
|
39
|
-
* @param
|
|
40
|
-
* @returns the
|
|
33
|
+
* @param notification - the notification to mark as read
|
|
34
|
+
* @returns the updated notification
|
|
41
35
|
*/
|
|
42
|
-
|
|
36
|
+
markAsRead(notification: Notification): Promise<Notification>;
|
|
43
37
|
}
|
|
44
38
|
/**
|
|
45
39
|
* The count response of loaded notifications
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../src/notification-service/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACnC;;;;;;OAMG;IACH,
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../src/notification-service/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACnC;;;;;;OAMG;IACH,OAAO,CAAC,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE1E;;;;;OAKG;IACH,GAAG,CAAC,cAAc,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAAC;IAEtD;;;;OAIG;IACH,MAAM,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElD;;;;;OAKG;IACH,UAAU,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACjE;AAED;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB"}
|