@tolinax/ayoune-interfaces 2026.61.1 → 2026.62.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.
@@ -38,6 +38,10 @@ interface INotificationAttachmentBase {
38
38
  * cover, customer branding. Absolute URL (served from media CDN or
39
39
  * customer-meta). */
40
40
  image?: string;
41
+ /** Per-attachment action buttons. Worker fills from
42
+ * `defaultActionsByAttachmentType` when producer didn't set any — see
43
+ * INotificationAction for the discriminated-union shape. */
44
+ actions?: import("./INotificationAction").INotificationAction[];
41
45
  }
42
46
  export interface ICalendarEntryPreview extends INotificationAttachmentBase {
43
47
  summary?: string;
@@ -1,4 +1,21 @@
1
1
  import { IDefaultFields } from "./IDefaultFields";
2
+ /**
3
+ * Per-policy control for the core's `autoEnrichAttachments()` helper.
4
+ * Defaults to `{ consumer: true, self: true }` — opt-out rather than opt-in
5
+ * so every policy that's ever rendered gets rich notifications by default.
6
+ * Set `consumer: false` for policies where the consumer card would leak
7
+ * privacy-sensitive data to recipients who shouldn't see it. Set `self: false`
8
+ * for event types where the entity itself is context, not the main card
9
+ * (e.g. MailLogs, FormSubmissions, Leads — already excluded by SELF_ATTACH_TYPES
10
+ * in core, but an extra per-policy kill-switch for edge cases).
11
+ */
12
+ export interface INotificationAutoEnrichConfig {
13
+ /** Auto-attach consumer card when entity/data has _consumerID. Default true. */
14
+ consumer?: boolean;
15
+ /** Auto-attach entity itself as main card for SELF_ATTACH_TYPES (Task,
16
+ * Invoice, Offer, Contract, SupplierOrder, CalendarEntry). Default true. */
17
+ self?: boolean;
18
+ }
2
19
  export interface INotificationPolicy extends IDefaultFields {
3
20
  _customerID: ObjectId;
4
21
  name: string;
@@ -14,4 +31,7 @@ export interface INotificationPolicy extends IDefaultFields {
14
31
  };
15
32
  active?: boolean;
16
33
  order?: number;
34
+ /** Opt-out toggles for auto-attach-on-enqueue. See
35
+ * INotificationAutoEnrichConfig. Omit to accept defaults (both true). */
36
+ autoEnrich?: INotificationAutoEnrichConfig;
17
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolinax/ayoune-interfaces",
3
- "version": "2026.61.1",
3
+ "version": "2026.62.0",
4
4
  "description": "Houses TypeScript interfaces for aYOUne",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",