@tolinax/ayoune-interfaces 2026.41.0 → 2026.43.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.
- package/data/modelNames.d.ts +1 -0
- package/data/modelNames.js +1 -0
- package/data/modelsAndRights.js +46 -0
- package/data/pageConfig/AyouneBasePage.interface.d.ts +1 -1
- package/interfaces/IComputingEntity.d.ts +5 -1
- package/interfaces/ICustomerWidget.d.ts +57 -0
- package/interfaces/ICustomerWidget.js +2 -0
- package/interfaces/IWidgetParamSchema.d.ts +28 -0
- package/interfaces/IWidgetParamSchema.js +2 -0
- package/interfaces/IaYOUneWidget.d.ts +21 -0
- package/interfaces/index.d.ts +2 -0
- package/interfaces/index.js +2 -0
- package/package.json +1 -1
package/data/modelNames.d.ts
CHANGED
|
@@ -234,6 +234,7 @@ export declare enum aMN {
|
|
|
234
234
|
CustomFunctionLogs = "CustomFunctionLogs",
|
|
235
235
|
CustomerDashboards = "CustomerDashboards",
|
|
236
236
|
CustomerDatas = "CustomerDatas",
|
|
237
|
+
CustomerWidgets = "CustomerWidgets",
|
|
237
238
|
Customers = "Customers",
|
|
238
239
|
CustomerTokens = "CustomerTokens",
|
|
239
240
|
CustomVariables = "CustomVariables",
|
package/data/modelNames.js
CHANGED
|
@@ -238,6 +238,7 @@ var aMN;
|
|
|
238
238
|
aMN["CustomFunctionLogs"] = "CustomFunctionLogs";
|
|
239
239
|
aMN["CustomerDashboards"] = "CustomerDashboards";
|
|
240
240
|
aMN["CustomerDatas"] = "CustomerDatas";
|
|
241
|
+
aMN["CustomerWidgets"] = "CustomerWidgets";
|
|
241
242
|
aMN["Customers"] = "Customers";
|
|
242
243
|
aMN["CustomerTokens"] = "CustomerTokens";
|
|
243
244
|
aMN["CustomVariables"] = "CustomVariables";
|
package/data/modelsAndRights.js
CHANGED
|
@@ -2985,6 +2985,52 @@ const modelsAndRights = [
|
|
|
2985
2985
|
updateBy: "_id",
|
|
2986
2986
|
availableInSDK: false,
|
|
2987
2987
|
},
|
|
2988
|
+
{
|
|
2989
|
+
plural: "CustomerWidgets",
|
|
2990
|
+
singular: "CustomerWidget",
|
|
2991
|
+
module: "reporting",
|
|
2992
|
+
right: "reports.customer-widgets",
|
|
2993
|
+
childRights: [
|
|
2994
|
+
"reports.customer-widgets.ai-create",
|
|
2995
|
+
"reports.customer-widgets.public",
|
|
2996
|
+
],
|
|
2997
|
+
readOnly: false,
|
|
2998
|
+
importable: false,
|
|
2999
|
+
allowDuplicate: true,
|
|
3000
|
+
updateBy: "_id",
|
|
3001
|
+
labelKey: "model.customerWidget.label",
|
|
3002
|
+
labelPluralKey: "model.customerWidget.labelPlural",
|
|
3003
|
+
descriptionKey: "model.customerWidget.description",
|
|
3004
|
+
piiLevel: "low",
|
|
3005
|
+
availableInSDK: true,
|
|
3006
|
+
sdkOperations: ["find", "findOne", "insert", "update", "count"],
|
|
3007
|
+
allowStreaming: true,
|
|
3008
|
+
actions: [
|
|
3009
|
+
{
|
|
3010
|
+
title: "Render now",
|
|
3011
|
+
action: "render",
|
|
3012
|
+
availability: "both",
|
|
3013
|
+
method: "POST",
|
|
3014
|
+
icon: "refresh",
|
|
3015
|
+
},
|
|
3016
|
+
{
|
|
3017
|
+
title: "Duplicate",
|
|
3018
|
+
action: "duplicate",
|
|
3019
|
+
availability: "single",
|
|
3020
|
+
method: "POST",
|
|
3021
|
+
icon: "content_copy",
|
|
3022
|
+
},
|
|
3023
|
+
{
|
|
3024
|
+
title: "Share public",
|
|
3025
|
+
action: "share-public",
|
|
3026
|
+
availability: "single",
|
|
3027
|
+
method: "POST",
|
|
3028
|
+
icon: "share",
|
|
3029
|
+
},
|
|
3030
|
+
],
|
|
3031
|
+
searchable: true,
|
|
3032
|
+
searchableFields: ["title", "slug", "labels"],
|
|
3033
|
+
},
|
|
2988
3034
|
{
|
|
2989
3035
|
plural: "Customers",
|
|
2990
3036
|
singular: "Customer",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AyouneNewActions } from "./AyouneNewActions.interface";
|
|
2
2
|
export type AyounePageTypes = 'list' | 'multi-list' | 'table' | 'detail' | 'component' | 'dashboard' | 'module-page' | 'grid' | 'i-frame' | 'sub-views';
|
|
3
|
-
export type AyounePageViewModes = 'tabs' | 'accordion' | 'single' | 'stepper' | 'gridster' | 'chart-gridster';
|
|
3
|
+
export type AyounePageViewModes = 'tabs' | 'accordion' | 'single' | 'stepper' | 'gridster' | 'chart-gridster' | 'form';
|
|
4
4
|
export type AyounePageSubViewModes = 'tabs' | 'sidebar';
|
|
5
5
|
export interface AyouneBasePage {
|
|
6
6
|
pageType: AyounePageTypes;
|
|
@@ -156,12 +156,16 @@ export interface IComputingEntityConfig {
|
|
|
156
156
|
binaries?: IComputingEntityBinary[];
|
|
157
157
|
configFiles?: IComputingEntityConfigFile[];
|
|
158
158
|
}
|
|
159
|
-
export type RemoteCommandType = 'start-process' | 'stop-process' | 'restart-process' | 'deploy-config' | 'reboot' | 'restart-agent' | 'run-sequence' | 'remote-input';
|
|
159
|
+
export type RemoteCommandType = 'start-process' | 'stop-process' | 'restart-process' | 'deploy-config' | 'reboot' | 'restart-agent' | 'run-sequence' | 'remote-input' | 'execute-cli';
|
|
160
160
|
export interface IRemoteCommand {
|
|
161
161
|
_id?: ObjectId;
|
|
162
162
|
type: RemoteCommandType;
|
|
163
163
|
programId?: string;
|
|
164
164
|
payload?: any;
|
|
165
|
+
/** CLI args array for 'execute-cli' type (e.g. ['list', 'contacts', '-l', '10']) */
|
|
166
|
+
cliArgs?: string[];
|
|
167
|
+
/** Execution timeout in ms for 'execute-cli' type (default: 30000) */
|
|
168
|
+
cliTimeout?: number;
|
|
165
169
|
timestamp?: Date;
|
|
166
170
|
acknowledged?: boolean;
|
|
167
171
|
acknowledgedAt?: Date;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
/**
|
|
3
|
+
* Customer-scoped widget instance. References a template from aYOUneWidgets
|
|
4
|
+
* (or carries an inline chartConfig for ad-hoc / AI-authored widgets) and
|
|
5
|
+
* holds resolved params plus the latest prerender URLs.
|
|
6
|
+
*
|
|
7
|
+
* Added 2026-04-17 as part of the widget prerender / chart-in-email foundation.
|
|
8
|
+
* See: C:\Users\maxim\.claude\plans\widget-foundation-echarts-ssr.md
|
|
9
|
+
*/
|
|
10
|
+
export interface ICustomerWidget extends IDefaultFields {
|
|
11
|
+
_customerID: ObjectId;
|
|
12
|
+
_clientID?: ObjectId[];
|
|
13
|
+
_subID?: ObjectId[];
|
|
14
|
+
/** Optional FK to aYOUneWidgets template. Null = ad-hoc / AI-authored. */
|
|
15
|
+
_widgetID?: ObjectId;
|
|
16
|
+
/** Customer-facing name. */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** Stable customer-local slug. Unique per (customerID, slug). */
|
|
19
|
+
slug?: string;
|
|
20
|
+
/** Bound values for the template's paramSchema. */
|
|
21
|
+
params?: Record<string, any>;
|
|
22
|
+
/** Stable hash of (widgetID + sorted params) — cache key for prerenders. */
|
|
23
|
+
paramsHash?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional overrides of the template's chartConfig / dataConfig.
|
|
26
|
+
* Under ECharts mode, chartConfig is an EChartsOption JSON.
|
|
27
|
+
*/
|
|
28
|
+
chartConfig?: any;
|
|
29
|
+
dataConfig?: any;
|
|
30
|
+
/** Rendered image URLs. Populated by widget-prerender-worker. */
|
|
31
|
+
renderedImageUrl?: {
|
|
32
|
+
svg?: string;
|
|
33
|
+
png?: string;
|
|
34
|
+
};
|
|
35
|
+
/** When the last successful render completed. */
|
|
36
|
+
renderedAt?: Date;
|
|
37
|
+
/** Hash of the input data that produced the cached render. */
|
|
38
|
+
dataHash?: string;
|
|
39
|
+
/** How this widget came to exist — drives rights + audit. */
|
|
40
|
+
source?: "manual" | "ai-copilot" | "template" | "scheduled" | "custom-function";
|
|
41
|
+
/** Per-widget freshness policy (overrides mail template defaults). */
|
|
42
|
+
freshness?: {
|
|
43
|
+
/** Max acceptable age in seconds. */
|
|
44
|
+
maxAgeSeconds?: number;
|
|
45
|
+
/** Refresh on save of matching source collections (requires change-stream hook). */
|
|
46
|
+
refreshOnChangeOf?: string[];
|
|
47
|
+
};
|
|
48
|
+
/** Free-form tags — dashboards use these for filtering / grouping. */
|
|
49
|
+
labels?: string[];
|
|
50
|
+
/** Soft-delete flag — default true. */
|
|
51
|
+
active?: boolean;
|
|
52
|
+
/** Share-public URL token; set only when reports.customer-widgets.public granted + action invoked. */
|
|
53
|
+
publicToken?: string;
|
|
54
|
+
/** User-visible render status — surfaces failures in admin UI. */
|
|
55
|
+
renderStatus?: "pending" | "rendering" | "ready" | "failed";
|
|
56
|
+
renderError?: string;
|
|
57
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameter schema for widget templates. Declared on IaYOUneWidget.paramSchema[]
|
|
3
|
+
* so instances (ICustomerWidget) can bind concrete values that the render
|
|
4
|
+
* pipeline substitutes into dataConfig filters.
|
|
5
|
+
*
|
|
6
|
+
* Added 2026-04-17 as part of the widget prerender / chart-in-email foundation.
|
|
7
|
+
*/
|
|
8
|
+
export interface IWidgetParamSchema {
|
|
9
|
+
/** Machine-readable key used in URL / dataConfig filter bindings. */
|
|
10
|
+
key: string;
|
|
11
|
+
/** Human-readable label for the authoring UI. Supports i18n via core's translate(). */
|
|
12
|
+
label?: string;
|
|
13
|
+
/** Declared value shape. Drives form control selection + validation. */
|
|
14
|
+
type: "string" | "number" | "boolean" | "date" | "daterange" | "locale" | "enum" | "objectid";
|
|
15
|
+
/** Must be supplied when instantiating a widget from this template. */
|
|
16
|
+
required?: boolean;
|
|
17
|
+
/** Default value substituted when an instance doesn't provide its own. */
|
|
18
|
+
default?: any;
|
|
19
|
+
/** For type: "enum" — allowed values with optional labels. */
|
|
20
|
+
enum?: {
|
|
21
|
+
value: any;
|
|
22
|
+
label?: string;
|
|
23
|
+
}[];
|
|
24
|
+
/** For type: "objectid" — which model the id points at (e.g. aMN.Markets). */
|
|
25
|
+
refModel?: string;
|
|
26
|
+
/** Longer description shown as help text in the authoring UI. */
|
|
27
|
+
description?: string;
|
|
28
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
import { IWidgetParamSchema } from "./IWidgetParamSchema";
|
|
2
3
|
export interface ILink {
|
|
3
4
|
state?: string;
|
|
4
5
|
params?: {
|
|
@@ -70,4 +71,24 @@ export interface IaYOUneWidget extends IDefaultFields {
|
|
|
70
71
|
publicBeta?: boolean;
|
|
71
72
|
percentageOfUsers?: number;
|
|
72
73
|
GA?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Optional customer scope. Null / absent = platform template visible to all
|
|
76
|
+
* customers. Set = customer-private template visible only to users of that
|
|
77
|
+
* customer. Added 2026-04-17.
|
|
78
|
+
*/
|
|
79
|
+
_customerID?: ObjectId;
|
|
80
|
+
/**
|
|
81
|
+
* Chart render engine. When 'echarts', chartConfig holds a full
|
|
82
|
+
* EChartsOption JSON and is rendered browser-side via ngx-echarts + server
|
|
83
|
+
* -side via echarts SSR + @resvg/resvg-js. Default ('ngx-charts' or unset)
|
|
84
|
+
* preserves the legacy rendering path. Added 2026-04-17.
|
|
85
|
+
*/
|
|
86
|
+
renderer?: "echarts" | "ngx-charts";
|
|
87
|
+
/**
|
|
88
|
+
* Parameter schema declaring which bindings an instance (ICustomerWidget)
|
|
89
|
+
* must / may supply (e.g. market, cadence, dateFrom). Consumed by the
|
|
90
|
+
* authoring UI, AI Copilot, and the prerender worker's param resolver.
|
|
91
|
+
* Added 2026-04-17.
|
|
92
|
+
*/
|
|
93
|
+
paramSchema?: IWidgetParamSchema[];
|
|
73
94
|
}
|
package/interfaces/index.d.ts
CHANGED
|
@@ -247,6 +247,7 @@ export * from "./ICustomConfigFile";
|
|
|
247
247
|
export * from "./ICustomer";
|
|
248
248
|
export * from "./ICustomerDashboard";
|
|
249
249
|
export * from "./ICustomerData";
|
|
250
|
+
export * from "./ICustomerWidget";
|
|
250
251
|
export * from "./ICustomerToken";
|
|
251
252
|
export * from "./ICustomVariable";
|
|
252
253
|
export * from "./ICustomFunctionLog";
|
|
@@ -701,6 +702,7 @@ export * from "./IPageBlock";
|
|
|
701
702
|
export * from "./IWhatsappLog";
|
|
702
703
|
export * from "./IWidget";
|
|
703
704
|
export * from "./IWidgetEmbedSite";
|
|
705
|
+
export * from "./IWidgetParamSchema";
|
|
704
706
|
export * from "./IWikiPage";
|
|
705
707
|
export * from "./IWizard";
|
|
706
708
|
export * from "./IWorkCenter";
|
package/interfaces/index.js
CHANGED
|
@@ -263,6 +263,7 @@ __exportStar(require("./ICustomConfigFile"), exports);
|
|
|
263
263
|
__exportStar(require("./ICustomer"), exports);
|
|
264
264
|
__exportStar(require("./ICustomerDashboard"), exports);
|
|
265
265
|
__exportStar(require("./ICustomerData"), exports);
|
|
266
|
+
__exportStar(require("./ICustomerWidget"), exports);
|
|
266
267
|
__exportStar(require("./ICustomerToken"), exports);
|
|
267
268
|
__exportStar(require("./ICustomVariable"), exports);
|
|
268
269
|
__exportStar(require("./ICustomFunctionLog"), exports);
|
|
@@ -717,6 +718,7 @@ __exportStar(require("./IPageBlock"), exports);
|
|
|
717
718
|
__exportStar(require("./IWhatsappLog"), exports);
|
|
718
719
|
__exportStar(require("./IWidget"), exports);
|
|
719
720
|
__exportStar(require("./IWidgetEmbedSite"), exports);
|
|
721
|
+
__exportStar(require("./IWidgetParamSchema"), exports);
|
|
720
722
|
__exportStar(require("./IWikiPage"), exports);
|
|
721
723
|
__exportStar(require("./IWizard"), exports);
|
|
722
724
|
__exportStar(require("./IWorkCenter"), exports);
|