@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
|
@@ -1049,6 +1049,10 @@ exports.AIAgentSchema = zod_1.z.object({
|
|
|
1049
1049
|
* * Field Name: ContextCompressionPrompt
|
|
1050
1050
|
* * Display Name: Context Compression Prompt
|
|
1051
1051
|
* * SQL Data Type: nvarchar(255)`),
|
|
1052
|
+
Type: zod_1.z.string().describe(`
|
|
1053
|
+
* * Field Name: Type
|
|
1054
|
+
* * Display Name: Type
|
|
1055
|
+
* * SQL Data Type: nvarchar(100)`),
|
|
1052
1056
|
});
|
|
1053
1057
|
/**
|
|
1054
1058
|
* zod schema definition for the entity AI Model Actions
|
|
@@ -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
|
|
@@ -13850,6 +13870,14 @@ let AIAgentEntity = class AIAgentEntity extends core_1.BaseEntity {
|
|
|
13850
13870
|
get ContextCompressionPrompt() {
|
|
13851
13871
|
return this.Get('ContextCompressionPrompt');
|
|
13852
13872
|
}
|
|
13873
|
+
/**
|
|
13874
|
+
* * Field Name: Type
|
|
13875
|
+
* * Display Name: Type
|
|
13876
|
+
* * SQL Data Type: nvarchar(100)
|
|
13877
|
+
*/
|
|
13878
|
+
get Type() {
|
|
13879
|
+
return this.Get('Type');
|
|
13880
|
+
}
|
|
13853
13881
|
};
|
|
13854
13882
|
exports.AIAgentEntity = AIAgentEntity;
|
|
13855
13883
|
exports.AIAgentEntity = AIAgentEntity = __decorate([
|
|
@@ -14537,11 +14565,11 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
14537
14565
|
* 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
14566
|
* * 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
14567
|
* * CacheTTLSeconds: This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
|
|
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
14572
|
* * 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
14573
|
* @public
|
|
14546
14574
|
* @method
|
|
14547
14575
|
* @override
|
|
@@ -14550,11 +14578,11 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
14550
14578
|
const result = super.Validate();
|
|
14551
14579
|
this.ValidateCacheSimilarityThresholdIsBetweenZeroAndOne(result);
|
|
14552
14580
|
this.ValidateCacheTTLSecondsGreaterThanZero(result);
|
|
14581
|
+
this.ValidateResultSelectorPromptIDNotEqualID(result);
|
|
14553
14582
|
this.ValidateCacheSimilarityThresholdRequiredForVectorCache(result);
|
|
14554
14583
|
this.ValidateParallelCountWhenParallelizationModeIsStaticCount(result);
|
|
14555
14584
|
this.ValidateParallelConfigParamRequiredForConfigParamMode(result);
|
|
14556
14585
|
this.ValidateOutputExampleWhenOutputTypeObject(result);
|
|
14557
|
-
this.ValidateResultSelectorPromptIDNotEqualID(result);
|
|
14558
14586
|
return result;
|
|
14559
14587
|
}
|
|
14560
14588
|
/**
|
|
@@ -14580,6 +14608,17 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
14580
14608
|
}
|
|
14581
14609
|
}
|
|
14582
14610
|
/**
|
|
14611
|
+
* This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
14612
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14613
|
+
* @public
|
|
14614
|
+
* @method
|
|
14615
|
+
*/
|
|
14616
|
+
ValidateResultSelectorPromptIDNotEqualID(result) {
|
|
14617
|
+
if (this.ResultSelectorPromptID === this.ID) {
|
|
14618
|
+
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));
|
|
14619
|
+
}
|
|
14620
|
+
}
|
|
14621
|
+
/**
|
|
14583
14622
|
* 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.
|
|
14584
14623
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14585
14624
|
* @public
|
|
@@ -14624,17 +14663,6 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
14624
14663
|
}
|
|
14625
14664
|
}
|
|
14626
14665
|
/**
|
|
14627
|
-
* This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
14628
|
-
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14629
|
-
* @public
|
|
14630
|
-
* @method
|
|
14631
|
-
*/
|
|
14632
|
-
ValidateResultSelectorPromptIDNotEqualID(result) {
|
|
14633
|
-
if (this.ResultSelectorPromptID === this.ID) {
|
|
14634
|
-
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));
|
|
14635
|
-
}
|
|
14636
|
-
}
|
|
14637
|
-
/**
|
|
14638
14666
|
* * Field Name: ID
|
|
14639
14667
|
* * Display Name: ID
|
|
14640
14668
|
* * SQL Data Type: uniqueidentifier
|
|
@@ -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([
|
|
@@ -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');
|