@memberjunction/core-entities 2.43.0 → 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.
@@ -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" | "ModelSpecific" | "JSON";
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" | "ModelSpecific" | "JSON";
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>;
@@ -9811,11 +9811,11 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
9811
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:
9812
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.
9813
9813
  * * CacheTTLSeconds: This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
9814
- * * 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.
9815
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.
9816
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.
9817
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.
9818
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.
9819
9819
  * @public
9820
9820
  * @method
9821
9821
  * @override
@@ -9836,13 +9836,6 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
9836
9836
  */
9837
9837
  ValidateCacheTTLSecondsGreaterThanZero(result: ValidationResult): void;
9838
9838
  /**
9839
- * This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
9840
- * @param result - the ValidationResult object to add any errors or warnings to
9841
- * @public
9842
- * @method
9843
- */
9844
- ValidateResultSelectorPromptIDNotEqualID(result: ValidationResult): void;
9845
- /**
9846
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.
9847
9840
  * @param result - the ValidationResult object to add any errors or warnings to
9848
9841
  * @public
@@ -9871,6 +9864,13 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
9871
9864
  */
9872
9865
  ValidateOutputExampleWhenOutputTypeObject(result: ValidationResult): void;
9873
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
+ /**
9874
9874
  * * Field Name: ID
9875
9875
  * * Display Name: ID
9876
9876
  * * SQL Data Type: uniqueidentifier
@@ -9954,12 +9954,13 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
9954
9954
  * * Any
9955
9955
  * * Text
9956
9956
  * * Markdown
9957
+ * * JSON
9957
9958
  * * ModelSpecific
9958
9959
  * * JSON
9959
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.
9960
9961
  */
9961
- get ResponseFormat(): 'Any' | 'Text' | 'Markdown' | 'ModelSpecific' | 'JSON';
9962
- 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');
9963
9964
  /**
9964
9965
  * * Field Name: ModelSpecificResponseFormat
9965
9966
  * * Display Name: Model Specific Response Format
@@ -13880,14 +13881,6 @@ export declare class DashboardEntity extends BaseEntity<DashboardEntityType> {
13880
13881
  get ApplicationID(): string | null;
13881
13882
  set ApplicationID(value: string | null);
13882
13883
  /**
13883
- * * Field Name: Code
13884
- * * Display Name: Code
13885
- * * SQL Data Type: nvarchar(255)
13886
- * * Description: Used to identify the dashboard for code-base dashboards. Allows reuse of the same DriverClass for multiple dashboards that can be rendered differently.
13887
- */
13888
- get Code(): string | null;
13889
- set Code(value: string | null);
13890
- /**
13891
13884
  * * Field Name: DriverClass
13892
13885
  * * Display Name: Driver Class
13893
13886
  * * SQL Data Type: nvarchar(255)
@@ -13896,6 +13889,14 @@ export declare class DashboardEntity extends BaseEntity<DashboardEntityType> {
13896
13889
  get DriverClass(): string | null;
13897
13890
  set DriverClass(value: string | null);
13898
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
+ /**
13899
13900
  * * Field Name: User
13900
13901
  * * Display Name: User
13901
13902
  * * SQL Data Type: nvarchar(100)