@tolinax/ayoune-interfaces 2026.14.0 → 2026.16.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.
@@ -213,6 +213,7 @@ export declare enum aMN {
213
213
  CustomAPIs = "CustomAPIs",
214
214
  CustomButtons = "CustomButtons",
215
215
  CustomConfigFiles = "CustomConfigFiles",
216
+ CustomFunctionLogs = "CustomFunctionLogs",
216
217
  CustomerDashboards = "CustomerDashboards",
217
218
  CustomerDatas = "CustomerDatas",
218
219
  Customers = "Customers",
@@ -603,6 +604,7 @@ export declare enum aMN {
603
604
  WebPushSubscribers = "WebPushSubscribers",
604
605
  WebReceiverLogs = "WebReceiverLogs",
605
606
  WebReceivers = "WebReceivers",
607
+ WebsiteMenus = "WebsiteMenus",
606
608
  Websites = "Websites",
607
609
  WebsiteTemplates = "WebsiteTemplates",
608
610
  WhatsappLogs = "WhatsappLogs",
@@ -217,6 +217,7 @@ var aMN;
217
217
  aMN["CustomAPIs"] = "CustomAPIs";
218
218
  aMN["CustomButtons"] = "CustomButtons";
219
219
  aMN["CustomConfigFiles"] = "CustomConfigFiles";
220
+ aMN["CustomFunctionLogs"] = "CustomFunctionLogs";
220
221
  aMN["CustomerDashboards"] = "CustomerDashboards";
221
222
  aMN["CustomerDatas"] = "CustomerDatas";
222
223
  aMN["Customers"] = "Customers";
@@ -607,6 +608,7 @@ var aMN;
607
608
  aMN["WebPushSubscribers"] = "WebPushSubscribers";
608
609
  aMN["WebReceiverLogs"] = "WebReceiverLogs";
609
610
  aMN["WebReceivers"] = "WebReceivers";
611
+ aMN["WebsiteMenus"] = "WebsiteMenus";
610
612
  aMN["Websites"] = "Websites";
611
613
  aMN["WebsiteTemplates"] = "WebsiteTemplates";
612
614
  aMN["WhatsappLogs"] = "WhatsappLogs";
@@ -5973,6 +5973,16 @@ const modelsAndRights = [
5973
5973
  allowDuplicate: false,
5974
5974
  updateBy: "_id",
5975
5975
  },
5976
+ {
5977
+ plural: "CustomFunctionLogs",
5978
+ singular: "CustomFunctionLog",
5979
+ module: "config",
5980
+ right: "config.customfunctionlogs",
5981
+ readOnly: true,
5982
+ importable: false,
5983
+ allowDuplicate: false,
5984
+ updateBy: "_id",
5985
+ },
5976
5986
  {
5977
5987
  plural: "UserLinks",
5978
5988
  singular: "UserLink",
@@ -6113,6 +6123,16 @@ const modelsAndRights = [
6113
6123
  allowDuplicate: false,
6114
6124
  updateBy: "_id",
6115
6125
  },
6126
+ {
6127
+ plural: "WebsiteMenus",
6128
+ singular: "WebsiteMenu",
6129
+ module: "cms",
6130
+ right: "cms.websitemenus",
6131
+ readOnly: false,
6132
+ importable: false,
6133
+ allowDuplicate: true,
6134
+ updateBy: "_id",
6135
+ },
6116
6136
  {
6117
6137
  plural: "Websites",
6118
6138
  singular: "Website",
@@ -0,0 +1,30 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ export interface ICustomFunctionLogEntry {
3
+ level?: string;
4
+ message?: string;
5
+ timestamp?: Date;
6
+ data?: any;
7
+ }
8
+ export interface ICustomFunctionSdkCall {
9
+ method?: string;
10
+ model?: string;
11
+ durationMs?: number;
12
+ }
13
+ export interface ICustomFunctionLog extends IDefaultFields {
14
+ _customerID: ObjectId;
15
+ _functionId: ObjectId;
16
+ _triggeredBy?: ObjectId;
17
+ _clientID?: ObjectId[];
18
+ _subID?: ObjectId[];
19
+ triggerMode?: string;
20
+ triggerData?: any;
21
+ status?: 'running' | 'success' | 'error' | 'timeout' | 'memory_exceeded';
22
+ output?: any;
23
+ error?: string;
24
+ stackTrace?: string;
25
+ logs?: ICustomFunctionLogEntry[];
26
+ executionTimeMs?: number;
27
+ memoryUsedMb?: number;
28
+ version?: number;
29
+ sdkCalls?: ICustomFunctionSdkCall[];
30
+ }
@@ -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,15 +1,66 @@
1
1
  import { IDefaultFields } from "./IDefaultFields";
2
2
  import { ICostUsageTrackingFields } from "./ICostUsageTrackingFields";
3
+ export interface IUserFunctionVersion {
4
+ version?: number;
5
+ code?: string;
6
+ codeHash?: string;
7
+ createdAt?: Date;
8
+ createdBy?: ObjectId;
9
+ changelog?: string;
10
+ }
11
+ export interface IUserFunctionRuntime {
12
+ timeout?: number;
13
+ memoryLimit?: number;
14
+ }
15
+ export interface IUserFunctionEnvVar {
16
+ key?: string;
17
+ value?: string;
18
+ encrypted?: boolean;
19
+ }
20
+ export interface IUserFunctionSchedule {
21
+ cronExpression?: string;
22
+ timezone?: string;
23
+ }
24
+ export interface IUserFunctionEventTrigger {
25
+ category?: string;
26
+ action?: string;
27
+ label?: string;
28
+ }
3
29
  export interface IUserFunction extends IDefaultFields, ICostUsageTrackingFields {
4
30
  _customerID: ObjectId;
5
31
  createdBy: ObjectId;
6
32
  _clientID: ObjectId[];
7
33
  _subID: ObjectId[];
8
34
  name?: string;
35
+ description?: string;
36
+ tags?: string[];
37
+ shared?: boolean;
38
+ code?: string;
39
+ script?: string;
40
+ language?: 'javascript' | 'typescript';
41
+ codeHash?: string;
42
+ runtime?: IUserFunctionRuntime;
43
+ envVars?: IUserFunctionEnvVar[];
44
+ triggerMode?: 'manual' | 'webhook' | 'schedule' | 'event' | 'automation';
45
+ webhookPath?: string;
46
+ schedule?: IUserFunctionSchedule;
47
+ eventTrigger?: IUserFunctionEventTrigger;
48
+ version?: number;
49
+ versions?: IUserFunctionVersion[];
50
+ publishedVersion?: number;
51
+ publishedCode?: string;
52
+ publishedAt?: Date;
53
+ status?: 'draft' | 'active' | 'paused' | 'error';
54
+ lastError?: string;
55
+ lastInput?: string;
56
+ lastOutput?: string;
57
+ allowedModels?: string[];
58
+ allowedQueues?: string[];
59
+ allowedUrls?: string[];
60
+ _credentials?: ObjectId[];
9
61
  useQuery?: boolean;
10
62
  _query?: ObjectId;
11
63
  dataSource: any;
12
- script?: string;
13
64
  nextRun?: Date;
14
65
  lastRun?: Date;
15
66
  }
@@ -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[];
@@ -15,6 +15,7 @@ export interface IWebReceiver extends IDefaultFields {
15
15
  middleware?: string;
16
16
  useCustomMiddleware?: boolean;
17
17
  _customMiddleware?: ObjectId;
18
+ _customFunction?: ObjectId;
18
19
  callbackUrl?: string;
19
20
  formMethod?: string;
20
21
  parseResult?: boolean;
@@ -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 });
@@ -231,6 +231,7 @@ export * from "./ICustomerDashboard";
231
231
  export * from "./ICustomerData";
232
232
  export * from "./ICustomerToken";
233
233
  export * from "./ICustomVariable";
234
+ export * from "./ICustomFunctionLog";
234
235
  export * from "./ICustomView";
235
236
  export * from "./IDashBoard";
236
237
  export * from "./IDataPool";
@@ -651,7 +652,9 @@ export * from "./IWebPushSubscriber";
651
652
  export * from "./IWebReceiver";
652
653
  export * from "./IWebReceiverLog";
653
654
  export * from "./IWebsite";
655
+ export * from "./IWebsiteMenu";
654
656
  export * from "./IWebsiteTemplate";
657
+ export * from "./IPageBlock";
655
658
  export * from "./IWhatsappLog";
656
659
  export * from "./IWidget";
657
660
  export * from "./IWikiPage";
@@ -247,6 +247,7 @@ __exportStar(require("./ICustomerDashboard"), exports);
247
247
  __exportStar(require("./ICustomerData"), exports);
248
248
  __exportStar(require("./ICustomerToken"), exports);
249
249
  __exportStar(require("./ICustomVariable"), exports);
250
+ __exportStar(require("./ICustomFunctionLog"), exports);
250
251
  __exportStar(require("./ICustomView"), exports);
251
252
  __exportStar(require("./IDashBoard"), exports);
252
253
  __exportStar(require("./IDataPool"), exports);
@@ -667,7 +668,9 @@ __exportStar(require("./IWebPushSubscriber"), exports);
667
668
  __exportStar(require("./IWebReceiver"), exports);
668
669
  __exportStar(require("./IWebReceiverLog"), exports);
669
670
  __exportStar(require("./IWebsite"), exports);
671
+ __exportStar(require("./IWebsiteMenu"), exports);
670
672
  __exportStar(require("./IWebsiteTemplate"), exports);
673
+ __exportStar(require("./IPageBlock"), exports);
671
674
  __exportStar(require("./IWhatsappLog"), exports);
672
675
  __exportStar(require("./IWidget"), exports);
673
676
  __exportStar(require("./IWikiPage"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolinax/ayoune-interfaces",
3
- "version": "2026.14.0",
3
+ "version": "2026.16.0",
4
4
  "description": "Houses TypeScript interfaces for aYOUne",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",