@tolinax/ayoune-interfaces 2026.47.0 → 2026.48.0
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.
|
@@ -31,7 +31,49 @@ export interface INotification extends IDefaultFields {
|
|
|
31
31
|
attachments?: INotificationAttachment[];
|
|
32
32
|
/**
|
|
33
33
|
* Action buttons rendered under the notification (1-3 typical), and —
|
|
34
|
-
* where the OS supports it — as native Web-Push action buttons (first
|
|
34
|
+
* where the OS supports it — as native Web-Push action buttons (first
|
|
35
|
+
* three on modern Android Chrome / Edge / Samsung Internet).
|
|
35
36
|
*/
|
|
36
37
|
actions?: INotificationAction[];
|
|
38
|
+
/**
|
|
39
|
+
* Hero image shown in the expanded native push notification (Android).
|
|
40
|
+
* Rendered as a 16:9 banner above the body. Great for order thumbnails,
|
|
41
|
+
* product photos, meeting cover images, customer logos, illustrative
|
|
42
|
+
* GIFs (animated GIFs render as stills on most push stacks — keep
|
|
43
|
+
* static / use first-frame if animated).
|
|
44
|
+
*
|
|
45
|
+
* When absent, the adapter falls back to the first `attachments[*].preview.image`
|
|
46
|
+
* so entity-bearing notifications automatically get a thumbnail.
|
|
47
|
+
*/
|
|
48
|
+
image?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Monochrome status-bar badge (Android). 24x24 SVG or PNG. Customer-
|
|
51
|
+
* branding goes here — renders as the tiny icon next to the clock.
|
|
52
|
+
* Falls back to the platform-default badge when absent.
|
|
53
|
+
*/
|
|
54
|
+
badge?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Grouping / dedupe key. Two notifications with the same `tag` replace
|
|
57
|
+
* each other on the device instead of stacking. Used for live-update
|
|
58
|
+
* flows (order status, approval decisions, running job progress) where
|
|
59
|
+
* only the latest state should be visible.
|
|
60
|
+
*
|
|
61
|
+
* When absent, the adapter auto-derives `${entityType}:${entity._id || Date.now()}`
|
|
62
|
+
* so repeated notifications about the same entity naturally group.
|
|
63
|
+
*/
|
|
64
|
+
tag?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Re-alert (sound + vibration) when a notification with the same `tag`
|
|
67
|
+
* arrives. Default true — users expect "your order is now OUT FOR
|
|
68
|
+
* DELIVERY" to buzz even if the previous "being prepared" is still on
|
|
69
|
+
* screen. Set false for silent status updates (progress bars, typing
|
|
70
|
+
* indicators).
|
|
71
|
+
*/
|
|
72
|
+
renotify?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Keep the notification on screen until the user explicitly dismisses
|
|
75
|
+
* it (Android > 7). Use for approval requests, critical alerts, or
|
|
76
|
+
* anything that must not scroll out of awareness. Default false.
|
|
77
|
+
*/
|
|
78
|
+
requireInteraction?: boolean;
|
|
37
79
|
}
|
|
@@ -22,7 +22,11 @@
|
|
|
22
22
|
* question, snippet, media).
|
|
23
23
|
*/
|
|
24
24
|
export type NotificationAttachmentType = "calendarentry" | "task" | "invoice" | "permissionrequest" | "supplierorder";
|
|
25
|
-
/** Shared shape — all previews carry an optional deep-link override
|
|
25
|
+
/** Shared shape — all previews carry an optional deep-link override and
|
|
26
|
+
* an optional thumbnail image. The image is used both by the in-app
|
|
27
|
+
* preview card (rendered as a left-aligned thumbnail beside the metadata)
|
|
28
|
+
* and by the native push adapter (the first attachment with an image
|
|
29
|
+
* becomes the notification's hero banner on Android). */
|
|
26
30
|
interface INotificationAttachmentBase {
|
|
27
31
|
/** Reference to the source entity (the document `_id`). Required for
|
|
28
32
|
* enrichment and deep-linking. */
|
|
@@ -30,6 +34,10 @@ interface INotificationAttachmentBase {
|
|
|
30
34
|
/** Optional router path used when the user taps the preview card.
|
|
31
35
|
* When absent, the consumer falls back to `/{type}/{_id}`. */
|
|
32
36
|
href?: string;
|
|
37
|
+
/** Optional image URL — product thumbnail, supplier logo, meeting
|
|
38
|
+
* cover, customer branding. Absolute URL (served from media CDN or
|
|
39
|
+
* customer-meta). */
|
|
40
|
+
image?: string;
|
|
33
41
|
}
|
|
34
42
|
export interface ICalendarEntryPreview extends INotificationAttachmentBase {
|
|
35
43
|
summary?: string;
|