@tolinax/ayoune-interfaces 2026.20.0 → 2026.21.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.
@@ -28,6 +28,7 @@ export declare enum aMN {
28
28
  AIAgentCalibrationLogs = "AIAgentCalibrationLogs",
29
29
  AIAgentExamples = "AIAgentExamples",
30
30
  AIAgents = "AIAgents",
31
+ AIApprovalRequests = "AIApprovalRequests",
31
32
  AICommands = "AICommands",
32
33
  AIConversations = "AIConversations",
33
34
  AICostTrackers = "AICostTrackers",
@@ -32,6 +32,7 @@ var aMN;
32
32
  aMN["AIAgentCalibrationLogs"] = "AIAgentCalibrationLogs";
33
33
  aMN["AIAgentExamples"] = "AIAgentExamples";
34
34
  aMN["AIAgents"] = "AIAgents";
35
+ aMN["AIApprovalRequests"] = "AIApprovalRequests";
35
36
  aMN["AICommands"] = "AICommands";
36
37
  aMN["AIConversations"] = "AIConversations";
37
38
  aMN["AICostTrackers"] = "AICostTrackers";
@@ -932,6 +932,16 @@ const modelsAndRights = [
932
932
  allowDuplicate: false,
933
933
  updateBy: "_id",
934
934
  },
935
+ {
936
+ plural: "AIApprovalRequests",
937
+ singular: "AIApprovalRequest",
938
+ module: "ai",
939
+ right: "ai.aiapprovalrequests",
940
+ readOnly: false,
941
+ importable: false,
942
+ allowDuplicate: false,
943
+ updateBy: "_id",
944
+ },
935
945
  {
936
946
  plural: "AIKnowledgePacks",
937
947
  singular: "AIKnowledgePack",
@@ -0,0 +1,34 @@
1
+ import { IDefaultFields } from "./IDefaultFields";
2
+ /**
3
+ * Tracks a multi-approver request (two-person rule / four-eyes principle).
4
+ * Created when a workflow step or controlled action requires N distinct approvers
5
+ * before execution can proceed.
6
+ */
7
+ export interface IAIApprovalRequest extends IDefaultFields {
8
+ _customerID: ObjectId;
9
+ _clientID?: ObjectId[];
10
+ _subID?: ObjectId[];
11
+ resourceType: 'workflow-step' | 'enterprise-control-change' | 'agent-update' | 'high-risk-deletion' | 'break-glass-activation' | 'outbound-deliverable' | 'custom';
12
+ _resource?: ObjectId;
13
+ resourceContext?: any;
14
+ title: string;
15
+ description?: string;
16
+ _requestedBy: ObjectId;
17
+ requestedAt?: Date;
18
+ minApprovers?: number;
19
+ requiredRoles?: string[];
20
+ _eligibleApprovers?: ObjectId[];
21
+ status?: 'pending' | 'approved' | 'rejected' | 'expired' | 'cancelled';
22
+ approvals?: {
23
+ _approver: ObjectId;
24
+ approverRole?: string;
25
+ decision: 'approved' | 'rejected';
26
+ comment?: string;
27
+ timestamp: Date;
28
+ }[];
29
+ decidedAt?: Date;
30
+ decidedReason?: string;
31
+ expiresAt?: Date;
32
+ _linkedWorkflowRun?: ObjectId;
33
+ _linkedConversation?: ObjectId;
34
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -28,6 +28,16 @@ export interface IAIEnterpriseControl extends IDefaultFields {
28
28
  _approvers?: ObjectId[];
29
29
  expiryMinutes?: number;
30
30
  notifyOnActivation?: boolean;
31
+ activeUntil?: Date;
32
+ activatedBy?: ObjectId;
33
+ activatedAt?: Date;
34
+ activationReason?: string;
35
+ };
36
+ twoPersonRule?: {
37
+ enabled?: boolean;
38
+ minApprovers?: number;
39
+ requiredRoles?: string[];
40
+ notifyChannels?: string[];
31
41
  };
32
42
  _managedBy?: ObjectId;
33
43
  reviewCycle?: 'monthly' | 'quarterly' | 'annually';
@@ -125,4 +125,15 @@ export interface IWebsite extends IDefaultFields {
125
125
  /** Custom HTML for coming soon page */
126
126
  customHtml?: string;
127
127
  };
128
+ /** Custom error page overrides served by consumer-app */
129
+ errorPages?: {
130
+ notFound?: {
131
+ html?: string;
132
+ title?: string;
133
+ };
134
+ serverError?: {
135
+ html?: string;
136
+ title?: string;
137
+ };
138
+ };
128
139
  }
@@ -25,6 +25,7 @@ export * from "./IAgendaJob";
25
25
  export * from "./IAIAgent";
26
26
  export * from "./IAIAgentCalibrationLog";
27
27
  export * from "./IAIAgentExample";
28
+ export * from "./IAIApprovalRequest";
28
29
  export * from "./IAICommand";
29
30
  export * from "./IAIConversation";
30
31
  export * from "./IAICostTracker";
@@ -41,6 +41,7 @@ __exportStar(require("./IAgendaJob"), exports);
41
41
  __exportStar(require("./IAIAgent"), exports);
42
42
  __exportStar(require("./IAIAgentCalibrationLog"), exports);
43
43
  __exportStar(require("./IAIAgentExample"), exports);
44
+ __exportStar(require("./IAIApprovalRequest"), exports);
44
45
  __exportStar(require("./IAICommand"), exports);
45
46
  __exportStar(require("./IAIConversation"), exports);
46
47
  __exportStar(require("./IAICostTracker"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolinax/ayoune-interfaces",
3
- "version": "2026.20.0",
3
+ "version": "2026.21.0",
4
4
  "description": "Houses TypeScript interfaces for aYOUne",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",