@tolinax/ayoune-interfaces 2026.65.0 → 2026.66.1

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/README.md CHANGED
@@ -1,132 +1,132 @@
1
- # aYOUne Interfaces
2
-
3
- A comprehensive TypeScript interfaces library for the aYOUne platform - a modular business as a Service platform.
4
-
5
- [![npm version](https://badge.fury.io/js/@tolinax%2Fayoune-interfaces.svg)](https://badge.fury.io/js/@tolinax%2Fayoune-interfaces)
6
- [![License: LGPL-3.0](https://img.shields.io/badge/License-LGPL-yellow.svg)](https://opensource.org/license/lgpl-3-0)
7
-
8
- ## Overview
9
-
10
- This library provides TypeScript type definitions and data exports for the aYOUne platform, which includes modules for:
11
-
12
- - **AI** - Artificial Intelligence services
13
- - **CRM** - Customer Relationship Management
14
- - **CMS** - Content Management System
15
- - **Marketing** - Marketing automation and campaigns
16
- - **Automation** - Business process automation
17
- - **PM** - Project Management
18
- - **E-commerce** - Online store management
19
- - And many more specialized modules
20
-
21
- ## Installation
22
-
23
- ```bash
24
- npm install @tolinax/ayoune-interfaces
25
- ```
26
-
27
- ## Usage
28
-
29
- ### Importing Interfaces
30
-
31
- ```typescript
32
- import { IAPI, ITicket, IaYOUneUser } from '@tolinax/ayoune-interfaces';
33
-
34
- // Use interfaces for type safety
35
- const api: IAPI = {
36
- _customerID: "customer123",
37
- _clientID: [],
38
- _subID: [],
39
- _user: "user456",
40
- name: "My API",
41
- callback_url: "https://example.com/callback",
42
- access_token: "token123",
43
- access_token_key: "key456",
44
- active: true,
45
- scopes: [{ key: "read" }],
46
- limit: false,
47
- rateLimit: 1000
48
- };
49
- ```
50
-
51
- ### Importing Data and Enums
52
-
53
- ```typescript
54
- import { aYOUneServices, aYOUneModules, aMN } from '@tolinax/ayoune-interfaces';
55
-
56
- // Access service definitions
57
- console.log(aYOUneServices); // Array of all aYOUne services with hosts
58
-
59
- // Access module definitions
60
- console.log(aYOUneModules); // Array of platform modules
61
-
62
- // Use model names enum
63
- const collectionName = aMN.AIConversations; // "AIConversations"
64
- ```
65
-
66
- ## API Reference
67
-
68
- ### Core Interfaces
69
-
70
- All interfaces extend `IDefaultFields` which provides common MongoDB document fields:
71
-
72
- - `_id`: ObjectId
73
- - `created`: Date
74
- - `updated`: Date
75
- - Other standard database fields
76
-
77
- ### Data Exports
78
-
79
- #### Services (`aYOUneServices`)
80
- Array of service definitions with:
81
- - `label`: Human-readable service name
82
- - `module`: Associated platform module
83
- - `host`: Service hostname
84
-
85
- #### Modules (`aYOUneModules`)
86
- Array of platform modules with:
87
- - `label`: Module display name
88
- - `module`: Module identifier
89
- - `host`: Module hostname
90
-
91
- #### Model Names (`aMN`)
92
- Enum containing all MongoDB collection names used across the platform.
93
-
94
- ## Development
95
-
96
- ### Building
97
-
98
- ```bash
99
- npm run build
100
- ```
101
-
102
- ### Release
103
-
104
- This project uses conventional commits and automated releases:
105
-
106
- ```bash
107
- npm run release
108
- ```
109
-
110
- ## Platform Architecture
111
-
112
- The aYOUne platform consists of multiple specialized services:
113
-
114
- - **Global Services**: Middleware, Datatables, Barcodes, Scripts
115
- - **AI Services**: Text/Image/Video Generation, Text-to-Speech
116
- - **CMS Services**: Media, Content Snippets, Dynamic Content
117
- - **Business Services**: CRM, PM, Marketing, Automation
118
- - **Analytics**: Statistics, Monitoring, Reporting
119
- - **E-commerce**: Sales, Purchase, Accounting
120
-
121
- Each service is independently deployable and communicates through well-defined interfaces provided by this library.
122
-
123
- ## Contributing
124
-
125
- 1. Follow conventional commit format (`feat:`, `fix:`, `docs:`, etc.)
126
- 2. All interfaces should extend `IDefaultFields` when appropriate
127
- 3. Use consistent naming: interfaces start with `I`, data exports use descriptive names
128
- 4. Update CHANGELOG.md entries are generated automatically
129
-
130
- ## License
131
-
132
- LGPL-3.0 © tolinax
1
+ # aYOUne Interfaces
2
+
3
+ A comprehensive TypeScript interfaces library for the aYOUne platform - a modular business as a Service platform.
4
+
5
+ [![npm version](https://badge.fury.io/js/@tolinax%2Fayoune-interfaces.svg)](https://badge.fury.io/js/@tolinax%2Fayoune-interfaces)
6
+ [![License: LGPL-3.0](https://img.shields.io/badge/License-LGPL-yellow.svg)](https://opensource.org/license/lgpl-3-0)
7
+
8
+ ## Overview
9
+
10
+ This library provides TypeScript type definitions and data exports for the aYOUne platform, which includes modules for:
11
+
12
+ - **AI** - Artificial Intelligence services
13
+ - **CRM** - Customer Relationship Management
14
+ - **CMS** - Content Management System
15
+ - **Marketing** - Marketing automation and campaigns
16
+ - **Automation** - Business process automation
17
+ - **PM** - Project Management
18
+ - **E-commerce** - Online store management
19
+ - And many more specialized modules
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ npm install @tolinax/ayoune-interfaces
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ### Importing Interfaces
30
+
31
+ ```typescript
32
+ import { IAPI, ITicket, IaYOUneUser } from '@tolinax/ayoune-interfaces';
33
+
34
+ // Use interfaces for type safety
35
+ const api: IAPI = {
36
+ _customerID: "customer123",
37
+ _clientID: [],
38
+ _subID: [],
39
+ _user: "user456",
40
+ name: "My API",
41
+ callback_url: "https://example.com/callback",
42
+ access_token: "token123",
43
+ access_token_key: "key456",
44
+ active: true,
45
+ scopes: [{ key: "read" }],
46
+ limit: false,
47
+ rateLimit: 1000
48
+ };
49
+ ```
50
+
51
+ ### Importing Data and Enums
52
+
53
+ ```typescript
54
+ import { aYOUneServices, aYOUneModules, aMN } from '@tolinax/ayoune-interfaces';
55
+
56
+ // Access service definitions
57
+ console.log(aYOUneServices); // Array of all aYOUne services with hosts
58
+
59
+ // Access module definitions
60
+ console.log(aYOUneModules); // Array of platform modules
61
+
62
+ // Use model names enum
63
+ const collectionName = aMN.AIConversations; // "AIConversations"
64
+ ```
65
+
66
+ ## API Reference
67
+
68
+ ### Core Interfaces
69
+
70
+ All interfaces extend `IDefaultFields` which provides common MongoDB document fields:
71
+
72
+ - `_id`: ObjectId
73
+ - `created`: Date
74
+ - `updated`: Date
75
+ - Other standard database fields
76
+
77
+ ### Data Exports
78
+
79
+ #### Services (`aYOUneServices`)
80
+ Array of service definitions with:
81
+ - `label`: Human-readable service name
82
+ - `module`: Associated platform module
83
+ - `host`: Service hostname
84
+
85
+ #### Modules (`aYOUneModules`)
86
+ Array of platform modules with:
87
+ - `label`: Module display name
88
+ - `module`: Module identifier
89
+ - `host`: Module hostname
90
+
91
+ #### Model Names (`aMN`)
92
+ Enum containing all MongoDB collection names used across the platform.
93
+
94
+ ## Development
95
+
96
+ ### Building
97
+
98
+ ```bash
99
+ npm run build
100
+ ```
101
+
102
+ ### Release
103
+
104
+ This project uses conventional commits and automated releases:
105
+
106
+ ```bash
107
+ npm run release
108
+ ```
109
+
110
+ ## Platform Architecture
111
+
112
+ The aYOUne platform consists of multiple specialized services:
113
+
114
+ - **Global Services**: Middleware, Datatables, Barcodes, Scripts
115
+ - **AI Services**: Text/Image/Video Generation, Text-to-Speech
116
+ - **CMS Services**: Media, Content Snippets, Dynamic Content
117
+ - **Business Services**: CRM, PM, Marketing, Automation
118
+ - **Analytics**: Statistics, Monitoring, Reporting
119
+ - **E-commerce**: Sales, Purchase, Accounting
120
+
121
+ Each service is independently deployable and communicates through well-defined interfaces provided by this library.
122
+
123
+ ## Contributing
124
+
125
+ 1. Follow conventional commit format (`feat:`, `fix:`, `docs:`, etc.)
126
+ 2. All interfaces should extend `IDefaultFields` when appropriate
127
+ 3. Use consistent naming: interfaces start with `I`, data exports use descriptive names
128
+ 4. Update CHANGELOG.md entries are generated automatically
129
+
130
+ ## License
131
+
132
+ LGPL-3.0 © tolinax
package/data/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export * from "./modelsAndRights";
3
3
  export * from "./modules";
4
4
  export * from "./services";
5
5
  export * from "./pageConfig";
6
+ export * from "./iotCapabilities";
package/data/index.js CHANGED
@@ -19,3 +19,4 @@ __exportStar(require("./modelsAndRights"), exports);
19
19
  __exportStar(require("./modules"), exports);
20
20
  __exportStar(require("./services"), exports);
21
21
  __exportStar(require("./pageConfig"), exports);
22
+ __exportStar(require("./iotCapabilities"), exports);
@@ -0,0 +1,27 @@
1
+ /**
2
+ * IoT device taxonomy — single source of truth for `IIoTDevice.deviceType` and
3
+ * `IIoTDevice.capabilities[]`.
4
+ *
5
+ * Why string-literal sets instead of TS enums:
6
+ * - they survive npm publish without runtime overhead
7
+ * - new values can be added in a feature-branch without breaking older consumers
8
+ * - easier to hand to non-TS clients (ESP32 firmware, shell scripts, admin UI lookups)
9
+ *
10
+ * Discriminator: `deviceType` (mostly fixed shape per class).
11
+ * Behaviour switch: `capabilities[]` (multi-value, drives action endpoints + UI tabs).
12
+ */
13
+ export declare const IOT_DEVICE_TYPES: readonly ["wallboard", "control-panel", "production-terminal", "display", "ad-display", "status-light", "access-terminal", "sensor-node", "custom"];
14
+ export type IoTDeviceType = (typeof IOT_DEVICE_TYPES)[number];
15
+ /**
16
+ * Capabilities a device can advertise. Action endpoints in `api-iot` are
17
+ * gated on these, the admin-v2 detail view derives its tabs from them, and
18
+ * the notifier only routes events to subscribers whose capability set
19
+ * includes the matching channel.
20
+ */
21
+ export declare const IOT_CAPABILITIES: readonly ["kiosk", "monitoring", "cast-receiver", "welcome-screen", "dashboard", "sensor-temp", "sensor-humidity", "sensor-power", "sensor-presence", "badge-reader", "nfc", "gpio-relay", "gpio-led", "screen-share", "remote-control", "remote-commands", "process-mgmt", "log-collection", "reload", "telemetry", "cli-runner"];
22
+ export type IoTCapability = (typeof IOT_CAPABILITIES)[number];
23
+ /**
24
+ * Convenience map: which action endpoints in `api-iot` does each capability
25
+ * unlock. Read by the action-router to 412 unsupported actions early.
26
+ */
27
+ export declare const IOT_CAPABILITY_ACTIONS: Record<string, string[]>;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ /**
3
+ * IoT device taxonomy — single source of truth for `IIoTDevice.deviceType` and
4
+ * `IIoTDevice.capabilities[]`.
5
+ *
6
+ * Why string-literal sets instead of TS enums:
7
+ * - they survive npm publish without runtime overhead
8
+ * - new values can be added in a feature-branch without breaking older consumers
9
+ * - easier to hand to non-TS clients (ESP32 firmware, shell scripts, admin UI lookups)
10
+ *
11
+ * Discriminator: `deviceType` (mostly fixed shape per class).
12
+ * Behaviour switch: `capabilities[]` (multi-value, drives action endpoints + UI tabs).
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.IOT_CAPABILITY_ACTIONS = exports.IOT_CAPABILITIES = exports.IOT_DEVICE_TYPES = void 0;
16
+ exports.IOT_DEVICE_TYPES = [
17
+ /** Pi-/PC-Kiosk großes Display (e.g. company-wallboard kiosks). */
18
+ 'wallboard',
19
+ /** Pi/PC-Touchpanel an einem Standort (door, lobby, conference room). */
20
+ 'control-panel',
21
+ /** Pi/PC am WorkCenter/Machine in der Produktion. */
22
+ 'production-terminal',
23
+ /** Einfaches Anzeige-Gerät — Info-Screen, Warteschlange, Speisekarte. */
24
+ 'display',
25
+ /** Werbedisplay — eigenes Inventory-/Schedule-Modell, kein Dashboard-Inhalt. */
26
+ 'ad-display',
27
+ /** Status-Leuchte / Ampel — heute typischerweise ESP32 mit GPIO-LEDs. */
28
+ 'status-light',
29
+ /** Badge-Reader / NFC-Terminal an einer Tür oder Zeiterfassung. */
30
+ 'access-terminal',
31
+ /** Headless Sensor-Knoten (Temp/Humidity/Power/Presence). */
32
+ 'sensor-node',
33
+ /** Escape-Hatch für noch-nicht-modellierte Custom-Devices. */
34
+ 'custom',
35
+ ];
36
+ /**
37
+ * Capabilities a device can advertise. Action endpoints in `api-iot` are
38
+ * gated on these, the admin-v2 detail view derives its tabs from them, and
39
+ * the notifier only routes events to subscribers whose capability set
40
+ * includes the matching channel.
41
+ */
42
+ exports.IOT_CAPABILITIES = [
43
+ // Display / kiosk content
44
+ 'kiosk',
45
+ 'monitoring',
46
+ 'cast-receiver',
47
+ 'welcome-screen',
48
+ 'dashboard',
49
+ // Sensors
50
+ 'sensor-temp',
51
+ 'sensor-humidity',
52
+ 'sensor-power',
53
+ 'sensor-presence',
54
+ // Identity / credential I/O
55
+ 'badge-reader',
56
+ 'nfc',
57
+ // GPIO actuators
58
+ 'gpio-relay',
59
+ 'gpio-led',
60
+ // Remote-control surfaces (used today by desktop-client)
61
+ 'screen-share',
62
+ 'remote-control',
63
+ 'remote-commands',
64
+ 'process-mgmt',
65
+ 'log-collection',
66
+ // Generic agent capabilities
67
+ 'reload',
68
+ 'telemetry',
69
+ 'cli-runner',
70
+ ];
71
+ /**
72
+ * Convenience map: which action endpoints in `api-iot` does each capability
73
+ * unlock. Read by the action-router to 412 unsupported actions early.
74
+ */
75
+ exports.IOT_CAPABILITY_ACTIONS = {
76
+ reload: ['reload'],
77
+ 'cast-receiver': ['cast-start', 'cast-stop'],
78
+ 'welcome-screen': ['welcome-on', 'welcome-off'],
79
+ 'gpio-relay': ['relay-toggle', 'relay-on', 'relay-off'],
80
+ 'gpio-led': ['led-set'],
81
+ 'cli-runner': ['cli-exec'],
82
+ 'remote-commands': ['remote-exec'],
83
+ };
@@ -7972,7 +7972,7 @@ const modelsAndRights = [
7972
7972
  plural: "MarketplaceApps",
7973
7973
  singular: "MarketplaceApp",
7974
7974
  module: "marketplace",
7975
- right: "marketplace.apps",
7975
+ right: "marketplace.marketplaceapps",
7976
7976
  readOnly: false,
7977
7977
  importable: false,
7978
7978
  allowDuplicate: false,
@@ -8001,7 +8001,7 @@ const modelsAndRights = [
8001
8001
  plural: "MarketplaceBundles",
8002
8002
  singular: "MarketplaceBundle",
8003
8003
  module: "marketplace",
8004
- right: "marketplace.bundles",
8004
+ right: "marketplace.marketplacebundles",
8005
8005
  readOnly: false,
8006
8006
  importable: false,
8007
8007
  allowDuplicate: false,
@@ -8026,7 +8026,7 @@ const modelsAndRights = [
8026
8026
  plural: "MarketplaceInstallations",
8027
8027
  singular: "MarketplaceInstallation",
8028
8028
  module: "marketplace",
8029
- right: "marketplace.installations",
8029
+ right: "marketplace.marketplaceinstallations",
8030
8030
  readOnly: false,
8031
8031
  importable: false,
8032
8032
  allowDuplicate: false,
@@ -8055,7 +8055,7 @@ const modelsAndRights = [
8055
8055
  plural: "MarketplaceReviews",
8056
8056
  singular: "MarketplaceReview",
8057
8057
  module: "marketplace",
8058
- right: "marketplace.reviews",
8058
+ right: "marketplace.marketplacereviews",
8059
8059
  readOnly: false,
8060
8060
  importable: false,
8061
8061
  allowDuplicate: false,
@@ -58,12 +58,18 @@ export interface IIoTDevice extends IDefaultFields {
58
58
  department?: ObjectId;
59
59
  workCenter?: ObjectId;
60
60
  machine?: ObjectId;
61
+ /** FK to the WallBoard this device renders, only set when `deviceType === 'wallboard'`. */
62
+ _wallboardID?: ObjectId;
61
63
  active?: boolean;
62
64
  hostName?: string;
63
65
  deviceID?: string;
64
66
  deviceName?: string;
67
+ /** One of `IOT_DEVICE_TYPES` — kept as plain string for migration tolerance. */
65
68
  deviceType?: string;
69
+ /** Legacy comma-separated list. Superseded by `capabilities[]` — both fields stay populated for one release. */
66
70
  deviceFunctions?: string;
71
+ /** New form (subset of `IOT_CAPABILITIES`). Drives action gating in `api-iot` and tab rendering in admin-v2. */
72
+ capabilities?: string[];
67
73
  topic?: string;
68
74
  ip?: string;
69
75
  hostname?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolinax/ayoune-interfaces",
3
- "version": "2026.65.0",
3
+ "version": "2026.66.1",
4
4
  "description": "Houses TypeScript interfaces for aYOUne",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",