@tolinax/ayoune-interfaces 2026.48.0 → 2026.49.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.
@@ -21,7 +21,7 @@
21
21
  * shipping, productionorder, creditnote, internalorder, offer, assignment,
22
22
  * question, snippet, media).
23
23
  */
24
- export type NotificationAttachmentType = "calendarentry" | "task" | "invoice" | "permissionrequest" | "supplierorder";
24
+ export type NotificationAttachmentType = "calendarentry" | "task" | "invoice" | "permissionrequest" | "supplierorder" | "document" | "consumer" | "shipping";
25
25
  /** Shared shape — all previews carry an optional deep-link override and
26
26
  * an optional thumbnail image. The image is used both by the in-app
27
27
  * preview card (rendered as a left-aligned thumbnail beside the metadata)
@@ -123,6 +123,57 @@ export interface ISupplierOrderPreview extends INotificationAttachmentBase {
123
123
  };
124
124
  expectedDelivery?: Date | string;
125
125
  }
126
+ export interface IDocumentPreview extends INotificationAttachmentBase {
127
+ title?: string;
128
+ filename?: string;
129
+ /** Mime type — used to choose the leading icon (pdf / image / audio / video / generic). */
130
+ contentType?: string;
131
+ /** Size in bytes — rendered as a human chip `2.3 MB`. */
132
+ size?: number;
133
+ /** Direct download URL (served by the media / uploads service). */
134
+ url?: string;
135
+ /** Author / uploader — rendered small. */
136
+ uploadedBy?: {
137
+ _id?: ObjectId;
138
+ name?: string;
139
+ };
140
+ }
141
+ export interface IConsumerPreview extends INotificationAttachmentBase {
142
+ /** Short reference label (sr-number in the legacy system). */
143
+ sr?: string;
144
+ /** Display name — individual OR company. */
145
+ name?: string;
146
+ /** Company-line (used when `name` is the person). */
147
+ company?: string;
148
+ email?: string;
149
+ phone?: string;
150
+ /** Optional avatar / logo URL — separate from the generic `image`
151
+ * base field which the card uses as a 40x40 thumbnail anyway. */
152
+ avatar?: string;
153
+ /** Lifecycle status — "lead", "customer", "archived", etc. */
154
+ status?: string;
155
+ /** Number of open items (tickets/tasks/deals) — rendered as a chip. */
156
+ openItemsCount?: number;
157
+ }
158
+ export interface IShippingPreview extends INotificationAttachmentBase {
159
+ /** Shipping identifier — internal and/or carrier tracking number. */
160
+ nbr?: string | number;
161
+ trackingNumber?: string;
162
+ /** Carrier slug or name — DHL, UPS, FedEx, etc. */
163
+ carrier?: string;
164
+ /** Lifecycle status — created / picked / in-transit / delivered / exception. */
165
+ status?: string;
166
+ destinationCity?: string;
167
+ destinationCountry?: string;
168
+ /** Expected / actual delivery timestamps. */
169
+ expectedDelivery?: Date | string;
170
+ deliveredAt?: Date | string;
171
+ /** Linked receiver (Consumer ref) — rendered as the recipient chip. */
172
+ receiver?: {
173
+ _id?: ObjectId;
174
+ name?: string;
175
+ };
176
+ }
126
177
  export type INotificationAttachment = {
127
178
  type: "calendarentry";
128
179
  preview: ICalendarEntryPreview;
@@ -138,6 +189,15 @@ export type INotificationAttachment = {
138
189
  } | {
139
190
  type: "supplierorder";
140
191
  preview: ISupplierOrderPreview;
192
+ } | {
193
+ type: "document";
194
+ preview: IDocumentPreview;
195
+ } | {
196
+ type: "consumer";
197
+ preview: IConsumerPreview;
198
+ } | {
199
+ type: "shipping";
200
+ preview: IShippingPreview;
141
201
  };
142
202
  /** Producer-side shape — accepts either a bare reference (orchestrator will
143
203
  * enrich) or a fully-populated attachment. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolinax/ayoune-interfaces",
3
- "version": "2026.48.0",
3
+ "version": "2026.49.0",
4
4
  "description": "Houses TypeScript interfaces for aYOUne",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",