@apptegy/nuxt-navigation 0.1.125 → 0.1.127
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/dist/module.json
CHANGED
|
@@ -12,4 +12,4 @@ export interface IUser {
|
|
|
12
12
|
client: string;
|
|
13
13
|
admin_email: string;
|
|
14
14
|
}
|
|
15
|
-
export type { NotificationType, NotificationApiState, INotificationApiActor,
|
|
15
|
+
export type { NotificationType, NotificationApiState, INotificationApiActor, INotificationApiDetailObject, INotificationApiRecord, INotificationsPagination, INotificationsApiResponse, INotificationActor, INotificationItem, INotificationGroup, INotificationTab, INotificationFilter, INotificationsPanelData, INotificationsHeaderModel, } from './notifications.js';
|
|
@@ -5,10 +5,14 @@ export interface INotificationApiActor {
|
|
|
5
5
|
first_name: string;
|
|
6
6
|
last_name: string;
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
export interface INotificationApiDetailObject {
|
|
9
|
+
resource_type?: string | null;
|
|
10
|
+
resource_id?: string | null;
|
|
11
|
+
parent_type?: string | null;
|
|
12
|
+
parent_id?: string | null;
|
|
13
|
+
/** Parent display name (e.g. course/room); shown in the meta line. */
|
|
14
|
+
parent_name?: string | null;
|
|
15
|
+
ward_ids?: string[] | null;
|
|
12
16
|
}
|
|
13
17
|
export interface INotificationApiRecord {
|
|
14
18
|
id: number | string;
|
|
@@ -26,8 +30,8 @@ export interface INotificationApiRecord {
|
|
|
26
30
|
* When present, corresponding emojis are shown beside the summary.
|
|
27
31
|
*/
|
|
28
32
|
reaction_counts?: Record<string, number> | null;
|
|
29
|
-
/**
|
|
30
|
-
|
|
33
|
+
/** Navigation/context payload; `parent_name` is shown in the meta line. */
|
|
34
|
+
detail_object?: INotificationApiDetailObject | null;
|
|
31
35
|
actors?: INotificationApiActor[] | null;
|
|
32
36
|
detail_link?: string | null;
|
|
33
37
|
notification_state: NotificationApiState | string;
|
|
@@ -71,7 +75,7 @@ export interface INotificationItem {
|
|
|
71
75
|
* Derived from API `last_activity_at`, falling back to `created_at`.
|
|
72
76
|
*/
|
|
73
77
|
createdAt?: string;
|
|
74
|
-
/**
|
|
78
|
+
/** Parent name shown after the relative timestamp (e.g. "Algebra I"). */
|
|
75
79
|
contextLabel?: string;
|
|
76
80
|
/** Post/body preview shown in the card summary row. */
|
|
77
81
|
summary?: string;
|
|
@@ -100,7 +100,7 @@ export function mapNotificationApiRecord(record, options) {
|
|
|
100
100
|
}
|
|
101
101
|
}),
|
|
102
102
|
createdAt: activityAt,
|
|
103
|
-
contextLabel: record.
|
|
103
|
+
contextLabel: record.detail_object?.parent_name?.trim() || void 0,
|
|
104
104
|
summary,
|
|
105
105
|
reactionEmojis: reactionEmojis.length > 0 ? reactionEmojis : void 0,
|
|
106
106
|
dismissed: state === "dismissed",
|