@memberjunction/core-entities 2.45.0 → 2.47.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 +63 -18
- package/dist/generated/entity_subclasses.d.ts.map +1 -1
- package/dist/generated/entity_subclasses.js +95 -35
- 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 +4 -4
|
@@ -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"}
|
|
@@ -647,6 +647,7 @@ export declare const AIAgentSchema: z.ZodObject<{
|
|
|
647
647
|
TypeID: z.ZodString;
|
|
648
648
|
Parent: z.ZodNullable<z.ZodString>;
|
|
649
649
|
ContextCompressionPrompt: z.ZodNullable<z.ZodString>;
|
|
650
|
+
Type: 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;
|
|
@@ -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
|
/**
|
|
@@ -9492,6 +9507,12 @@ export declare class AIAgentEntity extends BaseEntity<AIAgentEntityType> {
|
|
|
9492
9507
|
* * SQL Data Type: nvarchar(255)
|
|
9493
9508
|
*/
|
|
9494
9509
|
get ContextCompressionPrompt(): string | null;
|
|
9510
|
+
/**
|
|
9511
|
+
* * Field Name: Type
|
|
9512
|
+
* * Display Name: Type
|
|
9513
|
+
* * SQL Data Type: nvarchar(100)
|
|
9514
|
+
*/
|
|
9515
|
+
get Type(): string;
|
|
9495
9516
|
}
|
|
9496
9517
|
/**
|
|
9497
9518
|
* AI Model Actions - strongly typed entity sub-class
|
|
@@ -9989,11 +10010,11 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
|
|
|
9989
10010
|
* 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
10011
|
* * 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
10012
|
* * CacheTTLSeconds: This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
|
|
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
10017
|
* * 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
10018
|
* @public
|
|
9998
10019
|
* @method
|
|
9999
10020
|
* @override
|
|
@@ -10014,6 +10035,13 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
|
|
|
10014
10035
|
*/
|
|
10015
10036
|
ValidateCacheTTLSecondsGreaterThanZero(result: ValidationResult): void;
|
|
10016
10037
|
/**
|
|
10038
|
+
* This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
10039
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10040
|
+
* @public
|
|
10041
|
+
* @method
|
|
10042
|
+
*/
|
|
10043
|
+
ValidateResultSelectorPromptIDNotEqualID(result: ValidationResult): void;
|
|
10044
|
+
/**
|
|
10017
10045
|
* 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.
|
|
10018
10046
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10019
10047
|
* @public
|
|
@@ -10042,13 +10070,6 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
|
|
|
10042
10070
|
*/
|
|
10043
10071
|
ValidateOutputExampleWhenOutputTypeObject(result: ValidationResult): void;
|
|
10044
10072
|
/**
|
|
10045
|
-
* This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
10046
|
-
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10047
|
-
* @public
|
|
10048
|
-
* @method
|
|
10049
|
-
*/
|
|
10050
|
-
ValidateResultSelectorPromptIDNotEqualID(result: ValidationResult): void;
|
|
10051
|
-
/**
|
|
10052
10073
|
* * Field Name: ID
|
|
10053
10074
|
* * Display Name: ID
|
|
10054
10075
|
* * SQL Data Type: uniqueidentifier
|
|
@@ -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
|
|
@@ -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);
|