@memberjunction/core-entities 2.74.0 → 2.75.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.
@@ -8468,6 +8468,12 @@ exports.AIPromptRunSchema = zod_1.z.object({
8468
8468
  * * Display Name: Total Failover Duration
8469
8469
  * * SQL Data Type: int
8470
8470
  * * Description: Total time spent in failover attempts in milliseconds`),
8471
+ RerunFromPromptRunID: zod_1.z.string().nullable().describe(`
8472
+ * * Field Name: RerunFromPromptRunID
8473
+ * * Display Name: Rerun From Prompt Run ID
8474
+ * * SQL Data Type: uniqueidentifier
8475
+ * * Related Entity/Foreign Key: MJ: AI Prompt Runs (vwAIPromptRuns.ID)
8476
+ * * Description: If this run was initiated as a re-run of another prompt run, this field links back to the original run ID`),
8471
8477
  Prompt: zod_1.z.string().describe(`
8472
8478
  * * Field Name: Prompt
8473
8479
  * * Display Name: Prompt
@@ -14109,8 +14115,8 @@ let AIAgentActionEntity = class AIAgentActionEntity extends core_1.BaseEntity {
14109
14115
  }
14110
14116
  /**
14111
14117
  * Validate() method override for AI Agent Actions entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
14112
- * * MinExecutionsPerRun: This rule ensures that if a value for 'Minimum Executions Per Run' is provided, it must be zero or greater. If the value is not provided (left blank), that's also allowed.
14113
14118
  * * MaxExecutionsPerRun: This rule ensures that if a value for the maximum number of executions per run is provided, it must be greater than zero. If no value is provided, that's acceptable.
14119
+ * * MinExecutionsPerRun: This rule ensures that if a value for 'Minimum Executions Per Run' is provided, it must be zero or greater. If the value is not provided (left blank), that's also allowed.
14114
14120
  * * Table-Level: This rule ensures that the minimum number of executions per run cannot be greater than the maximum number of executions per run. If either value is not specified, the rule is considered satisfied.
14115
14121
  * @public
14116
14122
  * @method
@@ -14118,31 +14124,31 @@ let AIAgentActionEntity = class AIAgentActionEntity extends core_1.BaseEntity {
14118
14124
  */
14119
14125
  Validate() {
14120
14126
  const result = super.Validate();
14121
- this.ValidateMinExecutionsPerRunIsNonNegative(result);
14122
14127
  this.ValidateMaxExecutionsPerRunGreaterThanZero(result);
14128
+ this.ValidateMinExecutionsPerRunIsNonNegative(result);
14123
14129
  this.ValidateMinExecutionsPerRunLessThanOrEqualToMax(result);
14124
14130
  return result;
14125
14131
  }
14126
14132
  /**
14127
- * This rule ensures that if a value for 'Minimum Executions Per Run' is provided, it must be zero or greater. If the value is not provided (left blank), that's also allowed.
14133
+ * This rule ensures that if a value for the maximum number of executions per run is provided, it must be greater than zero. If no value is provided, that's acceptable.
14128
14134
  * @param result - the ValidationResult object to add any errors or warnings to
14129
14135
  * @public
14130
14136
  * @method
14131
14137
  */
14132
- ValidateMinExecutionsPerRunIsNonNegative(result) {
14133
- if (this.MinExecutionsPerRun !== null && this.MinExecutionsPerRun < 0) {
14134
- result.Errors.push(new core_1.ValidationErrorInfo("MinExecutionsPerRun", "Minimum executions per run must be zero or greater.", this.MinExecutionsPerRun, core_1.ValidationErrorType.Failure));
14138
+ ValidateMaxExecutionsPerRunGreaterThanZero(result) {
14139
+ if (this.MaxExecutionsPerRun !== null && this.MaxExecutionsPerRun <= 0) {
14140
+ result.Errors.push(new core_1.ValidationErrorInfo("MaxExecutionsPerRun", "If a maximum executions per run is specified, it must be greater than zero.", this.MaxExecutionsPerRun, core_1.ValidationErrorType.Failure));
14135
14141
  }
14136
14142
  }
14137
14143
  /**
14138
- * This rule ensures that if a value for the maximum number of executions per run is provided, it must be greater than zero. If no value is provided, that's acceptable.
14144
+ * This rule ensures that if a value for 'Minimum Executions Per Run' is provided, it must be zero or greater. If the value is not provided (left blank), that's also allowed.
14139
14145
  * @param result - the ValidationResult object to add any errors or warnings to
14140
14146
  * @public
14141
14147
  * @method
14142
14148
  */
14143
- ValidateMaxExecutionsPerRunGreaterThanZero(result) {
14144
- if (this.MaxExecutionsPerRun !== null && this.MaxExecutionsPerRun <= 0) {
14145
- result.Errors.push(new core_1.ValidationErrorInfo("MaxExecutionsPerRun", "If a maximum executions per run is specified, it must be greater than zero.", this.MaxExecutionsPerRun, core_1.ValidationErrorType.Failure));
14149
+ ValidateMinExecutionsPerRunIsNonNegative(result) {
14150
+ if (this.MinExecutionsPerRun !== null && this.MinExecutionsPerRun < 0) {
14151
+ result.Errors.push(new core_1.ValidationErrorInfo("MinExecutionsPerRun", "Minimum executions per run must be zero or greater.", this.MinExecutionsPerRun, core_1.ValidationErrorType.Failure));
14146
14152
  }
14147
14153
  }
14148
14154
  /**
@@ -15019,25 +15025,36 @@ let AIAgentEntity = class AIAgentEntity extends core_1.BaseEntity {
15019
15025
  }
15020
15026
  /**
15021
15027
  * Validate() method override for AI Agents entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
15022
- * * MinExecutionsPerRun: This rule ensures that if the minimum executions per run value is provided, it must be zero or greater.
15023
15028
  * * MaxExecutionsPerRun: This rule ensures that the maximum number of executions per run can either be left blank (unspecified) or, if provided, it must be a positive number greater than zero.
15029
+ * * MinExecutionsPerRun: This rule ensures that if the minimum executions per run value is provided, it must be zero or greater.
15030
+ * * Table-Level: This rule ensures that if context compression is enabled, all related settings (message threshold, prompt ID, and message retention count) must be specified. If context compression is not enabled, these settings may be left unspecified.
15024
15031
  * * Table-Level: This rule ensures that if both 'Minimum Executions Per Run' and 'Maximum Executions Per Run' are specified, the minimum must not be greater than the maximum. If either field is not specified, this rule does not apply.
15025
15032
  * * Table-Level: This rule makes sure that if the ParentID is set (not empty), then the ExposeAsAction option must be disabled. If ExposeAsAction is enabled, ParentID must be empty.
15026
- * * Table-Level: This rule ensures that if context compression is enabled, all related settings (message threshold, prompt ID, and message retention count) must be specified. If context compression is not enabled, these settings may be left unspecified.
15027
15033
  * @public
15028
15034
  * @method
15029
15035
  * @override
15030
15036
  */
15031
15037
  Validate() {
15032
15038
  const result = super.Validate();
15033
- this.ValidateMinExecutionsPerRunIsNonNegative(result);
15034
15039
  this.ValidateMaxExecutionsPerRunIsNullOrPositive(result);
15040
+ this.ValidateMinExecutionsPerRunIsNonNegative(result);
15041
+ this.ValidateEnableContextCompressionRequiresContextFields(result);
15035
15042
  this.ValidateMinExecutionsPerRunLessThanOrEqualToMaxExecutionsPerRun(result);
15036
15043
  this.ValidateParentIDMustBeNullIfExposeAsActionTrue(result);
15037
- this.ValidateEnableContextCompressionRequiresContextFields(result);
15038
15044
  return result;
15039
15045
  }
15040
15046
  /**
15047
+ * This rule ensures that the maximum number of executions per run can either be left blank (unspecified) or, if provided, it must be a positive number greater than zero.
15048
+ * @param result - the ValidationResult object to add any errors or warnings to
15049
+ * @public
15050
+ * @method
15051
+ */
15052
+ ValidateMaxExecutionsPerRunIsNullOrPositive(result) {
15053
+ if (this.MaxExecutionsPerRun !== null && this.MaxExecutionsPerRun <= 0) {
15054
+ result.Errors.push(new core_1.ValidationErrorInfo("MaxExecutionsPerRun", "MaxExecutionsPerRun must be left blank or must be greater than zero.", this.MaxExecutionsPerRun, core_1.ValidationErrorType.Failure));
15055
+ }
15056
+ }
15057
+ /**
15041
15058
  * This rule ensures that if the minimum executions per run value is provided, it must be zero or greater.
15042
15059
  * @param result - the ValidationResult object to add any errors or warnings to
15043
15060
  * @public
@@ -15049,14 +15066,22 @@ let AIAgentEntity = class AIAgentEntity extends core_1.BaseEntity {
15049
15066
  }
15050
15067
  }
15051
15068
  /**
15052
- * This rule ensures that the maximum number of executions per run can either be left blank (unspecified) or, if provided, it must be a positive number greater than zero.
15069
+ * This rule ensures that if context compression is enabled, all related settings (message threshold, prompt ID, and message retention count) must be specified. If context compression is not enabled, these settings may be left unspecified.
15053
15070
  * @param result - the ValidationResult object to add any errors or warnings to
15054
15071
  * @public
15055
15072
  * @method
15056
15073
  */
15057
- ValidateMaxExecutionsPerRunIsNullOrPositive(result) {
15058
- if (this.MaxExecutionsPerRun !== null && this.MaxExecutionsPerRun <= 0) {
15059
- result.Errors.push(new core_1.ValidationErrorInfo("MaxExecutionsPerRun", "MaxExecutionsPerRun must be left blank or must be greater than zero.", this.MaxExecutionsPerRun, core_1.ValidationErrorType.Failure));
15074
+ ValidateEnableContextCompressionRequiresContextFields(result) {
15075
+ if (this.EnableContextCompression) {
15076
+ if (this.ContextCompressionMessageThreshold === null) {
15077
+ result.Errors.push(new core_1.ValidationErrorInfo("ContextCompressionMessageThreshold", "Context compression is enabled, so the context compression message threshold is required.", this.ContextCompressionMessageThreshold, core_1.ValidationErrorType.Failure));
15078
+ }
15079
+ if (this.ContextCompressionPromptID === null) {
15080
+ result.Errors.push(new core_1.ValidationErrorInfo("ContextCompressionPromptID", "Context compression is enabled, so the context compression prompt ID is required.", this.ContextCompressionPromptID, core_1.ValidationErrorType.Failure));
15081
+ }
15082
+ if (this.ContextCompressionMessageRetentionCount === null) {
15083
+ result.Errors.push(new core_1.ValidationErrorInfo("ContextCompressionMessageRetentionCount", "Context compression is enabled, so the context compression message retention count is required.", this.ContextCompressionMessageRetentionCount, core_1.ValidationErrorType.Failure));
15084
+ }
15060
15085
  }
15061
15086
  }
15062
15087
  /**
@@ -15082,25 +15107,6 @@ let AIAgentEntity = class AIAgentEntity extends core_1.BaseEntity {
15082
15107
  }
15083
15108
  }
15084
15109
  /**
15085
- * This rule ensures that if context compression is enabled, all related settings (message threshold, prompt ID, and message retention count) must be specified. If context compression is not enabled, these settings may be left unspecified.
15086
- * @param result - the ValidationResult object to add any errors or warnings to
15087
- * @public
15088
- * @method
15089
- */
15090
- ValidateEnableContextCompressionRequiresContextFields(result) {
15091
- if (this.EnableContextCompression) {
15092
- if (this.ContextCompressionMessageThreshold === null) {
15093
- result.Errors.push(new core_1.ValidationErrorInfo("ContextCompressionMessageThreshold", "Context compression is enabled, so the context compression message threshold is required.", this.ContextCompressionMessageThreshold, core_1.ValidationErrorType.Failure));
15094
- }
15095
- if (this.ContextCompressionPromptID === null) {
15096
- result.Errors.push(new core_1.ValidationErrorInfo("ContextCompressionPromptID", "Context compression is enabled, so the context compression prompt ID is required.", this.ContextCompressionPromptID, core_1.ValidationErrorType.Failure));
15097
- }
15098
- if (this.ContextCompressionMessageRetentionCount === null) {
15099
- result.Errors.push(new core_1.ValidationErrorInfo("ContextCompressionMessageRetentionCount", "Context compression is enabled, so the context compression message retention count is required.", this.ContextCompressionMessageRetentionCount, core_1.ValidationErrorType.Failure));
15100
- }
15101
- }
15102
- }
15103
- /**
15104
15110
  * * Field Name: ID
15105
15111
  * * Display Name: ID
15106
15112
  * * SQL Data Type: uniqueidentifier
@@ -15812,32 +15818,21 @@ let AIModelEntity = class AIModelEntity extends core_1.BaseEntity {
15812
15818
  }
15813
15819
  /**
15814
15820
  * Validate() method override for AI Models entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
15815
- * * SpeedRank: This rule ensures that the speed rank must be zero or a positive number.
15816
15821
  * * CostRank: This rule ensures that the cost rank of an item must be zero or higher. This means that the cost rank cannot be negative.
15817
15822
  * * PowerRank: This rule ensures that the power rank must be greater than or equal to zero, meaning that it cannot be negative.
15823
+ * * SpeedRank: This rule ensures that the speed rank must be zero or a positive number.
15818
15824
  * @public
15819
15825
  * @method
15820
15826
  * @override
15821
15827
  */
15822
15828
  Validate() {
15823
15829
  const result = super.Validate();
15824
- this.ValidateSpeedRank(result);
15825
15830
  this.ValidateCostRank(result);
15826
15831
  this.ValidatePowerRank(result);
15832
+ this.ValidateSpeedRank(result);
15827
15833
  return result;
15828
15834
  }
15829
15835
  /**
15830
- * This rule ensures that the speed rank must be zero or a positive number.
15831
- * @param result - the ValidationResult object to add any errors or warnings to
15832
- * @public
15833
- * @method
15834
- */
15835
- ValidateSpeedRank(result) {
15836
- if (this.SpeedRank < 0) {
15837
- result.Errors.push(new core_1.ValidationErrorInfo('SpeedRank', 'Speed rank must be zero or a positive number.', this.SpeedRank, core_1.ValidationErrorType.Failure));
15838
- }
15839
- }
15840
- /**
15841
15836
  * This rule ensures that the cost rank of an item must be zero or higher. This means that the cost rank cannot be negative.
15842
15837
  * @param result - the ValidationResult object to add any errors or warnings to
15843
15838
  * @public
@@ -15860,6 +15855,17 @@ let AIModelEntity = class AIModelEntity extends core_1.BaseEntity {
15860
15855
  }
15861
15856
  }
15862
15857
  /**
15858
+ * This rule ensures that the speed rank must be zero or a positive number.
15859
+ * @param result - the ValidationResult object to add any errors or warnings to
15860
+ * @public
15861
+ * @method
15862
+ */
15863
+ ValidateSpeedRank(result) {
15864
+ if (this.SpeedRank < 0) {
15865
+ result.Errors.push(new core_1.ValidationErrorInfo('SpeedRank', 'Speed rank must be zero or a positive number.', this.SpeedRank, core_1.ValidationErrorType.Failure));
15866
+ }
15867
+ }
15868
+ /**
15863
15869
  * * Field Name: ID
15864
15870
  * * Display Name: ID
15865
15871
  * * SQL Data Type: uniqueidentifier
@@ -16277,64 +16283,54 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
16277
16283
  }
16278
16284
  /**
16279
16285
  * 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:
16280
- * * FailoverStrategy: This rule ensures that the FailoverStrategy field, if specified, must be either 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank (unset).
16281
- * * FailoverModelStrategy: This rule ensures that the value for FailoverModelStrategy is either 'RequireSameModel', 'PreferDifferentModel', 'PreferSameModel', or left blank (not set). Any other value is not allowed.
16282
- * * FailoverErrorScope: This rule ensures that the FailoverErrorScope field can only be set to 'ServiceErrorOnly', 'RateLimitOnly', 'NetworkOnly', 'All', or left empty.
16283
16286
  * * 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.
16284
16287
  * * CacheTTLSeconds: This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
16285
- * * 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.
16288
+ * * FailoverErrorScope: This rule ensures that the FailoverErrorScope field can only be set to 'ServiceErrorOnly', 'RateLimitOnly', 'NetworkOnly', 'All', or left empty.
16289
+ * * FailoverModelStrategy: This rule ensures that the value for FailoverModelStrategy is either 'RequireSameModel', 'PreferDifferentModel', 'PreferSameModel', or left blank (not set). Any other value is not allowed.
16290
+ * * FailoverStrategy: This rule ensures that the FailoverStrategy field, if specified, must be either 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank (unset).
16286
16291
  * * 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.
16287
- * * Table-Level: This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
16288
- * * 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.
16289
16292
  * * 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.
16293
+ * * 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.
16294
+ * * Table-Level: This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
16295
+ * * 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.
16290
16296
  * @public
16291
16297
  * @method
16292
16298
  * @override
16293
16299
  */
16294
16300
  Validate() {
16295
16301
  const result = super.Validate();
16296
- this.ValidateFailoverStrategyAllowedValues(result);
16297
- this.ValidateFailoverModelStrategyAgainstAllowedValues(result);
16298
- this.ValidateFailoverErrorScopeAgainstAllowedValues(result);
16299
16302
  this.ValidateCacheSimilarityThresholdIsBetweenZeroAndOne(result);
16300
16303
  this.ValidateCacheTTLSecondsGreaterThanZero(result);
16301
- this.ValidateResultSelectorPromptIDNotEqualID(result);
16304
+ this.ValidateFailoverErrorScopeAgainstAllowedValues(result);
16305
+ this.ValidateFailoverModelStrategyAgainstAllowedValues(result);
16306
+ this.ValidateFailoverStrategyAllowedValues(result);
16302
16307
  this.ValidateCacheSimilarityThresholdRequiredForVectorCache(result);
16303
- this.ValidateParallelCountWhenParallelizationModeIsStaticCount(result);
16304
- this.ValidateParallelConfigParamRequiredForConfigParamMode(result);
16305
16308
  this.ValidateOutputExampleWhenOutputTypeObject(result);
16309
+ this.ValidateParallelConfigParamRequiredForConfigParamMode(result);
16310
+ this.ValidateParallelCountWhenParallelizationModeIsStaticCount(result);
16311
+ this.ValidateResultSelectorPromptIDNotEqualID(result);
16306
16312
  return result;
16307
16313
  }
16308
16314
  /**
16309
- * This rule ensures that the FailoverStrategy field, if specified, must be either 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank (unset).
16315
+ * 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.
16310
16316
  * @param result - the ValidationResult object to add any errors or warnings to
16311
16317
  * @public
16312
16318
  * @method
16313
16319
  */
16314
- ValidateFailoverStrategyAllowedValues(result) {
16315
- const allowed = [
16316
- "None",
16317
- "PowerRank",
16318
- "NextBestModel",
16319
- "SameModelDifferentVendor",
16320
- null, // Allowing null/undefined as valid per the constraint
16321
- undefined
16322
- ];
16323
- if (!allowed.includes(this.FailoverStrategy)) {
16324
- result.Errors.push(new core_1.ValidationErrorInfo("FailoverStrategy", "The failover strategy must be 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank.", this.FailoverStrategy, core_1.ValidationErrorType.Failure));
16320
+ ValidateCacheSimilarityThresholdIsBetweenZeroAndOne(result) {
16321
+ if (this.CacheSimilarityThreshold !== null && (this.CacheSimilarityThreshold < 0 || this.CacheSimilarityThreshold > 1)) {
16322
+ result.Errors.push(new core_1.ValidationErrorInfo("CacheSimilarityThreshold", "Cache similarity threshold must be between 0 and 1.", this.CacheSimilarityThreshold, core_1.ValidationErrorType.Failure));
16325
16323
  }
16326
16324
  }
16327
16325
  /**
16328
- * This rule ensures that the value for FailoverModelStrategy is either 'RequireSameModel', 'PreferDifferentModel', 'PreferSameModel', or left blank (not set). Any other value is not allowed.
16326
+ * This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
16329
16327
  * @param result - the ValidationResult object to add any errors or warnings to
16330
16328
  * @public
16331
16329
  * @method
16332
16330
  */
16333
- ValidateFailoverModelStrategyAgainstAllowedValues(result) {
16334
- const allowedValues = ["RequireSameModel", "PreferDifferentModel", "PreferSameModel", null];
16335
- if (this.FailoverModelStrategy !== null &&
16336
- !allowedValues.includes(this.FailoverModelStrategy)) {
16337
- result.Errors.push(new core_1.ValidationErrorInfo("FailoverModelStrategy", "FailoverModelStrategy must be null or one of: 'RequireSameModel', 'PreferDifferentModel', 'PreferSameModel'.", this.FailoverModelStrategy, core_1.ValidationErrorType.Failure));
16331
+ ValidateCacheTTLSecondsGreaterThanZero(result) {
16332
+ if (this.CacheTTLSeconds !== null && this.CacheTTLSeconds <= 0) {
16333
+ result.Errors.push(new core_1.ValidationErrorInfo("CacheTTLSeconds", "If cache expiration time (CacheTTLSeconds) is specified, it must be greater than zero.", this.CacheTTLSeconds, core_1.ValidationErrorType.Failure));
16338
16334
  }
16339
16335
  }
16340
16336
  /**
@@ -16350,36 +16346,35 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
16350
16346
  }
16351
16347
  }
16352
16348
  /**
16353
- * 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.
16354
- * @param result - the ValidationResult object to add any errors or warnings to
16355
- * @public
16356
- * @method
16357
- */
16358
- ValidateCacheSimilarityThresholdIsBetweenZeroAndOne(result) {
16359
- if (this.CacheSimilarityThreshold !== null && (this.CacheSimilarityThreshold < 0 || this.CacheSimilarityThreshold > 1)) {
16360
- result.Errors.push(new core_1.ValidationErrorInfo("CacheSimilarityThreshold", "Cache similarity threshold must be between 0 and 1.", this.CacheSimilarityThreshold, core_1.ValidationErrorType.Failure));
16361
- }
16362
- }
16363
- /**
16364
- * This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
16349
+ * This rule ensures that the value for FailoverModelStrategy is either 'RequireSameModel', 'PreferDifferentModel', 'PreferSameModel', or left blank (not set). Any other value is not allowed.
16365
16350
  * @param result - the ValidationResult object to add any errors or warnings to
16366
16351
  * @public
16367
16352
  * @method
16368
16353
  */
16369
- ValidateCacheTTLSecondsGreaterThanZero(result) {
16370
- if (this.CacheTTLSeconds !== null && this.CacheTTLSeconds <= 0) {
16371
- result.Errors.push(new core_1.ValidationErrorInfo("CacheTTLSeconds", "If cache expiration time (CacheTTLSeconds) is specified, it must be greater than zero.", this.CacheTTLSeconds, core_1.ValidationErrorType.Failure));
16354
+ ValidateFailoverModelStrategyAgainstAllowedValues(result) {
16355
+ const allowedValues = ["RequireSameModel", "PreferDifferentModel", "PreferSameModel", null];
16356
+ if (this.FailoverModelStrategy !== null &&
16357
+ !allowedValues.includes(this.FailoverModelStrategy)) {
16358
+ result.Errors.push(new core_1.ValidationErrorInfo("FailoverModelStrategy", "FailoverModelStrategy must be null or one of: 'RequireSameModel', 'PreferDifferentModel', 'PreferSameModel'.", this.FailoverModelStrategy, core_1.ValidationErrorType.Failure));
16372
16359
  }
16373
16360
  }
16374
16361
  /**
16375
- * This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
16362
+ * This rule ensures that the FailoverStrategy field, if specified, must be either 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank (unset).
16376
16363
  * @param result - the ValidationResult object to add any errors or warnings to
16377
16364
  * @public
16378
16365
  * @method
16379
16366
  */
16380
- ValidateResultSelectorPromptIDNotEqualID(result) {
16381
- if (this.ResultSelectorPromptID === this.ID) {
16382
- 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));
16367
+ ValidateFailoverStrategyAllowedValues(result) {
16368
+ const allowed = [
16369
+ "None",
16370
+ "PowerRank",
16371
+ "NextBestModel",
16372
+ "SameModelDifferentVendor",
16373
+ null, // Allowing null/undefined as valid per the constraint
16374
+ undefined
16375
+ ];
16376
+ if (!allowed.includes(this.FailoverStrategy)) {
16377
+ result.Errors.push(new core_1.ValidationErrorInfo("FailoverStrategy", "The failover strategy must be 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank.", this.FailoverStrategy, core_1.ValidationErrorType.Failure));
16383
16378
  }
16384
16379
  }
16385
16380
  /**
@@ -16394,14 +16389,14 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
16394
16389
  }
16395
16390
  }
16396
16391
  /**
16397
- * This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
16392
+ * 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.
16398
16393
  * @param result - the ValidationResult object to add any errors or warnings to
16399
16394
  * @public
16400
16395
  * @method
16401
16396
  */
16402
- ValidateParallelCountWhenParallelizationModeIsStaticCount(result) {
16403
- if (this.ParallelizationMode === "StaticCount" && this.ParallelCount === null) {
16404
- result.Errors.push(new core_1.ValidationErrorInfo("ParallelCount", "When ParallelizationMode is 'StaticCount', ParallelCount must be specified.", this.ParallelCount, core_1.ValidationErrorType.Failure));
16397
+ ValidateOutputExampleWhenOutputTypeObject(result) {
16398
+ if (this.OutputType === "object" && (this.OutputExample === null || this.OutputExample === undefined)) {
16399
+ result.Errors.push(new core_1.ValidationErrorInfo("OutputExample", "When OutputType is 'object', OutputExample must be provided.", this.OutputExample, core_1.ValidationErrorType.Failure));
16405
16400
  }
16406
16401
  }
16407
16402
  /**
@@ -16416,14 +16411,25 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
16416
16411
  }
16417
16412
  }
16418
16413
  /**
16419
- * 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.
16414
+ * This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
16420
16415
  * @param result - the ValidationResult object to add any errors or warnings to
16421
16416
  * @public
16422
16417
  * @method
16423
16418
  */
16424
- ValidateOutputExampleWhenOutputTypeObject(result) {
16425
- if (this.OutputType === "object" && (this.OutputExample === null || this.OutputExample === undefined)) {
16426
- result.Errors.push(new core_1.ValidationErrorInfo("OutputExample", "When OutputType is 'object', OutputExample must be provided.", this.OutputExample, core_1.ValidationErrorType.Failure));
16419
+ ValidateParallelCountWhenParallelizationModeIsStaticCount(result) {
16420
+ if (this.ParallelizationMode === "StaticCount" && this.ParallelCount === null) {
16421
+ result.Errors.push(new core_1.ValidationErrorInfo("ParallelCount", "When ParallelizationMode is 'StaticCount', ParallelCount must be specified.", this.ParallelCount, core_1.ValidationErrorType.Failure));
16422
+ }
16423
+ }
16424
+ /**
16425
+ * This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
16426
+ * @param result - the ValidationResult object to add any errors or warnings to
16427
+ * @public
16428
+ * @method
16429
+ */
16430
+ ValidateResultSelectorPromptIDNotEqualID(result) {
16431
+ if (this.ResultSelectorPromptID === this.ID) {
16432
+ 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));
16427
16433
  }
16428
16434
  }
16429
16435
  /**
@@ -30804,39 +30810,39 @@ let AIAgentRunStepEntity = class AIAgentRunStepEntity extends core_1.BaseEntity
30804
30810
  }
30805
30811
  /**
30806
30812
  * Validate() method override for MJ: AI Agent Run Steps entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
30807
- * * StepNumber: This rule ensures that the step number must always be greater than zero.
30808
30813
  * * FinalPayloadValidationResult: This rule ensures that the FinalPayloadValidationResult field is either left blank or is set to one of the following values: 'Warn', 'Fail', 'Retry', or 'Pass'. No other values are allowed.
30814
+ * * StepNumber: This rule ensures that the step number must always be greater than zero.
30809
30815
  * @public
30810
30816
  * @method
30811
30817
  * @override
30812
30818
  */
30813
30819
  Validate() {
30814
30820
  const result = super.Validate();
30815
- this.ValidateStepNumberGreaterThanZero(result);
30816
30821
  this.ValidateFinalPayloadValidationResultAllowedValues(result);
30822
+ this.ValidateStepNumberGreaterThanZero(result);
30817
30823
  return result;
30818
30824
  }
30819
30825
  /**
30820
- * This rule ensures that the step number must always be greater than zero.
30826
+ * This rule ensures that the FinalPayloadValidationResult field is either left blank or is set to one of the following values: 'Warn', 'Fail', 'Retry', or 'Pass'. No other values are allowed.
30821
30827
  * @param result - the ValidationResult object to add any errors or warnings to
30822
30828
  * @public
30823
30829
  * @method
30824
30830
  */
30825
- ValidateStepNumberGreaterThanZero(result) {
30826
- if (this.StepNumber <= 0) {
30827
- result.Errors.push(new core_1.ValidationErrorInfo("StepNumber", "Step number must be greater than zero.", this.StepNumber, core_1.ValidationErrorType.Failure));
30831
+ ValidateFinalPayloadValidationResultAllowedValues(result) {
30832
+ const allowedValues = ["Warn", "Fail", "Retry", "Pass"];
30833
+ if (this.FinalPayloadValidationResult !== null && !allowedValues.includes(this.FinalPayloadValidationResult)) {
30834
+ result.Errors.push(new core_1.ValidationErrorInfo("FinalPayloadValidationResult", "If a final payload validation result is specified, it must be either 'Warn', 'Fail', 'Retry', or 'Pass'.", this.FinalPayloadValidationResult, core_1.ValidationErrorType.Failure));
30828
30835
  }
30829
30836
  }
30830
30837
  /**
30831
- * This rule ensures that the FinalPayloadValidationResult field is either left blank or is set to one of the following values: 'Warn', 'Fail', 'Retry', or 'Pass'. No other values are allowed.
30838
+ * This rule ensures that the step number must always be greater than zero.
30832
30839
  * @param result - the ValidationResult object to add any errors or warnings to
30833
30840
  * @public
30834
30841
  * @method
30835
30842
  */
30836
- ValidateFinalPayloadValidationResultAllowedValues(result) {
30837
- const allowedValues = ["Warn", "Fail", "Retry", "Pass"];
30838
- if (this.FinalPayloadValidationResult !== null && !allowedValues.includes(this.FinalPayloadValidationResult)) {
30839
- result.Errors.push(new core_1.ValidationErrorInfo("FinalPayloadValidationResult", "If a final payload validation result is specified, it must be either 'Warn', 'Fail', 'Retry', or 'Pass'.", this.FinalPayloadValidationResult, core_1.ValidationErrorType.Failure));
30843
+ ValidateStepNumberGreaterThanZero(result) {
30844
+ if (this.StepNumber <= 0) {
30845
+ result.Errors.push(new core_1.ValidationErrorInfo("StepNumber", "Step number must be greater than zero.", this.StepNumber, core_1.ValidationErrorType.Failure));
30840
30846
  }
30841
30847
  }
30842
30848
  /**
@@ -32457,38 +32463,38 @@ let AIModelPriceUnitTypeEntity = class AIModelPriceUnitTypeEntity extends core_1
32457
32463
  }
32458
32464
  /**
32459
32465
  * Validate() method override for MJ: AI Model Price Unit Types entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
32460
- * * Name: This rule ensures that the Name field cannot be empty or contain only spaces; it must have at least one non-space character.
32461
32466
  * * DriverClass: This rule ensures that the DriverClass field cannot be empty or consist only of spaces. The value must contain at least one character when leading and trailing spaces are ignored.
32467
+ * * Name: This rule ensures that the Name field cannot be empty or contain only spaces; it must have at least one non-space character.
32462
32468
  * @public
32463
32469
  * @method
32464
32470
  * @override
32465
32471
  */
32466
32472
  Validate() {
32467
32473
  const result = super.Validate();
32468
- this.ValidateNameNotEmptyOrWhitespace(result);
32469
32474
  this.ValidateDriverClassNotEmpty(result);
32475
+ this.ValidateNameNotEmptyOrWhitespace(result);
32470
32476
  return result;
32471
32477
  }
32472
32478
  /**
32473
- * This rule ensures that the Name field cannot be empty or contain only spaces; it must have at least one non-space character.
32479
+ * This rule ensures that the DriverClass field cannot be empty or consist only of spaces. The value must contain at least one character when leading and trailing spaces are ignored.
32474
32480
  * @param result - the ValidationResult object to add any errors or warnings to
32475
32481
  * @public
32476
32482
  * @method
32477
32483
  */
32478
- ValidateNameNotEmptyOrWhitespace(result) {
32479
- if (!this.Name || this.Name.trim().length === 0) {
32480
- result.Errors.push(new core_1.ValidationErrorInfo("Name", "The Name field must not be empty or contain only spaces.", this.Name, core_1.ValidationErrorType.Failure));
32484
+ ValidateDriverClassNotEmpty(result) {
32485
+ if (this.DriverClass === null || this.DriverClass.trim().length === 0) {
32486
+ result.Errors.push(new core_1.ValidationErrorInfo("DriverClass", "DriverClass must not be empty or only spaces.", this.DriverClass, core_1.ValidationErrorType.Failure));
32481
32487
  }
32482
32488
  }
32483
32489
  /**
32484
- * This rule ensures that the DriverClass field cannot be empty or consist only of spaces. The value must contain at least one character when leading and trailing spaces are ignored.
32490
+ * This rule ensures that the Name field cannot be empty or contain only spaces; it must have at least one non-space character.
32485
32491
  * @param result - the ValidationResult object to add any errors or warnings to
32486
32492
  * @public
32487
32493
  * @method
32488
32494
  */
32489
- ValidateDriverClassNotEmpty(result) {
32490
- if (this.DriverClass === null || this.DriverClass.trim().length === 0) {
32491
- result.Errors.push(new core_1.ValidationErrorInfo("DriverClass", "DriverClass must not be empty or only spaces.", this.DriverClass, core_1.ValidationErrorType.Failure));
32495
+ ValidateNameNotEmptyOrWhitespace(result) {
32496
+ if (!this.Name || this.Name.trim().length === 0) {
32497
+ result.Errors.push(new core_1.ValidationErrorInfo("Name", "The Name field must not be empty or contain only spaces.", this.Name, core_1.ValidationErrorType.Failure));
32492
32498
  }
32493
32499
  }
32494
32500
  /**
@@ -32592,32 +32598,21 @@ let AIModelVendorEntity = class AIModelVendorEntity extends core_1.BaseEntity {
32592
32598
  }
32593
32599
  /**
32594
32600
  * Validate() method override for MJ: AI Model Vendors entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
32595
- * * Priority: This rule ensures that the Priority value cannot be negative. It must be zero or greater.
32596
32601
  * * MaxInputTokens: This rule ensures that if the MaxInputTokens field is specified, it must be zero or a positive number. It cannot be negative.
32597
32602
  * * MaxOutputTokens: This rule ensures that the maximum output tokens value must be zero or higher. If no value is provided, that's also acceptable.
32603
+ * * Priority: This rule ensures that the Priority value cannot be negative. It must be zero or greater.
32598
32604
  * @public
32599
32605
  * @method
32600
32606
  * @override
32601
32607
  */
32602
32608
  Validate() {
32603
32609
  const result = super.Validate();
32604
- this.ValidatePriorityIsNonNegative(result);
32605
32610
  this.ValidateMaxInputTokensNonNegative(result);
32606
32611
  this.ValidateMaxOutputTokensNotNegative(result);
32612
+ this.ValidatePriorityIsNonNegative(result);
32607
32613
  return result;
32608
32614
  }
32609
32615
  /**
32610
- * This rule ensures that the Priority value cannot be negative. It must be zero or greater.
32611
- * @param result - the ValidationResult object to add any errors or warnings to
32612
- * @public
32613
- * @method
32614
- */
32615
- ValidatePriorityIsNonNegative(result) {
32616
- if (this.Priority < 0) {
32617
- result.Errors.push(new core_1.ValidationErrorInfo("Priority", "Priority must be zero or greater.", this.Priority, core_1.ValidationErrorType.Failure));
32618
- }
32619
- }
32620
- /**
32621
32616
  * This rule ensures that if the MaxInputTokens field is specified, it must be zero or a positive number. It cannot be negative.
32622
32617
  * @param result - the ValidationResult object to add any errors or warnings to
32623
32618
  * @public
@@ -32640,6 +32635,17 @@ let AIModelVendorEntity = class AIModelVendorEntity extends core_1.BaseEntity {
32640
32635
  }
32641
32636
  }
32642
32637
  /**
32638
+ * This rule ensures that the Priority value cannot be negative. It must be zero or greater.
32639
+ * @param result - the ValidationResult object to add any errors or warnings to
32640
+ * @public
32641
+ * @method
32642
+ */
32643
+ ValidatePriorityIsNonNegative(result) {
32644
+ if (this.Priority < 0) {
32645
+ result.Errors.push(new core_1.ValidationErrorInfo("Priority", "Priority must be zero or greater.", this.Priority, core_1.ValidationErrorType.Failure));
32646
+ }
32647
+ }
32648
+ /**
32643
32649
  * * Field Name: ID
32644
32650
  * * Display Name: ID
32645
32651
  * * SQL Data Type: uniqueidentifier
@@ -32896,9 +32902,9 @@ let AIPromptModelEntity = class AIPromptModelEntity extends core_1.BaseEntity {
32896
32902
  }
32897
32903
  /**
32898
32904
  * 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:
32899
- * * Priority: This rule ensures that the Priority value must be greater than or equal to zero. Negative priorities are not allowed.
32900
32905
  * * ExecutionGroup: This rule ensures that the ExecutionGroup value must be zero or a positive number. Negative numbers are not allowed.
32901
32906
  * * ParallelCount: This rule ensures that the number of parallel tasks (ParallelCount) must be at least 1. It cannot be zero or negative.
32907
+ * * Priority: This rule ensures that the Priority value must be greater than or equal to zero. Negative priorities are not allowed.
32902
32908
  * * 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.
32903
32909
  * @public
32904
32910
  * @method
@@ -32906,24 +32912,13 @@ let AIPromptModelEntity = class AIPromptModelEntity extends core_1.BaseEntity {
32906
32912
  */
32907
32913
  Validate() {
32908
32914
  const result = super.Validate();
32909
- this.ValidatePriorityIsNonNegative(result);
32910
32915
  this.ValidateExecutionGroupIsNonNegative(result);
32911
32916
  this.ValidateParallelCountAtLeastOne(result);
32917
+ this.ValidatePriorityIsNonNegative(result);
32912
32918
  this.ValidateParallelConfigParamBasedOnParallelizationMode(result);
32913
32919
  return result;
32914
32920
  }
32915
32921
  /**
32916
- * This rule ensures that the Priority value must be greater than or equal to zero. Negative priorities are not allowed.
32917
- * @param result - the ValidationResult object to add any errors or warnings to
32918
- * @public
32919
- * @method
32920
- */
32921
- ValidatePriorityIsNonNegative(result) {
32922
- if (this.Priority < 0) {
32923
- result.Errors.push(new core_1.ValidationErrorInfo("Priority", "Priority must be greater than or equal to zero.", this.Priority, core_1.ValidationErrorType.Failure));
32924
- }
32925
- }
32926
- /**
32927
32922
  * This rule ensures that the ExecutionGroup value must be zero or a positive number. Negative numbers are not allowed.
32928
32923
  * @param result - the ValidationResult object to add any errors or warnings to
32929
32924
  * @public
@@ -32946,6 +32941,17 @@ let AIPromptModelEntity = class AIPromptModelEntity extends core_1.BaseEntity {
32946
32941
  }
32947
32942
  }
32948
32943
  /**
32944
+ * This rule ensures that the Priority value must be greater than or equal to zero. Negative priorities are not allowed.
32945
+ * @param result - the ValidationResult object to add any errors or warnings to
32946
+ * @public
32947
+ * @method
32948
+ */
32949
+ ValidatePriorityIsNonNegative(result) {
32950
+ if (this.Priority < 0) {
32951
+ result.Errors.push(new core_1.ValidationErrorInfo("Priority", "Priority must be greater than or equal to zero.", this.Priority, core_1.ValidationErrorType.Failure));
32952
+ }
32953
+ }
32954
+ /**
32949
32955
  * 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.
32950
32956
  * @param result - the ValidationResult object to add any errors or warnings to
32951
32957
  * @public
@@ -33210,40 +33216,40 @@ let AIPromptRunEntity = class AIPromptRunEntity extends core_1.BaseEntity {
33210
33216
  }
33211
33217
  /**
33212
33218
  * 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:
33213
- * * 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.
33214
33219
  * * 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.
33220
+ * * 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.
33215
33221
  * @public
33216
33222
  * @method
33217
33223
  * @override
33218
33224
  */
33219
33225
  Validate() {
33220
33226
  const result = super.Validate();
33221
- this.ValidateTokensUsedSumMatchesPromptAndCompletion(result);
33222
33227
  this.ValidateCompletedAtIsNullOrAfterRunAt(result);
33228
+ this.ValidateTokensUsedSumMatchesPromptAndCompletion(result);
33223
33229
  return result;
33224
33230
  }
33225
33231
  /**
33226
- * 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.
33232
+ * 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.
33227
33233
  * @param result - the ValidationResult object to add any errors or warnings to
33228
33234
  * @public
33229
33235
  * @method
33230
33236
  */
33231
- ValidateTokensUsedSumMatchesPromptAndCompletion(result) {
33232
- if (!((this.TokensPrompt === null && this.TokensCompletion === null) ||
33233
- this.TokensUsed === null ||
33234
- (this.TokensPrompt !== null && this.TokensCompletion !== null && this.TokensUsed === (this.TokensPrompt + this.TokensCompletion)))) {
33235
- 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));
33237
+ ValidateCompletedAtIsNullOrAfterRunAt(result) {
33238
+ if (this.CompletedAt !== null && this.CompletedAt < this.RunAt) {
33239
+ 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));
33236
33240
  }
33237
33241
  }
33238
33242
  /**
33239
- * 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.
33243
+ * 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.
33240
33244
  * @param result - the ValidationResult object to add any errors or warnings to
33241
33245
  * @public
33242
33246
  * @method
33243
33247
  */
33244
- ValidateCompletedAtIsNullOrAfterRunAt(result) {
33245
- if (this.CompletedAt !== null && this.CompletedAt < this.RunAt) {
33246
- 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));
33248
+ ValidateTokensUsedSumMatchesPromptAndCompletion(result) {
33249
+ if (!((this.TokensPrompt === null && this.TokensCompletion === null) ||
33250
+ this.TokensUsed === null ||
33251
+ (this.TokensPrompt !== null && this.TokensCompletion !== null && this.TokensUsed === (this.TokensPrompt + this.TokensCompletion)))) {
33252
+ 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));
33247
33253
  }
33248
33254
  }
33249
33255
  /**
@@ -33979,6 +33985,19 @@ let AIPromptRunEntity = class AIPromptRunEntity extends core_1.BaseEntity {
33979
33985
  this.Set('TotalFailoverDuration', value);
33980
33986
  }
33981
33987
  /**
33988
+ * * Field Name: RerunFromPromptRunID
33989
+ * * Display Name: Rerun From Prompt Run ID
33990
+ * * SQL Data Type: uniqueidentifier
33991
+ * * Related Entity/Foreign Key: MJ: AI Prompt Runs (vwAIPromptRuns.ID)
33992
+ * * Description: If this run was initiated as a re-run of another prompt run, this field links back to the original run ID
33993
+ */
33994
+ get RerunFromPromptRunID() {
33995
+ return this.Get('RerunFromPromptRunID');
33996
+ }
33997
+ set RerunFromPromptRunID(value) {
33998
+ this.Set('RerunFromPromptRunID', value);
33999
+ }
34000
+ /**
33982
34001
  * * Field Name: Prompt
33983
34002
  * * Display Name: Prompt
33984
34003
  * * SQL Data Type: nvarchar(255)
@@ -40280,41 +40299,41 @@ let SchemaInfoEntity = class SchemaInfoEntity extends core_1.BaseEntity {
40280
40299
  }
40281
40300
  /**
40282
40301
  * Validate() method override for Schema Info entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
40283
- * * Table-Level: This rule ensures that both the minimum and maximum entity IDs must be greater than zero.
40284
40302
  * * Table-Level: This rule ensures that the maximum entity ID must be greater than the minimum entity ID, which helps to maintain valid and logical ranges for entity IDs.
40303
+ * * Table-Level: This rule ensures that both the minimum and maximum entity IDs must be greater than zero.
40285
40304
  * @public
40286
40305
  * @method
40287
40306
  * @override
40288
40307
  */
40289
40308
  Validate() {
40290
40309
  const result = super.Validate();
40291
- this.ValidateEntityIDMinAndEntityIDMaxGreaterThanZero(result);
40292
40310
  this.ValidateEntityIDMaxGreaterThanEntityIDMin(result);
40311
+ this.ValidateEntityIDMinAndEntityIDMaxGreaterThanZero(result);
40293
40312
  return result;
40294
40313
  }
40295
40314
  /**
40296
- * This rule ensures that both the minimum and maximum entity IDs must be greater than zero.
40315
+ * This rule ensures that the maximum entity ID must be greater than the minimum entity ID, which helps to maintain valid and logical ranges for entity IDs.
40297
40316
  * @param result - the ValidationResult object to add any errors or warnings to
40298
40317
  * @public
40299
40318
  * @method
40300
40319
  */
40301
- ValidateEntityIDMinAndEntityIDMaxGreaterThanZero(result) {
40302
- if (this.EntityIDMin <= 0) {
40303
- result.Errors.push(new core_1.ValidationErrorInfo("EntityIDMin", "The minimum entity ID must be greater than zero.", this.EntityIDMin, core_1.ValidationErrorType.Failure));
40304
- }
40305
- if (this.EntityIDMax <= 0) {
40306
- result.Errors.push(new core_1.ValidationErrorInfo("EntityIDMax", "The maximum entity ID must be greater than zero.", this.EntityIDMax, core_1.ValidationErrorType.Failure));
40320
+ ValidateEntityIDMaxGreaterThanEntityIDMin(result) {
40321
+ if (this.EntityIDMax <= this.EntityIDMin) {
40322
+ result.Errors.push(new core_1.ValidationErrorInfo("EntityIDMax", "The maximum entity ID must be greater than the minimum entity ID.", this.EntityIDMax, core_1.ValidationErrorType.Failure));
40307
40323
  }
40308
40324
  }
40309
40325
  /**
40310
- * This rule ensures that the maximum entity ID must be greater than the minimum entity ID, which helps to maintain valid and logical ranges for entity IDs.
40326
+ * This rule ensures that both the minimum and maximum entity IDs must be greater than zero.
40311
40327
  * @param result - the ValidationResult object to add any errors or warnings to
40312
40328
  * @public
40313
40329
  * @method
40314
40330
  */
40315
- ValidateEntityIDMaxGreaterThanEntityIDMin(result) {
40316
- if (this.EntityIDMax <= this.EntityIDMin) {
40317
- result.Errors.push(new core_1.ValidationErrorInfo("EntityIDMax", "The maximum entity ID must be greater than the minimum entity ID.", this.EntityIDMax, core_1.ValidationErrorType.Failure));
40331
+ ValidateEntityIDMinAndEntityIDMaxGreaterThanZero(result) {
40332
+ if (this.EntityIDMin <= 0) {
40333
+ result.Errors.push(new core_1.ValidationErrorInfo("EntityIDMin", "The minimum entity ID must be greater than zero.", this.EntityIDMin, core_1.ValidationErrorType.Failure));
40334
+ }
40335
+ if (this.EntityIDMax <= 0) {
40336
+ result.Errors.push(new core_1.ValidationErrorInfo("EntityIDMax", "The maximum entity ID must be greater than zero.", this.EntityIDMax, core_1.ValidationErrorType.Failure));
40318
40337
  }
40319
40338
  }
40320
40339
  /**