@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
|
@@ -1034,12 +1034,11 @@ exports.AIAgentSchema = zod_1.z.object({
|
|
|
1034
1034
|
* * Display Name: Context Compression Message Retention Count
|
|
1035
1035
|
* * SQL Data Type: int
|
|
1036
1036
|
* * Description: Number of recent messages to keep uncompressed when context compression is applied.`),
|
|
1037
|
-
TypeID: zod_1.z.string().describe(`
|
|
1037
|
+
TypeID: zod_1.z.string().nullable().describe(`
|
|
1038
1038
|
* * Field Name: TypeID
|
|
1039
1039
|
* * Display Name: Type ID
|
|
1040
1040
|
* * SQL Data Type: uniqueidentifier
|
|
1041
1041
|
* * Related Entity/Foreign Key: MJ: AI Agent Types (vwAIAgentTypes.ID)
|
|
1042
|
-
* * Default Value: A7B8C9D0-E1F2-3456-7890-123456789ABC
|
|
1043
1042
|
* * Description: Reference to the AIAgentType that defines the category and system-level behavior for this agent. Cannot be null.`),
|
|
1044
1043
|
Parent: zod_1.z.string().nullable().describe(`
|
|
1045
1044
|
* * Field Name: Parent
|
|
@@ -1049,6 +1048,10 @@ exports.AIAgentSchema = zod_1.z.object({
|
|
|
1049
1048
|
* * Field Name: ContextCompressionPrompt
|
|
1050
1049
|
* * Display Name: Context Compression Prompt
|
|
1051
1050
|
* * SQL Data Type: nvarchar(255)`),
|
|
1051
|
+
Type: zod_1.z.string().nullable().describe(`
|
|
1052
|
+
* * Field Name: Type
|
|
1053
|
+
* * Display Name: Type
|
|
1054
|
+
* * SQL Data Type: nvarchar(100)`),
|
|
1052
1055
|
});
|
|
1053
1056
|
/**
|
|
1054
1057
|
* zod schema definition for the entity AI Model Actions
|
|
@@ -3445,7 +3448,7 @@ exports.DashboardSchema = zod_1.z.object({
|
|
|
3445
3448
|
* * Display Name: Updated At
|
|
3446
3449
|
* * SQL Data Type: datetimeoffset
|
|
3447
3450
|
* * Default Value: getutcdate()`),
|
|
3448
|
-
Type: zod_1.z.union([zod_1.z.literal('Config'), zod_1.z.literal('Code')]).describe(`
|
|
3451
|
+
Type: zod_1.z.union([zod_1.z.literal('Config'), zod_1.z.literal('Code'), zod_1.z.literal('Dynamic Code')]).describe(`
|
|
3449
3452
|
* * Field Name: Type
|
|
3450
3453
|
* * Display Name: Type
|
|
3451
3454
|
* * SQL Data Type: nvarchar(20)
|
|
@@ -3454,7 +3457,8 @@ exports.DashboardSchema = zod_1.z.object({
|
|
|
3454
3457
|
* * Possible Values
|
|
3455
3458
|
* * Config
|
|
3456
3459
|
* * Code
|
|
3457
|
-
*
|
|
3460
|
+
* * Dynamic Code
|
|
3461
|
+
* * Description: Dashboard type supporting Config (metadata-driven), Code (compiled TypeScript), and Dynamic Code (Skip-generated runtime JavaScript/React) options`),
|
|
3458
3462
|
Thumbnail: zod_1.z.string().nullable().describe(`
|
|
3459
3463
|
* * Field Name: Thumbnail
|
|
3460
3464
|
* * Display Name: Thumbnail
|
|
@@ -6983,6 +6987,18 @@ exports.AIAgentRunSchema = zod_1.z.object({
|
|
|
6983
6987
|
* * Display Name: Updated At
|
|
6984
6988
|
* * SQL Data Type: datetimeoffset
|
|
6985
6989
|
* * Default Value: getutcdate()`),
|
|
6990
|
+
Agent: zod_1.z.string().nullable().describe(`
|
|
6991
|
+
* * Field Name: Agent
|
|
6992
|
+
* * Display Name: Agent
|
|
6993
|
+
* * SQL Data Type: nvarchar(255)`),
|
|
6994
|
+
Conversation: zod_1.z.string().nullable().describe(`
|
|
6995
|
+
* * Field Name: Conversation
|
|
6996
|
+
* * Display Name: Conversation
|
|
6997
|
+
* * SQL Data Type: nvarchar(255)`),
|
|
6998
|
+
User: zod_1.z.string().nullable().describe(`
|
|
6999
|
+
* * Field Name: User
|
|
7000
|
+
* * Display Name: User
|
|
7001
|
+
* * SQL Data Type: nvarchar(100)`),
|
|
6986
7002
|
});
|
|
6987
7003
|
/**
|
|
6988
7004
|
* zod schema definition for the entity MJ: AI Agent Types
|
|
@@ -7026,6 +7042,10 @@ exports.AIAgentTypeSchema = zod_1.z.object({
|
|
|
7026
7042
|
* * Display Name: Updated At
|
|
7027
7043
|
* * SQL Data Type: datetimeoffset
|
|
7028
7044
|
* * Default Value: getutcdate()`),
|
|
7045
|
+
SystemPrompt: zod_1.z.string().nullable().describe(`
|
|
7046
|
+
* * Field Name: SystemPrompt
|
|
7047
|
+
* * Display Name: System Prompt
|
|
7048
|
+
* * SQL Data Type: nvarchar(255)`),
|
|
7029
7049
|
});
|
|
7030
7050
|
/**
|
|
7031
7051
|
* zod schema definition for the entity MJ: AI Configuration Params
|
|
@@ -7414,14 +7434,14 @@ exports.AIPromptRunSchema = zod_1.z.object({
|
|
|
7414
7434
|
RunAt: zod_1.z.date().describe(`
|
|
7415
7435
|
* * Field Name: RunAt
|
|
7416
7436
|
* * Display Name: Run At
|
|
7417
|
-
* * SQL Data Type:
|
|
7418
|
-
* * Default Value:
|
|
7419
|
-
* * Description: When the prompt
|
|
7437
|
+
* * SQL Data Type: datetimeoffset
|
|
7438
|
+
* * Default Value: sysdatetimeoffset()
|
|
7439
|
+
* * Description: When the prompt run started, with timezone offset information.`),
|
|
7420
7440
|
CompletedAt: zod_1.z.date().nullable().describe(`
|
|
7421
7441
|
* * Field Name: CompletedAt
|
|
7422
7442
|
* * Display Name: Completed At
|
|
7423
|
-
* * SQL Data Type:
|
|
7424
|
-
* * Description: When the prompt
|
|
7443
|
+
* * SQL Data Type: datetimeoffset
|
|
7444
|
+
* * Description: When the prompt run completed, with timezone offset information.`),
|
|
7425
7445
|
ExecutionTimeMS: zod_1.z.number().nullable().describe(`
|
|
7426
7446
|
* * Field Name: ExecutionTimeMS
|
|
7427
7447
|
* * Display Name: Execution Time MS
|
|
@@ -13825,7 +13845,6 @@ let AIAgentEntity = class AIAgentEntity extends core_1.BaseEntity {
|
|
|
13825
13845
|
* * Display Name: Type ID
|
|
13826
13846
|
* * SQL Data Type: uniqueidentifier
|
|
13827
13847
|
* * Related Entity/Foreign Key: MJ: AI Agent Types (vwAIAgentTypes.ID)
|
|
13828
|
-
* * Default Value: A7B8C9D0-E1F2-3456-7890-123456789ABC
|
|
13829
13848
|
* * Description: Reference to the AIAgentType that defines the category and system-level behavior for this agent. Cannot be null.
|
|
13830
13849
|
*/
|
|
13831
13850
|
get TypeID() {
|
|
@@ -13850,6 +13869,14 @@ let AIAgentEntity = class AIAgentEntity extends core_1.BaseEntity {
|
|
|
13850
13869
|
get ContextCompressionPrompt() {
|
|
13851
13870
|
return this.Get('ContextCompressionPrompt');
|
|
13852
13871
|
}
|
|
13872
|
+
/**
|
|
13873
|
+
* * Field Name: Type
|
|
13874
|
+
* * Display Name: Type
|
|
13875
|
+
* * SQL Data Type: nvarchar(100)
|
|
13876
|
+
*/
|
|
13877
|
+
get Type() {
|
|
13878
|
+
return this.Get('Type');
|
|
13879
|
+
}
|
|
13853
13880
|
};
|
|
13854
13881
|
exports.AIAgentEntity = AIAgentEntity;
|
|
13855
13882
|
exports.AIAgentEntity = AIAgentEntity = __decorate([
|
|
@@ -14537,11 +14564,11 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
14537
14564
|
* 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:
|
|
14538
14565
|
* * 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.
|
|
14539
14566
|
* * CacheTTLSeconds: This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
|
|
14567
|
+
* * 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.
|
|
14568
|
+
* * 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.
|
|
14540
14569
|
* * 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.
|
|
14541
14570
|
* * Table-Level: This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
|
|
14542
14571
|
* * 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.
|
|
14543
|
-
* * 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.
|
|
14544
|
-
* * 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.
|
|
14545
14572
|
* @public
|
|
14546
14573
|
* @method
|
|
14547
14574
|
* @override
|
|
@@ -14550,11 +14577,11 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
14550
14577
|
const result = super.Validate();
|
|
14551
14578
|
this.ValidateCacheSimilarityThresholdIsBetweenZeroAndOne(result);
|
|
14552
14579
|
this.ValidateCacheTTLSecondsGreaterThanZero(result);
|
|
14580
|
+
this.ValidateOutputExampleWhenOutputTypeObject(result);
|
|
14581
|
+
this.ValidateResultSelectorPromptIDNotEqualID(result);
|
|
14553
14582
|
this.ValidateCacheSimilarityThresholdRequiredForVectorCache(result);
|
|
14554
14583
|
this.ValidateParallelCountWhenParallelizationModeIsStaticCount(result);
|
|
14555
14584
|
this.ValidateParallelConfigParamRequiredForConfigParamMode(result);
|
|
14556
|
-
this.ValidateOutputExampleWhenOutputTypeObject(result);
|
|
14557
|
-
this.ValidateResultSelectorPromptIDNotEqualID(result);
|
|
14558
14585
|
return result;
|
|
14559
14586
|
}
|
|
14560
14587
|
/**
|
|
@@ -14580,58 +14607,58 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
14580
14607
|
}
|
|
14581
14608
|
}
|
|
14582
14609
|
/**
|
|
14583
|
-
* This rule ensures that if the
|
|
14610
|
+
* 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.
|
|
14584
14611
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14585
14612
|
* @public
|
|
14586
14613
|
* @method
|
|
14587
14614
|
*/
|
|
14588
|
-
|
|
14589
|
-
if (this.
|
|
14590
|
-
result.Errors.push(new core_1.ValidationErrorInfo("
|
|
14615
|
+
ValidateOutputExampleWhenOutputTypeObject(result) {
|
|
14616
|
+
if (this.OutputType === "object" && (this.OutputExample === null || this.OutputExample === undefined)) {
|
|
14617
|
+
result.Errors.push(new core_1.ValidationErrorInfo("OutputExample", "When OutputType is 'object', OutputExample must be provided.", this.OutputExample, core_1.ValidationErrorType.Failure));
|
|
14591
14618
|
}
|
|
14592
14619
|
}
|
|
14593
14620
|
/**
|
|
14594
|
-
* This rule ensures that
|
|
14621
|
+
* This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
14595
14622
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14596
14623
|
* @public
|
|
14597
14624
|
* @method
|
|
14598
14625
|
*/
|
|
14599
|
-
|
|
14600
|
-
if (this.
|
|
14601
|
-
result.Errors.push(new core_1.ValidationErrorInfo("
|
|
14626
|
+
ValidateResultSelectorPromptIDNotEqualID(result) {
|
|
14627
|
+
if (this.ResultSelectorPromptID === this.ID) {
|
|
14628
|
+
result.Errors.push(new core_1.ValidationErrorInfo("ResultSelectorPromptID", "The ResultSelectorPromptID cannot be the same as the ID. A result selector prompt cannot reference itself.", this.ResultSelectorPromptID, core_1.ValidationErrorType.Failure));
|
|
14602
14629
|
}
|
|
14603
14630
|
}
|
|
14604
14631
|
/**
|
|
14605
|
-
* This rule ensures that if the
|
|
14632
|
+
* 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.
|
|
14606
14633
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14607
14634
|
* @public
|
|
14608
14635
|
* @method
|
|
14609
14636
|
*/
|
|
14610
|
-
|
|
14611
|
-
if (this.
|
|
14612
|
-
result.Errors.push(new core_1.ValidationErrorInfo("
|
|
14637
|
+
ValidateCacheSimilarityThresholdRequiredForVectorCache(result) {
|
|
14638
|
+
if (this.CacheMatchType === "Vector" && this.CacheSimilarityThreshold === null) {
|
|
14639
|
+
result.Errors.push(new core_1.ValidationErrorInfo("CacheSimilarityThreshold", "CacheSimilarityThreshold must be specified when CacheMatchType is 'Vector'.", this.CacheSimilarityThreshold, core_1.ValidationErrorType.Failure));
|
|
14613
14640
|
}
|
|
14614
14641
|
}
|
|
14615
14642
|
/**
|
|
14616
|
-
* This rule ensures that if the
|
|
14643
|
+
* This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
|
|
14617
14644
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14618
14645
|
* @public
|
|
14619
14646
|
* @method
|
|
14620
14647
|
*/
|
|
14621
|
-
|
|
14622
|
-
if (this.
|
|
14623
|
-
result.Errors.push(new core_1.ValidationErrorInfo("
|
|
14648
|
+
ValidateParallelCountWhenParallelizationModeIsStaticCount(result) {
|
|
14649
|
+
if (this.ParallelizationMode === "StaticCount" && this.ParallelCount === null) {
|
|
14650
|
+
result.Errors.push(new core_1.ValidationErrorInfo("ParallelCount", "When ParallelizationMode is 'StaticCount', ParallelCount must be specified.", this.ParallelCount, core_1.ValidationErrorType.Failure));
|
|
14624
14651
|
}
|
|
14625
14652
|
}
|
|
14626
14653
|
/**
|
|
14627
|
-
* This rule ensures that the
|
|
14654
|
+
* 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.
|
|
14628
14655
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14629
14656
|
* @public
|
|
14630
14657
|
* @method
|
|
14631
14658
|
*/
|
|
14632
|
-
|
|
14633
|
-
if (this.
|
|
14634
|
-
result.Errors.push(new core_1.ValidationErrorInfo("
|
|
14659
|
+
ValidateParallelConfigParamRequiredForConfigParamMode(result) {
|
|
14660
|
+
if (this.ParallelizationMode === "ConfigParam" && this.ParallelConfigParam === null) {
|
|
14661
|
+
result.Errors.push(new core_1.ValidationErrorInfo("ParallelConfigParam", "Parallel Config Param must be entered when Parallelization Mode is set to 'ConfigParam'.", this.ParallelConfigParam, core_1.ValidationErrorType.Failure));
|
|
14635
14662
|
}
|
|
14636
14663
|
}
|
|
14637
14664
|
/**
|
|
@@ -20212,7 +20239,8 @@ let DashboardEntity = class DashboardEntity extends core_1.BaseEntity {
|
|
|
20212
20239
|
* * Possible Values
|
|
20213
20240
|
* * Config
|
|
20214
20241
|
* * Code
|
|
20215
|
-
*
|
|
20242
|
+
* * Dynamic Code
|
|
20243
|
+
* * Description: Dashboard type supporting Config (metadata-driven), Code (compiled TypeScript), and Dynamic Code (Skip-generated runtime JavaScript/React) options
|
|
20216
20244
|
*/
|
|
20217
20245
|
get Type() {
|
|
20218
20246
|
return this.Get('Type');
|
|
@@ -29042,6 +29070,30 @@ let AIAgentRunEntity = class AIAgentRunEntity extends core_1.BaseEntity {
|
|
|
29042
29070
|
get __mj_UpdatedAt() {
|
|
29043
29071
|
return this.Get('__mj_UpdatedAt');
|
|
29044
29072
|
}
|
|
29073
|
+
/**
|
|
29074
|
+
* * Field Name: Agent
|
|
29075
|
+
* * Display Name: Agent
|
|
29076
|
+
* * SQL Data Type: nvarchar(255)
|
|
29077
|
+
*/
|
|
29078
|
+
get Agent() {
|
|
29079
|
+
return this.Get('Agent');
|
|
29080
|
+
}
|
|
29081
|
+
/**
|
|
29082
|
+
* * Field Name: Conversation
|
|
29083
|
+
* * Display Name: Conversation
|
|
29084
|
+
* * SQL Data Type: nvarchar(255)
|
|
29085
|
+
*/
|
|
29086
|
+
get Conversation() {
|
|
29087
|
+
return this.Get('Conversation');
|
|
29088
|
+
}
|
|
29089
|
+
/**
|
|
29090
|
+
* * Field Name: User
|
|
29091
|
+
* * Display Name: User
|
|
29092
|
+
* * SQL Data Type: nvarchar(100)
|
|
29093
|
+
*/
|
|
29094
|
+
get User() {
|
|
29095
|
+
return this.Get('User');
|
|
29096
|
+
}
|
|
29045
29097
|
};
|
|
29046
29098
|
exports.AIAgentRunEntity = AIAgentRunEntity;
|
|
29047
29099
|
exports.AIAgentRunEntity = AIAgentRunEntity = __decorate([
|
|
@@ -29152,6 +29204,14 @@ let AIAgentTypeEntity = class AIAgentTypeEntity extends core_1.BaseEntity {
|
|
|
29152
29204
|
get __mj_UpdatedAt() {
|
|
29153
29205
|
return this.Get('__mj_UpdatedAt');
|
|
29154
29206
|
}
|
|
29207
|
+
/**
|
|
29208
|
+
* * Field Name: SystemPrompt
|
|
29209
|
+
* * Display Name: System Prompt
|
|
29210
|
+
* * SQL Data Type: nvarchar(255)
|
|
29211
|
+
*/
|
|
29212
|
+
get SystemPrompt() {
|
|
29213
|
+
return this.Get('SystemPrompt');
|
|
29214
|
+
}
|
|
29155
29215
|
};
|
|
29156
29216
|
exports.AIAgentTypeEntity = AIAgentTypeEntity;
|
|
29157
29217
|
exports.AIAgentTypeEntity = AIAgentTypeEntity = __decorate([
|
|
@@ -29778,9 +29838,9 @@ let AIPromptModelEntity = class AIPromptModelEntity extends core_1.BaseEntity {
|
|
|
29778
29838
|
}
|
|
29779
29839
|
/**
|
|
29780
29840
|
* 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:
|
|
29841
|
+
* * ParallelCount: This rule ensures that the number of parallel tasks (ParallelCount) must be at least 1. It cannot be zero or negative.
|
|
29781
29842
|
* * Priority: This rule ensures that the Priority value must be greater than or equal to zero. Negative priorities are not allowed.
|
|
29782
29843
|
* * ExecutionGroup: This rule ensures that the ExecutionGroup value must be zero or a positive number. Negative numbers are not allowed.
|
|
29783
|
-
* * ParallelCount: This rule ensures that the number of parallel tasks (ParallelCount) must be at least 1. It cannot be zero or negative.
|
|
29784
29844
|
* * 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.
|
|
29785
29845
|
* @public
|
|
29786
29846
|
* @method
|
|
@@ -29788,13 +29848,24 @@ let AIPromptModelEntity = class AIPromptModelEntity extends core_1.BaseEntity {
|
|
|
29788
29848
|
*/
|
|
29789
29849
|
Validate() {
|
|
29790
29850
|
const result = super.Validate();
|
|
29851
|
+
this.ValidateParallelCountAtLeastOne(result);
|
|
29791
29852
|
this.ValidatePriorityIsNonNegative(result);
|
|
29792
29853
|
this.ValidateExecutionGroupIsNonNegative(result);
|
|
29793
|
-
this.ValidateParallelCountAtLeastOne(result);
|
|
29794
29854
|
this.ValidateParallelConfigParamBasedOnParallelizationMode(result);
|
|
29795
29855
|
return result;
|
|
29796
29856
|
}
|
|
29797
29857
|
/**
|
|
29858
|
+
* This rule ensures that the number of parallel tasks (ParallelCount) must be at least 1. It cannot be zero or negative.
|
|
29859
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
29860
|
+
* @public
|
|
29861
|
+
* @method
|
|
29862
|
+
*/
|
|
29863
|
+
ValidateParallelCountAtLeastOne(result) {
|
|
29864
|
+
if (this.ParallelCount < 1) {
|
|
29865
|
+
result.Errors.push(new core_1.ValidationErrorInfo("ParallelCount", "ParallelCount must be at least 1.", this.ParallelCount, core_1.ValidationErrorType.Failure));
|
|
29866
|
+
}
|
|
29867
|
+
}
|
|
29868
|
+
/**
|
|
29798
29869
|
* This rule ensures that the Priority value must be greater than or equal to zero. Negative priorities are not allowed.
|
|
29799
29870
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
29800
29871
|
* @public
|
|
@@ -29817,17 +29888,6 @@ let AIPromptModelEntity = class AIPromptModelEntity extends core_1.BaseEntity {
|
|
|
29817
29888
|
}
|
|
29818
29889
|
}
|
|
29819
29890
|
/**
|
|
29820
|
-
* This rule ensures that the number of parallel tasks (ParallelCount) must be at least 1. It cannot be zero or negative.
|
|
29821
|
-
* @param result - the ValidationResult object to add any errors or warnings to
|
|
29822
|
-
* @public
|
|
29823
|
-
* @method
|
|
29824
|
-
*/
|
|
29825
|
-
ValidateParallelCountAtLeastOne(result) {
|
|
29826
|
-
if (this.ParallelCount < 1) {
|
|
29827
|
-
result.Errors.push(new core_1.ValidationErrorInfo("ParallelCount", "ParallelCount must be at least 1.", this.ParallelCount, core_1.ValidationErrorType.Failure));
|
|
29828
|
-
}
|
|
29829
|
-
}
|
|
29830
|
-
/**
|
|
29831
29891
|
* 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.
|
|
29832
29892
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
29833
29893
|
* @public
|
|
@@ -30088,40 +30148,40 @@ let AIPromptRunEntity = class AIPromptRunEntity extends core_1.BaseEntity {
|
|
|
30088
30148
|
}
|
|
30089
30149
|
/**
|
|
30090
30150
|
* 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:
|
|
30091
|
-
* * 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.
|
|
30092
30151
|
* * 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.
|
|
30152
|
+
* * 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.
|
|
30093
30153
|
* @public
|
|
30094
30154
|
* @method
|
|
30095
30155
|
* @override
|
|
30096
30156
|
*/
|
|
30097
30157
|
Validate() {
|
|
30098
30158
|
const result = super.Validate();
|
|
30099
|
-
this.ValidateCompletedAtIsNullOrAfterRunAt(result);
|
|
30100
30159
|
this.ValidateTokensUsedSumMatchesPromptAndCompletion(result);
|
|
30160
|
+
this.ValidateCompletedAtIsNullOrAfterRunAt(result);
|
|
30101
30161
|
return result;
|
|
30102
30162
|
}
|
|
30103
30163
|
/**
|
|
30104
|
-
* This rule ensures that
|
|
30164
|
+
* 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.
|
|
30105
30165
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
30106
30166
|
* @public
|
|
30107
30167
|
* @method
|
|
30108
30168
|
*/
|
|
30109
|
-
|
|
30110
|
-
if (this.
|
|
30111
|
-
|
|
30169
|
+
ValidateTokensUsedSumMatchesPromptAndCompletion(result) {
|
|
30170
|
+
if (!((this.TokensPrompt === null && this.TokensCompletion === null) ||
|
|
30171
|
+
this.TokensUsed === null ||
|
|
30172
|
+
(this.TokensPrompt !== null && this.TokensCompletion !== null && this.TokensUsed === (this.TokensPrompt + this.TokensCompletion)))) {
|
|
30173
|
+
result.Errors.push(new core_1.ValidationErrorInfo("TokensUsed", "TokensUsed must be equal to the sum of TokensPrompt and TokensCompletion, unless one or more of these values are NULL (except if TokensPrompt and TokensCompletion are both NULL).", this.TokensUsed, core_1.ValidationErrorType.Failure));
|
|
30112
30174
|
}
|
|
30113
30175
|
}
|
|
30114
30176
|
/**
|
|
30115
|
-
* This rule ensures that
|
|
30177
|
+
* 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.
|
|
30116
30178
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
30117
30179
|
* @public
|
|
30118
30180
|
* @method
|
|
30119
30181
|
*/
|
|
30120
|
-
|
|
30121
|
-
if (
|
|
30122
|
-
|
|
30123
|
-
(this.TokensPrompt !== null && this.TokensCompletion !== null && this.TokensUsed === (this.TokensPrompt + this.TokensCompletion)))) {
|
|
30124
|
-
result.Errors.push(new core_1.ValidationErrorInfo("TokensUsed", "TokensUsed must be equal to the sum of TokensPrompt and TokensCompletion, unless one or more of these values are NULL (except if TokensPrompt and TokensCompletion are both NULL).", this.TokensUsed, core_1.ValidationErrorType.Failure));
|
|
30182
|
+
ValidateCompletedAtIsNullOrAfterRunAt(result) {
|
|
30183
|
+
if (this.CompletedAt !== null && this.CompletedAt < this.RunAt) {
|
|
30184
|
+
result.Errors.push(new core_1.ValidationErrorInfo("CompletedAt", "Completed date and time, if present, must not be earlier than the run start date and time.", this.CompletedAt, core_1.ValidationErrorType.Failure));
|
|
30125
30185
|
}
|
|
30126
30186
|
}
|
|
30127
30187
|
/**
|
|
@@ -30201,9 +30261,9 @@ let AIPromptRunEntity = class AIPromptRunEntity extends core_1.BaseEntity {
|
|
|
30201
30261
|
/**
|
|
30202
30262
|
* * Field Name: RunAt
|
|
30203
30263
|
* * Display Name: Run At
|
|
30204
|
-
* * SQL Data Type:
|
|
30205
|
-
* * Default Value:
|
|
30206
|
-
* * Description: When the prompt
|
|
30264
|
+
* * SQL Data Type: datetimeoffset
|
|
30265
|
+
* * Default Value: sysdatetimeoffset()
|
|
30266
|
+
* * Description: When the prompt run started, with timezone offset information.
|
|
30207
30267
|
*/
|
|
30208
30268
|
get RunAt() {
|
|
30209
30269
|
return this.Get('RunAt');
|
|
@@ -30214,8 +30274,8 @@ let AIPromptRunEntity = class AIPromptRunEntity extends core_1.BaseEntity {
|
|
|
30214
30274
|
/**
|
|
30215
30275
|
* * Field Name: CompletedAt
|
|
30216
30276
|
* * Display Name: Completed At
|
|
30217
|
-
* * SQL Data Type:
|
|
30218
|
-
* * Description: When the prompt
|
|
30277
|
+
* * SQL Data Type: datetimeoffset
|
|
30278
|
+
* * Description: When the prompt run completed, with timezone offset information.
|
|
30219
30279
|
*/
|
|
30220
30280
|
get CompletedAt() {
|
|
30221
30281
|
return this.Get('CompletedAt');
|