@memberjunction/core-entities 2.42.1 → 2.44.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/AIPromptExtended.d.ts +12 -0
- package/dist/custom/AIPromptExtended.d.ts.map +1 -0
- package/dist/custom/AIPromptExtended.js +30 -0
- package/dist/custom/AIPromptExtended.js.map +1 -0
- package/dist/generated/entity_subclasses.d.ts +44 -22
- package/dist/generated/entity_subclasses.d.ts.map +1 -1
- package/dist/generated/entity_subclasses.js +66 -31
- package/dist/generated/entity_subclasses.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/readme.md +268 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationResult } from "@memberjunction/core";
|
|
2
|
+
import { AIPromptEntity } from "../generated/entity_subclasses";
|
|
3
|
+
export declare class AIPromptEntityExtended extends AIPromptEntity {
|
|
4
|
+
/**
|
|
5
|
+
* Fix bug in generated code where new records have a null ID and that matches
|
|
6
|
+
* the ResultSelectorPromptID, which causes a validation error. When that code
|
|
7
|
+
* gets regenerated we can remove this override.
|
|
8
|
+
* @param result
|
|
9
|
+
*/
|
|
10
|
+
ValidateResultSelectorPromptIDNotEqualID(result: ValidationResult): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=AIPromptExtended.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIPromptExtended.d.ts","sourceRoot":"","sources":["../../src/custom/AIPromptExtended.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwD,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAGhE,qBACa,sBAAuB,SAAQ,cAAc;IACtD;;;;;OAKG;IACM,wCAAwC,CAAC,MAAM,EAAE,gBAAgB;CAM7E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AIPromptEntityExtended = void 0;
|
|
10
|
+
const core_1 = require("@memberjunction/core");
|
|
11
|
+
const entity_subclasses_1 = require("../generated/entity_subclasses");
|
|
12
|
+
const global_1 = require("@memberjunction/global");
|
|
13
|
+
let AIPromptEntityExtended = class AIPromptEntityExtended extends entity_subclasses_1.AIPromptEntity {
|
|
14
|
+
/**
|
|
15
|
+
* Fix bug in generated code where new records have a null ID and that matches
|
|
16
|
+
* the ResultSelectorPromptID, which causes a validation error. When that code
|
|
17
|
+
* gets regenerated we can remove this override.
|
|
18
|
+
* @param result
|
|
19
|
+
*/
|
|
20
|
+
ValidateResultSelectorPromptIDNotEqualID(result) {
|
|
21
|
+
if (this.ResultSelectorPromptID === this.ID && this.ID /*make sure ID !== null*/) {
|
|
22
|
+
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));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.AIPromptEntityExtended = AIPromptEntityExtended;
|
|
27
|
+
exports.AIPromptEntityExtended = AIPromptEntityExtended = __decorate([
|
|
28
|
+
(0, global_1.RegisterClass)(core_1.BaseEntity, "AI Prompts")
|
|
29
|
+
], AIPromptEntityExtended);
|
|
30
|
+
//# sourceMappingURL=AIPromptExtended.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIPromptExtended.js","sourceRoot":"","sources":["../../src/custom/AIPromptExtended.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+CAA8G;AAC9G,sEAAgE;AAChE,mDAAuD;AAGhD,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,kCAAc;IACtD;;;;;OAKG;IACM,wCAAwC,CAAC,MAAwB;QACtE,IAAI,IAAI,CAAC,sBAAsB,KAAK,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC,yBAAyB,EAAE,CAAC;YAC/E,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,0BAAmB,CAAC,wBAAwB,EAAE,4GAA4G,EAAE,IAAI,CAAC,sBAAsB,EAAE,0BAAmB,CAAC,OAAO,CAAC,CAAC,CAAC;QAClP,CAAC;IACL,CAAC;CAEJ,CAAA;AAbY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,sBAAa,EAAC,iBAAU,EAAE,YAAY,CAAC;GAC3B,sBAAsB,CAalC"}
|
|
@@ -867,7 +867,7 @@ export declare const AIPromptSchema: z.ZodObject<{
|
|
|
867
867
|
Status: z.ZodUnion<[z.ZodLiteral<"Pending">, z.ZodLiteral<"Active">, z.ZodLiteral<"Disabled">]>;
|
|
868
868
|
__mj_CreatedAt: z.ZodDate;
|
|
869
869
|
__mj_UpdatedAt: z.ZodDate;
|
|
870
|
-
ResponseFormat: z.ZodUnion<[z.ZodLiteral<"Any">, z.ZodLiteral<"Text">, z.ZodLiteral<"Markdown">, z.ZodLiteral<"ModelSpecific">, z.ZodLiteral<"JSON">]>;
|
|
870
|
+
ResponseFormat: z.ZodUnion<[z.ZodLiteral<"Any">, z.ZodLiteral<"Text">, z.ZodLiteral<"Markdown">, z.ZodLiteral<"JSON">, z.ZodLiteral<"ModelSpecific">, z.ZodLiteral<"JSON">]>;
|
|
871
871
|
ModelSpecificResponseFormat: z.ZodNullable<z.ZodString>;
|
|
872
872
|
AIModelTypeID: z.ZodNullable<z.ZodString>;
|
|
873
873
|
MinPowerRank: z.ZodNullable<z.ZodNumber>;
|
|
@@ -910,7 +910,7 @@ export declare const AIPromptSchema: z.ZodObject<{
|
|
|
910
910
|
AIModelType?: string;
|
|
911
911
|
TemplateID?: string;
|
|
912
912
|
TypeID?: string;
|
|
913
|
-
ResponseFormat?: "Any" | "Text" | "Markdown" | "
|
|
913
|
+
ResponseFormat?: "Any" | "Text" | "Markdown" | "JSON" | "ModelSpecific";
|
|
914
914
|
ModelSpecificResponseFormat?: string;
|
|
915
915
|
MinPowerRank?: number;
|
|
916
916
|
SelectionStrategy?: "Default" | "Specific" | "ByPower";
|
|
@@ -949,7 +949,7 @@ export declare const AIPromptSchema: z.ZodObject<{
|
|
|
949
949
|
AIModelType?: string;
|
|
950
950
|
TemplateID?: string;
|
|
951
951
|
TypeID?: string;
|
|
952
|
-
ResponseFormat?: "Any" | "Text" | "Markdown" | "
|
|
952
|
+
ResponseFormat?: "Any" | "Text" | "Markdown" | "JSON" | "ModelSpecific";
|
|
953
953
|
ModelSpecificResponseFormat?: string;
|
|
954
954
|
MinPowerRank?: number;
|
|
955
955
|
SelectionStrategy?: "Default" | "Specific" | "ByPower";
|
|
@@ -2312,8 +2312,8 @@ export declare const DashboardSchema: z.ZodObject<{
|
|
|
2312
2312
|
Thumbnail: z.ZodNullable<z.ZodString>;
|
|
2313
2313
|
Scope: z.ZodUnion<[z.ZodLiteral<"Global">, z.ZodLiteral<"App">]>;
|
|
2314
2314
|
ApplicationID: z.ZodNullable<z.ZodString>;
|
|
2315
|
-
Code: z.ZodNullable<z.ZodString>;
|
|
2316
2315
|
DriverClass: z.ZodNullable<z.ZodString>;
|
|
2316
|
+
Code: z.ZodNullable<z.ZodString>;
|
|
2317
2317
|
User: z.ZodString;
|
|
2318
2318
|
Category: z.ZodNullable<z.ZodString>;
|
|
2319
2319
|
Application: z.ZodNullable<z.ZodString>;
|
|
@@ -3502,6 +3502,7 @@ export declare const EntityFieldSchema: z.ZodObject<{
|
|
|
3502
3502
|
ScopeDefault: z.ZodNullable<z.ZodString>;
|
|
3503
3503
|
AutoUpdateRelatedEntityInfo: z.ZodBoolean;
|
|
3504
3504
|
ValuesToPackWithSchema: z.ZodUnion<[z.ZodLiteral<"Auto">, z.ZodLiteral<"None">, z.ZodLiteral<"All">]>;
|
|
3505
|
+
Status: z.ZodUnion<[z.ZodLiteral<"Active">, z.ZodLiteral<"Deprecated">, z.ZodLiteral<"Disabled">]>;
|
|
3505
3506
|
FieldCodeName: z.ZodNullable<z.ZodString>;
|
|
3506
3507
|
Entity: z.ZodString;
|
|
3507
3508
|
SchemaName: z.ZodString;
|
|
@@ -3522,6 +3523,7 @@ export declare const EntityFieldSchema: z.ZodObject<{
|
|
|
3522
3523
|
__mj_UpdatedAt?: Date;
|
|
3523
3524
|
Name?: string;
|
|
3524
3525
|
Description?: string;
|
|
3526
|
+
Status?: "Active" | "Deprecated" | "Disabled";
|
|
3525
3527
|
DefaultValue?: string;
|
|
3526
3528
|
Type?: string;
|
|
3527
3529
|
EntityID?: string;
|
|
@@ -3579,6 +3581,7 @@ export declare const EntityFieldSchema: z.ZodObject<{
|
|
|
3579
3581
|
__mj_UpdatedAt?: Date;
|
|
3580
3582
|
Name?: string;
|
|
3581
3583
|
Description?: string;
|
|
3584
|
+
Status?: "Active" | "Deprecated" | "Disabled";
|
|
3582
3585
|
DefaultValue?: string;
|
|
3583
3586
|
Type?: string;
|
|
3584
3587
|
EntityID?: string;
|
|
@@ -8460,6 +8463,7 @@ export declare class ActionEntity extends BaseEntity<ActionEntityType> {
|
|
|
8460
8463
|
* @extends {BaseEntity}
|
|
8461
8464
|
* @class
|
|
8462
8465
|
* @public
|
|
8466
|
+
* @deprecated This entity is deprecated and will be removed in a future version. Using it will result in console warnings.
|
|
8463
8467
|
*/
|
|
8464
8468
|
export declare class AIActionEntity extends BaseEntity<AIActionEntityType> {
|
|
8465
8469
|
/**
|
|
@@ -8739,6 +8743,7 @@ export declare class AIAgentLearningCycleEntity extends BaseEntity<AIAgentLearni
|
|
|
8739
8743
|
* @extends {BaseEntity}
|
|
8740
8744
|
* @class
|
|
8741
8745
|
* @public
|
|
8746
|
+
* @deprecated This entity is deprecated and will be removed in a future version. Using it will result in console warnings.
|
|
8742
8747
|
*/
|
|
8743
8748
|
export declare class AIAgentModelEntity extends BaseEntity<AIAgentModelEntityType> {
|
|
8744
8749
|
/**
|
|
@@ -9320,6 +9325,7 @@ export declare class AIAgentEntity extends BaseEntity<AIAgentEntityType> {
|
|
|
9320
9325
|
* @extends {BaseEntity}
|
|
9321
9326
|
* @class
|
|
9322
9327
|
* @public
|
|
9328
|
+
* @deprecated This entity is deprecated and will be removed in a future version. Using it will result in console warnings.
|
|
9323
9329
|
*/
|
|
9324
9330
|
export declare class AIModelActionEntity extends BaseEntity<AIModelActionEntityType> {
|
|
9325
9331
|
/**
|
|
@@ -9805,11 +9811,11 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
|
|
|
9805
9811
|
* 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:
|
|
9806
9812
|
* * 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.
|
|
9807
9813
|
* * CacheTTLSeconds: This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
|
|
9808
|
-
* * 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.
|
|
9809
9814
|
* * 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.
|
|
9810
9815
|
* * Table-Level: This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
|
|
9811
9816
|
* * 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.
|
|
9812
9817
|
* * 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.
|
|
9818
|
+
* * 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.
|
|
9813
9819
|
* @public
|
|
9814
9820
|
* @method
|
|
9815
9821
|
* @override
|
|
@@ -9830,13 +9836,6 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
|
|
|
9830
9836
|
*/
|
|
9831
9837
|
ValidateCacheTTLSecondsGreaterThanZero(result: ValidationResult): void;
|
|
9832
9838
|
/**
|
|
9833
|
-
* This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
9834
|
-
* @param result - the ValidationResult object to add any errors or warnings to
|
|
9835
|
-
* @public
|
|
9836
|
-
* @method
|
|
9837
|
-
*/
|
|
9838
|
-
ValidateResultSelectorPromptIDNotEqualID(result: ValidationResult): void;
|
|
9839
|
-
/**
|
|
9840
9839
|
* 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.
|
|
9841
9840
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
9842
9841
|
* @public
|
|
@@ -9865,6 +9864,13 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
|
|
|
9865
9864
|
*/
|
|
9866
9865
|
ValidateOutputExampleWhenOutputTypeObject(result: ValidationResult): void;
|
|
9867
9866
|
/**
|
|
9867
|
+
* This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
9868
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
9869
|
+
* @public
|
|
9870
|
+
* @method
|
|
9871
|
+
*/
|
|
9872
|
+
ValidateResultSelectorPromptIDNotEqualID(result: ValidationResult): void;
|
|
9873
|
+
/**
|
|
9868
9874
|
* * Field Name: ID
|
|
9869
9875
|
* * Display Name: ID
|
|
9870
9876
|
* * SQL Data Type: uniqueidentifier
|
|
@@ -9948,12 +9954,13 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
|
|
|
9948
9954
|
* * Any
|
|
9949
9955
|
* * Text
|
|
9950
9956
|
* * Markdown
|
|
9957
|
+
* * JSON
|
|
9951
9958
|
* * ModelSpecific
|
|
9952
9959
|
* * JSON
|
|
9953
9960
|
* * Description: Specifies the expected response format for the AI model. Options include Any, Text, Markdown, JSON, and ModelSpecific. Defaults to Any if not specified.
|
|
9954
9961
|
*/
|
|
9955
|
-
get ResponseFormat(): 'Any' | 'Text' | 'Markdown' | 'ModelSpecific' | 'JSON';
|
|
9956
|
-
set ResponseFormat(value: 'Any' | 'Text' | 'Markdown' | 'ModelSpecific' | 'JSON');
|
|
9962
|
+
get ResponseFormat(): 'Any' | 'Text' | 'Markdown' | 'JSON' | 'ModelSpecific' | 'JSON';
|
|
9963
|
+
set ResponseFormat(value: 'Any' | 'Text' | 'Markdown' | 'JSON' | 'ModelSpecific' | 'JSON');
|
|
9957
9964
|
/**
|
|
9958
9965
|
* * Field Name: ModelSpecificResponseFormat
|
|
9959
9966
|
* * Display Name: Model Specific Response Format
|
|
@@ -13874,14 +13881,6 @@ export declare class DashboardEntity extends BaseEntity<DashboardEntityType> {
|
|
|
13874
13881
|
get ApplicationID(): string | null;
|
|
13875
13882
|
set ApplicationID(value: string | null);
|
|
13876
13883
|
/**
|
|
13877
|
-
* * Field Name: Code
|
|
13878
|
-
* * Display Name: Code
|
|
13879
|
-
* * SQL Data Type: nvarchar(255)
|
|
13880
|
-
* * Description: Used to identify the dashboard for code-base dashboards. Allows reuse of the same DriverClass for multiple dashboards that can be rendered differently.
|
|
13881
|
-
*/
|
|
13882
|
-
get Code(): string | null;
|
|
13883
|
-
set Code(value: string | null);
|
|
13884
|
-
/**
|
|
13885
13884
|
* * Field Name: DriverClass
|
|
13886
13885
|
* * Display Name: Driver Class
|
|
13887
13886
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -13890,6 +13889,14 @@ export declare class DashboardEntity extends BaseEntity<DashboardEntityType> {
|
|
|
13890
13889
|
get DriverClass(): string | null;
|
|
13891
13890
|
set DriverClass(value: string | null);
|
|
13892
13891
|
/**
|
|
13892
|
+
* * Field Name: Code
|
|
13893
|
+
* * Display Name: Code
|
|
13894
|
+
* * SQL Data Type: nvarchar(255)
|
|
13895
|
+
* * Description: Used to identify the dashboard for code-base dashboards. Allows reuse of the same DriverClass for multiple dashboards that can be rendered differently.
|
|
13896
|
+
*/
|
|
13897
|
+
get Code(): string | null;
|
|
13898
|
+
set Code(value: string | null);
|
|
13899
|
+
/**
|
|
13893
13900
|
* * Field Name: User
|
|
13894
13901
|
* * Display Name: User
|
|
13895
13902
|
* * SQL Data Type: nvarchar(100)
|
|
@@ -16109,6 +16116,7 @@ export declare class EntityActionEntity extends BaseEntity<EntityActionEntityTyp
|
|
|
16109
16116
|
* @extends {BaseEntity}
|
|
16110
16117
|
* @class
|
|
16111
16118
|
* @public
|
|
16119
|
+
* @deprecated This entity is deprecated and will be removed in a future version. Using it will result in console warnings.
|
|
16112
16120
|
*/
|
|
16113
16121
|
export declare class EntityAIActionEntity extends BaseEntity<EntityAIActionEntityType> {
|
|
16114
16122
|
/**
|
|
@@ -17344,6 +17352,20 @@ export declare class EntityFieldEntity extends BaseEntity<EntityFieldEntityType>
|
|
|
17344
17352
|
get ValuesToPackWithSchema(): 'Auto' | 'None' | 'All';
|
|
17345
17353
|
set ValuesToPackWithSchema(value: 'Auto' | 'None' | 'All');
|
|
17346
17354
|
/**
|
|
17355
|
+
* * Field Name: Status
|
|
17356
|
+
* * Display Name: Status
|
|
17357
|
+
* * SQL Data Type: nvarchar(25)
|
|
17358
|
+
* * Default Value: Active
|
|
17359
|
+
* * Value List Type: List
|
|
17360
|
+
* * Possible Values
|
|
17361
|
+
* * Active
|
|
17362
|
+
* * Deprecated
|
|
17363
|
+
* * Disabled
|
|
17364
|
+
* * Description: Current status of the entity field - Active fields are available for use, Deprecated fields are discouraged but still functional, Disabled fields are not available for use
|
|
17365
|
+
*/
|
|
17366
|
+
get Status(): 'Active' | 'Deprecated' | 'Disabled';
|
|
17367
|
+
set Status(value: 'Active' | 'Deprecated' | 'Disabled');
|
|
17368
|
+
/**
|
|
17347
17369
|
* * Field Name: FieldCodeName
|
|
17348
17370
|
* * Display Name: Field Code Name
|
|
17349
17371
|
* * SQL Data Type: nvarchar(MAX)
|