@tolinax/ayoune-interfaces 2026.15.0 → 2026.17.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.
@@ -406,6 +406,7 @@ export declare enum aMN {
406
406
  NewsSources = "NewsSources",
407
407
  Notifications = "Notifications",
408
408
  NotificationPolicies = "NotificationPolicies",
409
+ NotificationPreferences = "NotificationPreferences",
409
410
  OfferCalculations = "OfferCalculations",
410
411
  OfferCalculationSchemas = "OfferCalculationSchemas",
411
412
  Offers = "Offers",
@@ -604,6 +605,7 @@ export declare enum aMN {
604
605
  WebPushSubscribers = "WebPushSubscribers",
605
606
  WebReceiverLogs = "WebReceiverLogs",
606
607
  WebReceivers = "WebReceivers",
608
+ WebsiteMenus = "WebsiteMenus",
607
609
  Websites = "Websites",
608
610
  WebsiteTemplates = "WebsiteTemplates",
609
611
  WhatsappLogs = "WhatsappLogs",
@@ -410,6 +410,7 @@ var aMN;
410
410
  aMN["NewsSources"] = "NewsSources";
411
411
  aMN["Notifications"] = "Notifications";
412
412
  aMN["NotificationPolicies"] = "NotificationPolicies";
413
+ aMN["NotificationPreferences"] = "NotificationPreferences";
413
414
  aMN["OfferCalculations"] = "OfferCalculations";
414
415
  aMN["OfferCalculationSchemas"] = "OfferCalculationSchemas";
415
416
  aMN["Offers"] = "Offers";
@@ -608,6 +609,7 @@ var aMN;
608
609
  aMN["WebPushSubscribers"] = "WebPushSubscribers";
609
610
  aMN["WebReceiverLogs"] = "WebReceiverLogs";
610
611
  aMN["WebReceivers"] = "WebReceivers";
612
+ aMN["WebsiteMenus"] = "WebsiteMenus";
611
613
  aMN["Websites"] = "Websites";
612
614
  aMN["WebsiteTemplates"] = "WebsiteTemplates";
613
615
  aMN["WhatsappLogs"] = "WhatsappLogs";
@@ -4266,6 +4266,16 @@ const modelsAndRights = [
4266
4266
  allowDuplicate: true,
4267
4267
  updateBy: "_id",
4268
4268
  },
4269
+ {
4270
+ plural: "NotificationPreferences",
4271
+ singular: "NotificationPreference",
4272
+ module: "config",
4273
+ right: "config.notificationpreferences",
4274
+ readOnly: false,
4275
+ importable: false,
4276
+ allowDuplicate: false,
4277
+ updateBy: "_id",
4278
+ },
4269
4279
  {
4270
4280
  plural: "OfferCalculations",
4271
4281
  singular: "OfferCalculation",
@@ -6123,6 +6133,16 @@ const modelsAndRights = [
6123
6133
  allowDuplicate: false,
6124
6134
  updateBy: "_id",
6125
6135
  },
6136
+ {
6137
+ plural: "WebsiteMenus",
6138
+ singular: "WebsiteMenu",
6139
+ module: "cms",
6140
+ right: "cms.websitemenus",
6141
+ readOnly: false,
6142
+ importable: false,
6143
+ allowDuplicate: true,
6144
+ updateBy: "_id",
6145
+ },
6126
6146
  {
6127
6147
  plural: "Websites",
6128
6148
  singular: "Website",
@@ -0,0 +1,8 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ export interface INotificationPreference extends IDefaultFields {
3
+ _customerID: ObjectId;
4
+ user: ObjectId;
5
+ entityType: string;
6
+ channel: string;
7
+ enabled: boolean;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,57 @@
1
+ /**
2
+ * IPageBlock — Structured content block for WebPages.
3
+ * Embedded in WebPages.blocks[] (not a separate collection).
4
+ *
5
+ * Each block has a type, content map, settings for layout/style,
6
+ * optional translations per locale, and optional widget embedding config.
7
+ */
8
+ export type PageBlockType = 'hero' | 'text' | 'image' | 'gallery' | 'video' | 'cta' | 'form' | 'widget' | 'columns' | 'testimonial' | 'pricing' | 'faq' | 'contact' | 'map' | 'social' | 'html' | 'divider' | 'spacer' | 'header' | 'footer' | 'navigation' | 'countdown' | 'stats' | 'logos' | 'features' | 'team' | 'blog-list' | 'product-list';
9
+ export interface IPageBlockSpacing {
10
+ top?: number;
11
+ right?: number;
12
+ bottom?: number;
13
+ left?: number;
14
+ }
15
+ export interface IPageBlockVisibility {
16
+ desktop?: boolean;
17
+ tablet?: boolean;
18
+ mobile?: boolean;
19
+ }
20
+ export interface IPageBlockSettings {
21
+ backgroundColor?: string;
22
+ backgroundImage?: string;
23
+ backgroundOverlay?: string;
24
+ padding?: IPageBlockSpacing;
25
+ margin?: IPageBlockSpacing;
26
+ maxWidth?: string;
27
+ fullWidth?: boolean;
28
+ minHeight?: string;
29
+ cssClass?: string;
30
+ customCss?: string;
31
+ id?: string;
32
+ animation?: string;
33
+ visibility?: IPageBlockVisibility;
34
+ borderRadius?: string;
35
+ border?: string;
36
+ shadow?: string;
37
+ }
38
+ export interface IPageBlockWidgetConfig {
39
+ widgetType: string;
40
+ widgetId?: string;
41
+ embedOptions?: Record<string, any>;
42
+ }
43
+ export interface IPageBlock {
44
+ _id?: string;
45
+ type: PageBlockType;
46
+ /** Type-specific content (heading, body, imageUrl, items[], etc.) */
47
+ content: Record<string, any>;
48
+ /** Per-locale content overrides keyed by locale code (e.g. 'en', 'fr') */
49
+ translations?: Record<string, Record<string, any>>;
50
+ settings: IPageBlockSettings;
51
+ /** For 'widget' block type — which widget to embed */
52
+ widgetConfig?: IPageBlockWidgetConfig;
53
+ /** For 'columns' block type — array of column block arrays */
54
+ columns?: IPageBlock[][];
55
+ sortOrder: number;
56
+ aiGenerated?: boolean;
57
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * IPageBlock — Structured content block for WebPages.
4
+ * Embedded in WebPages.blocks[] (not a separate collection).
5
+ *
6
+ * Each block has a type, content map, settings for layout/style,
7
+ * optional translations per locale, and optional widget embedding config.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,10 @@
1
1
  import { IDefaultFields } from "./IDefaultFields";
2
+ import { IPageBlock } from "./IPageBlock";
3
+ export interface IWebPageRenderedLocale {
4
+ html: string;
5
+ css?: string;
6
+ renderedAt: Date;
7
+ }
2
8
  export interface IWebPage extends IDefaultFields {
3
9
  _customerID: ObjectId;
4
10
  _property?: ObjectId;
@@ -6,7 +12,34 @@ export interface IWebPage extends IDefaultFields {
6
12
  _clientID?: ObjectId[];
7
13
  _subID?: ObjectId[];
8
14
  _affiliateID?: ObjectId;
15
+ _website?: ObjectId;
16
+ parentPage?: ObjectId;
9
17
  name?: string;
18
+ /** Structured content blocks (modern editor) */
19
+ blocks?: IPageBlock[];
20
+ /** Pre-rendered HTML per locale keyed by locale code */
21
+ renderedLocales?: Record<string, IWebPageRenderedLocale>;
22
+ /** Page template: 'landing', 'blog', 'product', 'contact', 'custom' */
23
+ template?: string;
24
+ isPublished?: boolean;
25
+ publishedAt?: Date;
26
+ /** Primary locale for this page */
27
+ locale?: string;
28
+ /** All locales this page supports */
29
+ supportedLocales?: string[];
30
+ /** Per-locale meta overrides keyed by locale code */
31
+ translations?: Record<string, {
32
+ meta?: {
33
+ title?: string;
34
+ description?: string;
35
+ keywords?: string;
36
+ ogTitle?: string;
37
+ ogDescription?: string;
38
+ ogImage?: string;
39
+ };
40
+ }>;
41
+ sortOrder?: number;
42
+ /** GrapesJS builder config (legacy editor) */
10
43
  config: {
11
44
  assets: any[];
12
45
  pages: any[];
@@ -58,4 +58,45 @@ export interface IWebsite extends IDefaultFields {
58
58
  color_theme?: string;
59
59
  override?: number;
60
60
  locale?: string;
61
+ /** Favicon URL */
62
+ favicon?: string;
63
+ /** Font configuration */
64
+ fonts?: {
65
+ heading?: string;
66
+ body?: string;
67
+ url?: string;
68
+ };
69
+ /** IDC.A.D.D tracking configuration */
70
+ tracking?: {
71
+ enabled?: boolean;
72
+ idcaddHost?: string;
73
+ customScripts?: string[];
74
+ };
75
+ /** Default locale for this website */
76
+ defaultLocale?: string;
77
+ /** All locales this website supports */
78
+ supportedLocales?: string[];
79
+ /** Consumer-facing navigation menu references */
80
+ navigation?: {
81
+ mainMenu?: ObjectId;
82
+ footerMenu?: ObjectId;
83
+ topbarMenu?: ObjectId;
84
+ };
85
+ /** Branding overrides */
86
+ branding?: {
87
+ logo?: string;
88
+ icon?: string;
89
+ primaryColor?: string;
90
+ secondaryColor?: string;
91
+ accentColor?: string;
92
+ warnColor?: string;
93
+ fontColor?: string;
94
+ backgroundColor?: string;
95
+ };
96
+ /** Custom HTML injected into page <head> */
97
+ globalHead?: string;
98
+ /** Custom HTML injected at start of <body> */
99
+ globalBodyStart?: string;
100
+ /** Custom HTML injected at end of <body> */
101
+ globalBodyEnd?: string;
61
102
  }
@@ -0,0 +1,30 @@
1
+ import { IDefaultFields } from './IDefaultFields';
2
+ export interface IWebsiteMenuItem {
3
+ _id?: string;
4
+ label: string;
5
+ /** Per-locale label overrides keyed by locale code (e.g. 'en', 'fr') */
6
+ translations?: Record<string, string>;
7
+ type: 'page' | 'url' | 'section' | 'dropdown';
8
+ /** Reference to a WebPage (for type 'page') */
9
+ _page?: ObjectId;
10
+ /** External or absolute URL (for type 'url') */
11
+ url?: string;
12
+ /** Section anchor ID (for type 'section') */
13
+ anchor?: string;
14
+ target?: '_self' | '_blank';
15
+ children?: IWebsiteMenuItem[];
16
+ sortOrder?: number;
17
+ icon?: string;
18
+ cssClass?: string;
19
+ /** Whether this item is visible */
20
+ visible?: boolean;
21
+ }
22
+ export interface IWebsiteMenu extends IDefaultFields {
23
+ _customerID: ObjectId;
24
+ _website?: ObjectId;
25
+ name: string;
26
+ /** Slot identifier: 'main', 'footer', 'sidebar', 'topbar' */
27
+ identifier: string;
28
+ items: IWebsiteMenuItem[];
29
+ locale?: string;
30
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -431,6 +431,7 @@ export * from "./INewsletterType";
431
431
  export * from "./INewsSource";
432
432
  export * from "./INotification";
433
433
  export * from "./INotificationPolicy";
434
+ export * from "./INotificationPreference";
434
435
  export * from "./IOffer";
435
436
  export * from "./IOfferCalculation";
436
437
  export * from "./IOfferCalculationSchema";
@@ -652,7 +653,9 @@ export * from "./IWebPushSubscriber";
652
653
  export * from "./IWebReceiver";
653
654
  export * from "./IWebReceiverLog";
654
655
  export * from "./IWebsite";
656
+ export * from "./IWebsiteMenu";
655
657
  export * from "./IWebsiteTemplate";
658
+ export * from "./IPageBlock";
656
659
  export * from "./IWhatsappLog";
657
660
  export * from "./IWidget";
658
661
  export * from "./IWikiPage";
@@ -447,6 +447,7 @@ __exportStar(require("./INewsletterType"), exports);
447
447
  __exportStar(require("./INewsSource"), exports);
448
448
  __exportStar(require("./INotification"), exports);
449
449
  __exportStar(require("./INotificationPolicy"), exports);
450
+ __exportStar(require("./INotificationPreference"), exports);
450
451
  __exportStar(require("./IOffer"), exports);
451
452
  __exportStar(require("./IOfferCalculation"), exports);
452
453
  __exportStar(require("./IOfferCalculationSchema"), exports);
@@ -668,7 +669,9 @@ __exportStar(require("./IWebPushSubscriber"), exports);
668
669
  __exportStar(require("./IWebReceiver"), exports);
669
670
  __exportStar(require("./IWebReceiverLog"), exports);
670
671
  __exportStar(require("./IWebsite"), exports);
672
+ __exportStar(require("./IWebsiteMenu"), exports);
671
673
  __exportStar(require("./IWebsiteTemplate"), exports);
674
+ __exportStar(require("./IPageBlock"), exports);
672
675
  __exportStar(require("./IWhatsappLog"), exports);
673
676
  __exportStar(require("./IWidget"), exports);
674
677
  __exportStar(require("./IWikiPage"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolinax/ayoune-interfaces",
3
- "version": "2026.15.0",
3
+ "version": "2026.17.0",
4
4
  "description": "Houses TypeScript interfaces for aYOUne",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",