@memberjunction/core-entities 2.46.0 → 2.48.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/dist/custom/EntityEntityExtended.d.ts +13 -0
- package/dist/custom/EntityEntityExtended.d.ts.map +1 -0
- package/dist/custom/EntityEntityExtended.js +42 -0
- package/dist/custom/EntityEntityExtended.js.map +1 -0
- package/dist/custom/EntityFieldEntityExtended.d.ts +22 -0
- package/dist/custom/EntityFieldEntityExtended.d.ts.map +1 -0
- package/dist/custom/EntityFieldEntityExtended.js +80 -0
- package/dist/custom/EntityFieldEntityExtended.js.map +1 -0
- package/dist/generated/entity_subclasses.d.ts +84 -39
- package/dist/generated/entity_subclasses.d.ts.map +1 -1
- package/dist/generated/entity_subclasses.js +125 -65
- package/dist/generated/entity_subclasses.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EntityEntity } from '../generated/entity_subclasses';
|
|
2
|
+
/**
|
|
3
|
+
* Extended EntityEntity class that provides automatic handling of Description field updates.
|
|
4
|
+
* When a user manually updates the Description, it automatically sets AutoUpdateDescription to 1
|
|
5
|
+
* to prevent CodeGen from overwriting the custom description.
|
|
6
|
+
*/
|
|
7
|
+
export declare class EntityEntityExtended extends EntityEntity {
|
|
8
|
+
/**
|
|
9
|
+
* Override Set to handle Description field changes
|
|
10
|
+
*/
|
|
11
|
+
Set(FieldName: string, Value: any): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=EntityEntityExtended.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityEntityExtended.d.ts","sourceRoot":"","sources":["../../src/custom/EntityEntityExtended.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D;;;;GAIG;AACH,qBACa,oBAAqB,SAAQ,YAAY;IAClD;;OAEG;IACa,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;CAiB3D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.EntityEntityExtended = void 0;
|
|
10
|
+
const global_1 = require("@memberjunction/global");
|
|
11
|
+
const core_1 = require("@memberjunction/core");
|
|
12
|
+
const entity_subclasses_1 = require("../generated/entity_subclasses");
|
|
13
|
+
/**
|
|
14
|
+
* Extended EntityEntity class that provides automatic handling of Description field updates.
|
|
15
|
+
* When a user manually updates the Description, it automatically sets AutoUpdateDescription to 1
|
|
16
|
+
* to prevent CodeGen from overwriting the custom description.
|
|
17
|
+
*/
|
|
18
|
+
let EntityEntityExtended = class EntityEntityExtended extends entity_subclasses_1.EntityEntity {
|
|
19
|
+
/**
|
|
20
|
+
* Override Set to handle Description field changes
|
|
21
|
+
*/
|
|
22
|
+
Set(FieldName, Value) {
|
|
23
|
+
// Handle Description field changes
|
|
24
|
+
if (FieldName.toLowerCase() === 'description' && !this.NewRecord) {
|
|
25
|
+
const currentDescription = this.GetFieldByName('Description')?.Value;
|
|
26
|
+
const autoUpdateDescription = this.GetFieldByName('AutoUpdateDescription')?.Value;
|
|
27
|
+
// If description is changing and AutoUpdateDescription is not already true
|
|
28
|
+
if (Value !== currentDescription && autoUpdateDescription !== true) {
|
|
29
|
+
console.warn(`Setting AutoUpdateDescription to true for Entity "${this.Name}" because Description is being manually updated. This will prevent CodeGen from overwriting this description.`);
|
|
30
|
+
// Set AutoUpdateDescription to true first
|
|
31
|
+
this.AutoUpdateDescription = true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// Call parent Set method
|
|
35
|
+
super.Set(FieldName, Value);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.EntityEntityExtended = EntityEntityExtended;
|
|
39
|
+
exports.EntityEntityExtended = EntityEntityExtended = __decorate([
|
|
40
|
+
(0, global_1.RegisterClass)(core_1.BaseEntity, 'Entities')
|
|
41
|
+
], EntityEntityExtended);
|
|
42
|
+
//# sourceMappingURL=EntityEntityExtended.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityEntityExtended.js","sourceRoot":"","sources":["../../src/custom/EntityEntityExtended.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAuD;AACvD,+CAAkD;AAClD,sEAA8D;AAE9D;;;;GAIG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,gCAAY;IAClD;;OAEG;IACa,GAAG,CAAC,SAAiB,EAAE,KAAU;QAC7C,mCAAmC;QACnC,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,aAAa,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YAC/D,MAAM,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC;YACrE,MAAM,qBAAqB,GAAG,IAAI,CAAC,cAAc,CAAC,uBAAuB,CAAC,EAAE,KAAK,CAAC;YAElF,2EAA2E;YAC3E,IAAI,KAAK,KAAK,kBAAkB,IAAI,qBAAqB,KAAK,IAAI,EAAE,CAAC;gBACjE,OAAO,CAAC,IAAI,CAAC,qDAAqD,IAAI,CAAC,IAAI,+GAA+G,CAAC,CAAC;gBAC5L,0CAA0C;gBAC1C,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;YACtC,CAAC;QACL,CAAC;QAED,yBAAyB;QACzB,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;CACJ,CAAA;AArBY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,sBAAa,EAAC,iBAAU,EAAE,UAAU,CAAC;GACzB,oBAAoB,CAqBhC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ValidationResult } from '@memberjunction/core';
|
|
2
|
+
import { EntityFieldEntity } from '../generated/entity_subclasses';
|
|
3
|
+
/**
|
|
4
|
+
* Extended EntityFieldEntity class that provides safeguards against modifying database-reflected properties.
|
|
5
|
+
* These properties should only be updated by the CodeGen system when reflecting changes from the database schema.
|
|
6
|
+
*/
|
|
7
|
+
export declare class EntityFieldEntityExtended extends EntityFieldEntity {
|
|
8
|
+
/**
|
|
9
|
+
* Properties that are reflected from the database schema and should not be modified directly
|
|
10
|
+
*/
|
|
11
|
+
private static readonly DATABASE_REFLECTED_PROPERTIES;
|
|
12
|
+
/**
|
|
13
|
+
* Override Set to handle Description field changes
|
|
14
|
+
*/
|
|
15
|
+
Set(FieldName: string, Value: any): void;
|
|
16
|
+
/**
|
|
17
|
+
* Validates the entity field before saving. Extends the base validation to prevent modifications
|
|
18
|
+
* to database-reflected properties.
|
|
19
|
+
*/
|
|
20
|
+
Validate(): ValidationResult;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=EntityFieldEntityExtended.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityFieldEntityExtended.d.ts","sourceRoot":"","sources":["../../src/custom/EntityFieldEntityExtended.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,gBAAgB,EAA4C,MAAM,sBAAsB,CAAC;AAC9G,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE;;;GAGG;AACH,qBACa,yBAA0B,SAAQ,iBAAiB;IAC5D;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,6BAA6B,CAcnD;IAEF;;OAEG;IACa,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAkBxD;;;OAGG;IACa,QAAQ,IAAI,gBAAgB;CAuB/C"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var EntityFieldEntityExtended_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.EntityFieldEntityExtended = void 0;
|
|
11
|
+
const global_1 = require("@memberjunction/global");
|
|
12
|
+
const core_1 = require("@memberjunction/core");
|
|
13
|
+
const entity_subclasses_1 = require("../generated/entity_subclasses");
|
|
14
|
+
/**
|
|
15
|
+
* Extended EntityFieldEntity class that provides safeguards against modifying database-reflected properties.
|
|
16
|
+
* These properties should only be updated by the CodeGen system when reflecting changes from the database schema.
|
|
17
|
+
*/
|
|
18
|
+
let EntityFieldEntityExtended = EntityFieldEntityExtended_1 = class EntityFieldEntityExtended extends entity_subclasses_1.EntityFieldEntity {
|
|
19
|
+
/**
|
|
20
|
+
* Override Set to handle Description field changes
|
|
21
|
+
*/
|
|
22
|
+
Set(FieldName, Value) {
|
|
23
|
+
// Handle Description field changes
|
|
24
|
+
if (FieldName.toLowerCase() === 'description' && !this.NewRecord) {
|
|
25
|
+
const currentDescription = this.GetFieldByName('Description')?.Value;
|
|
26
|
+
const autoUpdateDescription = this.GetFieldByName('AutoUpdateDescription')?.Value;
|
|
27
|
+
// If description is changing and AutoUpdateDescription is not already true
|
|
28
|
+
if (Value !== currentDescription && autoUpdateDescription !== true) {
|
|
29
|
+
console.warn(`Setting AutoUpdateDescription to true for Entity Field "${this.Name}" because Description is being manually updated. This will prevent CodeGen from overwriting this description.`);
|
|
30
|
+
// Set AutoUpdateDescription to true first
|
|
31
|
+
this.AutoUpdateDescription = true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// Call parent Set method
|
|
35
|
+
super.Set(FieldName, Value);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Validates the entity field before saving. Extends the base validation to prevent modifications
|
|
39
|
+
* to database-reflected properties.
|
|
40
|
+
*/
|
|
41
|
+
Validate() {
|
|
42
|
+
// First run the base validation
|
|
43
|
+
const result = super.Validate();
|
|
44
|
+
// If we're updating an existing record, check for restricted field modifications
|
|
45
|
+
if (!this.NewRecord) {
|
|
46
|
+
// Check each database-reflected property
|
|
47
|
+
for (const prop of EntityFieldEntityExtended_1.DATABASE_REFLECTED_PROPERTIES) {
|
|
48
|
+
const field = this.GetFieldByName(prop);
|
|
49
|
+
if (field && field.Dirty) {
|
|
50
|
+
result.Success = false;
|
|
51
|
+
result.Errors.push(new core_1.ValidationErrorInfo(prop, `Cannot modify ${prop} - this property is reflected from the database schema and can only be updated by CodeGen`, field.Value, core_1.ValidationErrorType.Failure));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
exports.EntityFieldEntityExtended = EntityFieldEntityExtended;
|
|
59
|
+
/**
|
|
60
|
+
* Properties that are reflected from the database schema and should not be modified directly
|
|
61
|
+
*/
|
|
62
|
+
EntityFieldEntityExtended.DATABASE_REFLECTED_PROPERTIES = [
|
|
63
|
+
'Name', // Column name in database
|
|
64
|
+
'Type', // SQL data type
|
|
65
|
+
'Length', // Column length
|
|
66
|
+
'Precision', // Numeric precision
|
|
67
|
+
'Scale', // Numeric scale
|
|
68
|
+
'IsPrimaryKey', // Primary key status
|
|
69
|
+
'IsUnique', // Unique constraint status
|
|
70
|
+
'AllowsNull', // Nullable status
|
|
71
|
+
'IsVirtual', // Whether field exists in database
|
|
72
|
+
'DefaultValue', // Default value from database
|
|
73
|
+
'AutoIncrement', // Auto-increment status
|
|
74
|
+
'RelatedEntityID', // Foreign key relationships
|
|
75
|
+
'RelatedEntityFieldName' // Foreign key field reference
|
|
76
|
+
];
|
|
77
|
+
exports.EntityFieldEntityExtended = EntityFieldEntityExtended = EntityFieldEntityExtended_1 = __decorate([
|
|
78
|
+
(0, global_1.RegisterClass)(core_1.BaseEntity, 'Entity Fields')
|
|
79
|
+
], EntityFieldEntityExtended);
|
|
80
|
+
//# sourceMappingURL=EntityFieldEntityExtended.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityFieldEntityExtended.js","sourceRoot":"","sources":["../../src/custom/EntityFieldEntityExtended.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,mDAAuD;AACvD,+CAA8G;AAC9G,sEAAmE;AAEnE;;;GAGG;AAEI,IAAM,yBAAyB,iCAA/B,MAAM,yBAA0B,SAAQ,qCAAiB;IAoB5D;;OAEG;IACa,GAAG,CAAC,SAAiB,EAAE,KAAU;QAC7C,mCAAmC;QACnC,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,aAAa,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YAC/D,MAAM,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC;YACrE,MAAM,qBAAqB,GAAG,IAAI,CAAC,cAAc,CAAC,uBAAuB,CAAC,EAAE,KAAK,CAAC;YAElF,2EAA2E;YAC3E,IAAI,KAAK,KAAK,kBAAkB,IAAI,qBAAqB,KAAK,IAAI,EAAE,CAAC;gBACjE,OAAO,CAAC,IAAI,CAAC,2DAA2D,IAAI,CAAC,IAAI,+GAA+G,CAAC,CAAC;gBAClM,0CAA0C;gBAC1C,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;YACtC,CAAC;QACL,CAAC;QAED,yBAAyB;QACzB,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;IAED;;;OAGG;IACa,QAAQ;QACpB,gCAAgC;QAChC,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QAEhC,iFAAiF;QACjF,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YAClB,yCAAyC;YACzC,KAAK,MAAM,IAAI,IAAI,2BAAyB,CAAC,6BAA6B,EAAE,CAAC;gBACzE,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;gBACxC,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;oBACvB,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;oBACvB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,0BAAmB,CACtC,IAAI,EACJ,iBAAiB,IAAI,2FAA2F,EAChH,KAAK,CAAC,KAAK,EACX,0BAAmB,CAAC,OAAO,CAC9B,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;;AAnEQ,8DAAyB;AAClC;;GAEG;AACqB,uDAA6B,GAAG;IACpD,MAAM,EAAe,0BAA0B;IAC/C,MAAM,EAAe,gBAAgB;IACrC,QAAQ,EAAa,gBAAgB;IACrC,WAAW,EAAU,oBAAoB;IACzC,OAAO,EAAc,gBAAgB;IACrC,cAAc,EAAO,qBAAqB;IAC1C,UAAU,EAAW,2BAA2B;IAChD,YAAY,EAAS,kBAAkB;IACvC,WAAW,EAAU,mCAAmC;IACxD,cAAc,EAAO,8BAA8B;IACnD,eAAe,EAAM,wBAAwB;IAC7C,iBAAiB,EAAI,4BAA4B;IACjD,wBAAwB,CAAC,8BAA8B;CAC1D,AAdoD,CAcnD;oCAlBO,yBAAyB;IADrC,IAAA,sBAAa,EAAC,iBAAU,EAAE,eAAe,CAAC;GAC9B,yBAAyB,CAoErC"}
|
|
@@ -644,9 +644,10 @@ export declare const AIAgentSchema: z.ZodObject<{
|
|
|
644
644
|
ContextCompressionMessageThreshold: z.ZodNullable<z.ZodNumber>;
|
|
645
645
|
ContextCompressionPromptID: z.ZodNullable<z.ZodString>;
|
|
646
646
|
ContextCompressionMessageRetentionCount: z.ZodNullable<z.ZodNumber>;
|
|
647
|
-
TypeID: z.ZodString
|
|
647
|
+
TypeID: z.ZodNullable<z.ZodString>;
|
|
648
648
|
Parent: z.ZodNullable<z.ZodString>;
|
|
649
649
|
ContextCompressionPrompt: z.ZodNullable<z.ZodString>;
|
|
650
|
+
Type: z.ZodNullable<z.ZodString>;
|
|
650
651
|
}, "strip", z.ZodTypeAny, {
|
|
651
652
|
ID?: string;
|
|
652
653
|
__mj_CreatedAt?: Date;
|
|
@@ -655,6 +656,7 @@ export declare const AIAgentSchema: z.ZodObject<{
|
|
|
655
656
|
Description?: string;
|
|
656
657
|
ParentID?: string;
|
|
657
658
|
Parent?: string;
|
|
659
|
+
Type?: string;
|
|
658
660
|
LogoURL?: string;
|
|
659
661
|
ExposeAsAction?: boolean;
|
|
660
662
|
ExecutionOrder?: number;
|
|
@@ -673,6 +675,7 @@ export declare const AIAgentSchema: z.ZodObject<{
|
|
|
673
675
|
Description?: string;
|
|
674
676
|
ParentID?: string;
|
|
675
677
|
Parent?: string;
|
|
678
|
+
Type?: string;
|
|
676
679
|
LogoURL?: string;
|
|
677
680
|
ExposeAsAction?: boolean;
|
|
678
681
|
ExecutionOrder?: number;
|
|
@@ -2317,7 +2320,7 @@ export declare const DashboardSchema: z.ZodObject<{
|
|
|
2317
2320
|
UIConfigDetails: z.ZodString;
|
|
2318
2321
|
__mj_CreatedAt: z.ZodDate;
|
|
2319
2322
|
__mj_UpdatedAt: z.ZodDate;
|
|
2320
|
-
Type: z.ZodUnion<[z.ZodLiteral<"Config">, z.ZodLiteral<"Code">]>;
|
|
2323
|
+
Type: z.ZodUnion<[z.ZodLiteral<"Config">, z.ZodLiteral<"Code">, z.ZodLiteral<"Dynamic Code">]>;
|
|
2321
2324
|
Thumbnail: z.ZodNullable<z.ZodString>;
|
|
2322
2325
|
Scope: z.ZodUnion<[z.ZodLiteral<"Global">, z.ZodLiteral<"App">]>;
|
|
2323
2326
|
ApplicationID: z.ZodNullable<z.ZodString>;
|
|
@@ -2336,7 +2339,7 @@ export declare const DashboardSchema: z.ZodObject<{
|
|
|
2336
2339
|
UserID?: string;
|
|
2337
2340
|
User?: string;
|
|
2338
2341
|
Code?: string;
|
|
2339
|
-
Type?: "Code" | "Config";
|
|
2342
|
+
Type?: "Code" | "Config" | "Dynamic Code";
|
|
2340
2343
|
CategoryID?: string;
|
|
2341
2344
|
DriverClass?: string;
|
|
2342
2345
|
ApplicationID?: string;
|
|
@@ -2354,7 +2357,7 @@ export declare const DashboardSchema: z.ZodObject<{
|
|
|
2354
2357
|
UserID?: string;
|
|
2355
2358
|
User?: string;
|
|
2356
2359
|
Code?: string;
|
|
2357
|
-
Type?: "Code" | "Config";
|
|
2360
|
+
Type?: "Code" | "Config" | "Dynamic Code";
|
|
2358
2361
|
CategoryID?: string;
|
|
2359
2362
|
DriverClass?: string;
|
|
2360
2363
|
ApplicationID?: string;
|
|
@@ -4619,6 +4622,9 @@ export declare const AIAgentRunSchema: z.ZodObject<{
|
|
|
4619
4622
|
TotalCost: z.ZodNullable<z.ZodNumber>;
|
|
4620
4623
|
__mj_CreatedAt: z.ZodDate;
|
|
4621
4624
|
__mj_UpdatedAt: z.ZodDate;
|
|
4625
|
+
Agent: z.ZodNullable<z.ZodString>;
|
|
4626
|
+
Conversation: z.ZodNullable<z.ZodString>;
|
|
4627
|
+
User: z.ZodNullable<z.ZodString>;
|
|
4622
4628
|
}, "strip", z.ZodTypeAny, {
|
|
4623
4629
|
Success?: boolean;
|
|
4624
4630
|
ID?: string;
|
|
@@ -4627,9 +4633,12 @@ export declare const AIAgentRunSchema: z.ZodObject<{
|
|
|
4627
4633
|
Status?: "Failed" | "Running" | "Completed" | "Cancelled" | "Paused";
|
|
4628
4634
|
StartedAt?: Date;
|
|
4629
4635
|
UserID?: string;
|
|
4636
|
+
User?: string;
|
|
4630
4637
|
AgentID?: string;
|
|
4638
|
+
Agent?: string;
|
|
4631
4639
|
ErrorMessage?: string;
|
|
4632
4640
|
ConversationID?: string;
|
|
4641
|
+
Conversation?: string;
|
|
4633
4642
|
CompletedAt?: Date;
|
|
4634
4643
|
ParentRunID?: string;
|
|
4635
4644
|
Result?: string;
|
|
@@ -4644,9 +4653,12 @@ export declare const AIAgentRunSchema: z.ZodObject<{
|
|
|
4644
4653
|
Status?: "Failed" | "Running" | "Completed" | "Cancelled" | "Paused";
|
|
4645
4654
|
StartedAt?: Date;
|
|
4646
4655
|
UserID?: string;
|
|
4656
|
+
User?: string;
|
|
4647
4657
|
AgentID?: string;
|
|
4658
|
+
Agent?: string;
|
|
4648
4659
|
ErrorMessage?: string;
|
|
4649
4660
|
ConversationID?: string;
|
|
4661
|
+
Conversation?: string;
|
|
4650
4662
|
CompletedAt?: Date;
|
|
4651
4663
|
ParentRunID?: string;
|
|
4652
4664
|
Result?: string;
|
|
@@ -4666,6 +4678,7 @@ export declare const AIAgentTypeSchema: z.ZodObject<{
|
|
|
4666
4678
|
IsActive: z.ZodBoolean;
|
|
4667
4679
|
__mj_CreatedAt: z.ZodDate;
|
|
4668
4680
|
__mj_UpdatedAt: z.ZodDate;
|
|
4681
|
+
SystemPrompt: z.ZodNullable<z.ZodString>;
|
|
4669
4682
|
}, "strip", z.ZodTypeAny, {
|
|
4670
4683
|
ID?: string;
|
|
4671
4684
|
__mj_CreatedAt?: Date;
|
|
@@ -4674,6 +4687,7 @@ export declare const AIAgentTypeSchema: z.ZodObject<{
|
|
|
4674
4687
|
Description?: string;
|
|
4675
4688
|
IsActive?: boolean;
|
|
4676
4689
|
SystemPromptID?: string;
|
|
4690
|
+
SystemPrompt?: string;
|
|
4677
4691
|
}, {
|
|
4678
4692
|
ID?: string;
|
|
4679
4693
|
__mj_CreatedAt?: Date;
|
|
@@ -4682,6 +4696,7 @@ export declare const AIAgentTypeSchema: z.ZodObject<{
|
|
|
4682
4696
|
Description?: string;
|
|
4683
4697
|
IsActive?: boolean;
|
|
4684
4698
|
SystemPromptID?: string;
|
|
4699
|
+
SystemPrompt?: string;
|
|
4685
4700
|
}>;
|
|
4686
4701
|
export type AIAgentTypeEntityType = z.infer<typeof AIAgentTypeSchema>;
|
|
4687
4702
|
/**
|
|
@@ -9475,11 +9490,10 @@ export declare class AIAgentEntity extends BaseEntity<AIAgentEntityType> {
|
|
|
9475
9490
|
* * Display Name: Type ID
|
|
9476
9491
|
* * SQL Data Type: uniqueidentifier
|
|
9477
9492
|
* * Related Entity/Foreign Key: MJ: AI Agent Types (vwAIAgentTypes.ID)
|
|
9478
|
-
* * Default Value: A7B8C9D0-E1F2-3456-7890-123456789ABC
|
|
9479
9493
|
* * Description: Reference to the AIAgentType that defines the category and system-level behavior for this agent. Cannot be null.
|
|
9480
9494
|
*/
|
|
9481
|
-
get TypeID(): string;
|
|
9482
|
-
set TypeID(value: string);
|
|
9495
|
+
get TypeID(): string | null;
|
|
9496
|
+
set TypeID(value: string | null);
|
|
9483
9497
|
/**
|
|
9484
9498
|
* * Field Name: Parent
|
|
9485
9499
|
* * Display Name: Parent
|
|
@@ -9492,6 +9506,12 @@ export declare class AIAgentEntity extends BaseEntity<AIAgentEntityType> {
|
|
|
9492
9506
|
* * SQL Data Type: nvarchar(255)
|
|
9493
9507
|
*/
|
|
9494
9508
|
get ContextCompressionPrompt(): string | null;
|
|
9509
|
+
/**
|
|
9510
|
+
* * Field Name: Type
|
|
9511
|
+
* * Display Name: Type
|
|
9512
|
+
* * SQL Data Type: nvarchar(100)
|
|
9513
|
+
*/
|
|
9514
|
+
get Type(): string | null;
|
|
9495
9515
|
}
|
|
9496
9516
|
/**
|
|
9497
9517
|
* AI Model Actions - strongly typed entity sub-class
|
|
@@ -9989,11 +10009,11 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
|
|
|
9989
10009
|
* Validate() method override for AI Prompts entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
9990
10010
|
* * CacheSimilarityThreshold: This rule ensures that if a cache similarity threshold is provided, it must be a value between 0 and 1, inclusive. If no value is provided, that's also allowed.
|
|
9991
10011
|
* * CacheTTLSeconds: This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
|
|
10012
|
+
* * Table-Level: This rule ensures that if the OutputType is set to 'object', an OutputExample must be provided. If the OutputType is anything other than 'object', providing an OutputExample is not required.
|
|
10013
|
+
* * Table-Level: This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
9992
10014
|
* * Table-Level: This rule ensures that if the cache match type is set to 'Vector', the cache similarity threshold must be specified. If the match type is anything other than 'Vector', the similarity threshold can be left empty.
|
|
9993
10015
|
* * Table-Level: This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
|
|
9994
10016
|
* * Table-Level: This rule ensures that if the Parallelization Mode is set to 'ConfigParam', then the Parallel Config Param field must be filled in. For any other mode, the Parallel Config Param can be left empty.
|
|
9995
|
-
* * Table-Level: This rule ensures that if the OutputType is set to 'object', an OutputExample must be provided. If the OutputType is anything other than 'object', providing an OutputExample is not required.
|
|
9996
|
-
* * Table-Level: This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
9997
10017
|
* @public
|
|
9998
10018
|
* @method
|
|
9999
10019
|
* @override
|
|
@@ -10014,40 +10034,40 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
|
|
|
10014
10034
|
*/
|
|
10015
10035
|
ValidateCacheTTLSecondsGreaterThanZero(result: ValidationResult): void;
|
|
10016
10036
|
/**
|
|
10017
|
-
* This rule ensures that if the
|
|
10037
|
+
* This rule ensures that if the OutputType is set to 'object', an OutputExample must be provided. If the OutputType is anything other than 'object', providing an OutputExample is not required.
|
|
10018
10038
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10019
10039
|
* @public
|
|
10020
10040
|
* @method
|
|
10021
10041
|
*/
|
|
10022
|
-
|
|
10042
|
+
ValidateOutputExampleWhenOutputTypeObject(result: ValidationResult): void;
|
|
10023
10043
|
/**
|
|
10024
|
-
* This rule ensures that
|
|
10044
|
+
* This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
10025
10045
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10026
10046
|
* @public
|
|
10027
10047
|
* @method
|
|
10028
10048
|
*/
|
|
10029
|
-
|
|
10049
|
+
ValidateResultSelectorPromptIDNotEqualID(result: ValidationResult): void;
|
|
10030
10050
|
/**
|
|
10031
|
-
* This rule ensures that if the
|
|
10051
|
+
* This rule ensures that if the cache match type is set to 'Vector', the cache similarity threshold must be specified. If the match type is anything other than 'Vector', the similarity threshold can be left empty.
|
|
10032
10052
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10033
10053
|
* @public
|
|
10034
10054
|
* @method
|
|
10035
10055
|
*/
|
|
10036
|
-
|
|
10056
|
+
ValidateCacheSimilarityThresholdRequiredForVectorCache(result: ValidationResult): void;
|
|
10037
10057
|
/**
|
|
10038
|
-
* This rule ensures that if the
|
|
10058
|
+
* This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
|
|
10039
10059
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10040
10060
|
* @public
|
|
10041
10061
|
* @method
|
|
10042
10062
|
*/
|
|
10043
|
-
|
|
10063
|
+
ValidateParallelCountWhenParallelizationModeIsStaticCount(result: ValidationResult): void;
|
|
10044
10064
|
/**
|
|
10045
|
-
* This rule ensures that the
|
|
10065
|
+
* This rule ensures that if the Parallelization Mode is set to 'ConfigParam', then the Parallel Config Param field must be filled in. For any other mode, the Parallel Config Param can be left empty.
|
|
10046
10066
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10047
10067
|
* @public
|
|
10048
10068
|
* @method
|
|
10049
10069
|
*/
|
|
10050
|
-
|
|
10070
|
+
ValidateParallelConfigParamRequiredForConfigParamMode(result: ValidationResult): void;
|
|
10051
10071
|
/**
|
|
10052
10072
|
* * Field Name: ID
|
|
10053
10073
|
* * Display Name: ID
|
|
@@ -14052,10 +14072,11 @@ export declare class DashboardEntity extends BaseEntity<DashboardEntityType> {
|
|
|
14052
14072
|
* * Possible Values
|
|
14053
14073
|
* * Config
|
|
14054
14074
|
* * Code
|
|
14055
|
-
*
|
|
14075
|
+
* * Dynamic Code
|
|
14076
|
+
* * Description: Dashboard type supporting Config (metadata-driven), Code (compiled TypeScript), and Dynamic Code (Skip-generated runtime JavaScript/React) options
|
|
14056
14077
|
*/
|
|
14057
|
-
get Type(): 'Config' | 'Code';
|
|
14058
|
-
set Type(value: 'Config' | 'Code');
|
|
14078
|
+
get Type(): 'Config' | 'Code' | 'Dynamic Code';
|
|
14079
|
+
set Type(value: 'Config' | 'Code' | 'Dynamic Code');
|
|
14059
14080
|
/**
|
|
14060
14081
|
* * Field Name: Thumbnail
|
|
14061
14082
|
* * Display Name: Thumbnail
|
|
@@ -20382,6 +20403,24 @@ export declare class AIAgentRunEntity extends BaseEntity<AIAgentRunEntityType> {
|
|
|
20382
20403
|
* * Default Value: getutcdate()
|
|
20383
20404
|
*/
|
|
20384
20405
|
get __mj_UpdatedAt(): Date;
|
|
20406
|
+
/**
|
|
20407
|
+
* * Field Name: Agent
|
|
20408
|
+
* * Display Name: Agent
|
|
20409
|
+
* * SQL Data Type: nvarchar(255)
|
|
20410
|
+
*/
|
|
20411
|
+
get Agent(): string | null;
|
|
20412
|
+
/**
|
|
20413
|
+
* * Field Name: Conversation
|
|
20414
|
+
* * Display Name: Conversation
|
|
20415
|
+
* * SQL Data Type: nvarchar(255)
|
|
20416
|
+
*/
|
|
20417
|
+
get Conversation(): string | null;
|
|
20418
|
+
/**
|
|
20419
|
+
* * Field Name: User
|
|
20420
|
+
* * Display Name: User
|
|
20421
|
+
* * SQL Data Type: nvarchar(100)
|
|
20422
|
+
*/
|
|
20423
|
+
get User(): string | null;
|
|
20385
20424
|
}
|
|
20386
20425
|
/**
|
|
20387
20426
|
* MJ: AI Agent Types - strongly typed entity sub-class
|
|
@@ -20462,6 +20501,12 @@ export declare class AIAgentTypeEntity extends BaseEntity<AIAgentTypeEntityType>
|
|
|
20462
20501
|
* * Default Value: getutcdate()
|
|
20463
20502
|
*/
|
|
20464
20503
|
get __mj_UpdatedAt(): Date;
|
|
20504
|
+
/**
|
|
20505
|
+
* * Field Name: SystemPrompt
|
|
20506
|
+
* * Display Name: System Prompt
|
|
20507
|
+
* * SQL Data Type: nvarchar(255)
|
|
20508
|
+
*/
|
|
20509
|
+
get SystemPrompt(): string | null;
|
|
20465
20510
|
}
|
|
20466
20511
|
/**
|
|
20467
20512
|
* MJ: AI Configuration Params - strongly typed entity sub-class
|
|
@@ -20912,9 +20957,9 @@ export declare class AIPromptModelEntity extends BaseEntity<AIPromptModelEntityT
|
|
|
20912
20957
|
Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
|
|
20913
20958
|
/**
|
|
20914
20959
|
* Validate() method override for MJ: AI Prompt Models entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
20960
|
+
* * ParallelCount: This rule ensures that the number of parallel tasks (ParallelCount) must be at least 1. It cannot be zero or negative.
|
|
20915
20961
|
* * Priority: This rule ensures that the Priority value must be greater than or equal to zero. Negative priorities are not allowed.
|
|
20916
20962
|
* * ExecutionGroup: This rule ensures that the ExecutionGroup value must be zero or a positive number. Negative numbers are not allowed.
|
|
20917
|
-
* * ParallelCount: This rule ensures that the number of parallel tasks (ParallelCount) must be at least 1. It cannot be zero or negative.
|
|
20918
20963
|
* * Table-Level: This rule ensures that if the parallelization mode is 'None' or 'StaticCount', then the parallel config parameter must be empty. If the parallelization mode is 'ConfigParam', then the parallel config parameter must be provided.
|
|
20919
20964
|
* @public
|
|
20920
20965
|
* @method
|
|
@@ -20922,26 +20967,26 @@ export declare class AIPromptModelEntity extends BaseEntity<AIPromptModelEntityT
|
|
|
20922
20967
|
*/
|
|
20923
20968
|
Validate(): ValidationResult;
|
|
20924
20969
|
/**
|
|
20925
|
-
* This rule ensures that the
|
|
20970
|
+
* This rule ensures that the number of parallel tasks (ParallelCount) must be at least 1. It cannot be zero or negative.
|
|
20926
20971
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
20927
20972
|
* @public
|
|
20928
20973
|
* @method
|
|
20929
20974
|
*/
|
|
20930
|
-
|
|
20975
|
+
ValidateParallelCountAtLeastOne(result: ValidationResult): void;
|
|
20931
20976
|
/**
|
|
20932
|
-
* This rule ensures that the
|
|
20977
|
+
* This rule ensures that the Priority value must be greater than or equal to zero. Negative priorities are not allowed.
|
|
20933
20978
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
20934
20979
|
* @public
|
|
20935
20980
|
* @method
|
|
20936
20981
|
*/
|
|
20937
|
-
|
|
20982
|
+
ValidatePriorityIsNonNegative(result: ValidationResult): void;
|
|
20938
20983
|
/**
|
|
20939
|
-
* This rule ensures that the
|
|
20984
|
+
* This rule ensures that the ExecutionGroup value must be zero or a positive number. Negative numbers are not allowed.
|
|
20940
20985
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
20941
20986
|
* @public
|
|
20942
20987
|
* @method
|
|
20943
20988
|
*/
|
|
20944
|
-
|
|
20989
|
+
ValidateExecutionGroupIsNonNegative(result: ValidationResult): void;
|
|
20945
20990
|
/**
|
|
20946
20991
|
* This rule ensures that if the parallelization mode is 'None' or 'StaticCount', then the parallel config parameter must be empty. If the parallelization mode is 'ConfigParam', then the parallel config parameter must be provided.
|
|
20947
20992
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
@@ -21128,27 +21173,27 @@ export declare class AIPromptRunEntity extends BaseEntity<AIPromptRunEntityType>
|
|
|
21128
21173
|
Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
|
|
21129
21174
|
/**
|
|
21130
21175
|
* Validate() method override for MJ: AI Prompt Runs entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
21131
|
-
* * Table-Level: This rule ensures that if the 'CompletedAt' field has a value, it must be on or after the 'RunAt' field. Otherwise, if 'CompletedAt' is empty, there is no restriction.
|
|
21132
21176
|
* * Table-Level: This rule ensures that either both TokensPrompt and TokensCompletion are missing, or TokensUsed is missing, or, if all values are present, the value of TokensUsed equals the sum of TokensPrompt and TokensCompletion.
|
|
21177
|
+
* * Table-Level: This rule ensures that if the 'CompletedAt' field has a value, it must be on or after the 'RunAt' field. Otherwise, if 'CompletedAt' is empty, there is no restriction.
|
|
21133
21178
|
* @public
|
|
21134
21179
|
* @method
|
|
21135
21180
|
* @override
|
|
21136
21181
|
*/
|
|
21137
21182
|
Validate(): ValidationResult;
|
|
21138
21183
|
/**
|
|
21139
|
-
* This rule ensures that
|
|
21184
|
+
* This rule ensures that either both TokensPrompt and TokensCompletion are missing, or TokensUsed is missing, or, if all values are present, the value of TokensUsed equals the sum of TokensPrompt and TokensCompletion.
|
|
21140
21185
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
21141
21186
|
* @public
|
|
21142
21187
|
* @method
|
|
21143
21188
|
*/
|
|
21144
|
-
|
|
21189
|
+
ValidateTokensUsedSumMatchesPromptAndCompletion(result: ValidationResult): void;
|
|
21145
21190
|
/**
|
|
21146
|
-
* This rule ensures that
|
|
21191
|
+
* This rule ensures that if the 'CompletedAt' field has a value, it must be on or after the 'RunAt' field. Otherwise, if 'CompletedAt' is empty, there is no restriction.
|
|
21147
21192
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
21148
21193
|
* @public
|
|
21149
21194
|
* @method
|
|
21150
21195
|
*/
|
|
21151
|
-
|
|
21196
|
+
ValidateCompletedAtIsNullOrAfterRunAt(result: ValidationResult): void;
|
|
21152
21197
|
/**
|
|
21153
21198
|
* * Field Name: ID
|
|
21154
21199
|
* * Display Name: ID
|
|
@@ -21204,17 +21249,17 @@ export declare class AIPromptRunEntity extends BaseEntity<AIPromptRunEntityType>
|
|
|
21204
21249
|
/**
|
|
21205
21250
|
* * Field Name: RunAt
|
|
21206
21251
|
* * Display Name: Run At
|
|
21207
|
-
* * SQL Data Type:
|
|
21208
|
-
* * Default Value:
|
|
21209
|
-
* * Description: When the prompt
|
|
21252
|
+
* * SQL Data Type: datetimeoffset
|
|
21253
|
+
* * Default Value: sysdatetimeoffset()
|
|
21254
|
+
* * Description: When the prompt run started, with timezone offset information.
|
|
21210
21255
|
*/
|
|
21211
21256
|
get RunAt(): Date;
|
|
21212
21257
|
set RunAt(value: Date);
|
|
21213
21258
|
/**
|
|
21214
21259
|
* * Field Name: CompletedAt
|
|
21215
21260
|
* * Display Name: Completed At
|
|
21216
|
-
* * SQL Data Type:
|
|
21217
|
-
* * Description: When the prompt
|
|
21261
|
+
* * SQL Data Type: datetimeoffset
|
|
21262
|
+
* * Description: When the prompt run completed, with timezone offset information.
|
|
21218
21263
|
*/
|
|
21219
21264
|
get CompletedAt(): Date | null;
|
|
21220
21265
|
set CompletedAt(value: Date | null);
|