@memberjunction/actions 1.8.0 → 2.0.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/entity-actions/EntityActionEngine.d.ts +40 -6
- package/dist/entity-actions/EntityActionEngine.d.ts.map +1 -1
- package/dist/entity-actions/EntityActionEngine.js +19 -2
- package/dist/entity-actions/EntityActionEngine.js.map +1 -1
- package/dist/entity-actions/EntityActionEntity.server.d.ts +3 -1
- package/dist/entity-actions/EntityActionEntity.server.d.ts.map +1 -1
- package/dist/entity-actions/EntityActionEntity.server.js +8 -0
- package/dist/entity-actions/EntityActionEntity.server.js.map +1 -1
- package/dist/entity-actions/EntityActionInvocationTypes.d.ts +38 -7
- package/dist/entity-actions/EntityActionInvocationTypes.d.ts.map +1 -1
- package/dist/entity-actions/EntityActionInvocationTypes.js +157 -17
- package/dist/entity-actions/EntityActionInvocationTypes.js.map +1 -1
- package/dist/generic/ActionEngine.d.ts +1 -1
- package/dist/generic/ActionEngine.js +1 -1
- package/dist/generic/ActionEntity.server.d.ts +4 -3
- package/dist/generic/ActionEntity.server.d.ts.map +1 -1
- package/dist/generic/ActionEntity.server.js +95 -81
- package/dist/generic/ActionEntity.server.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseEngine, BaseEntity, UserInfo } from "@memberjunction/core";
|
|
2
|
-
import { EntityActionFilterEntity, EntityActionInvocationEntity, EntityActionInvocationTypeEntity } from "@memberjunction/core-entities";
|
|
2
|
+
import { ActionExecutionLogEntity, ActionResultCodeEntity, EntityActionFilterEntity, EntityActionInvocationEntity, EntityActionInvocationTypeEntity, EntityActionParamEntity } from "@memberjunction/core-entities";
|
|
3
3
|
import { EntityActionEntityServer } from "./EntityActionEntity.server";
|
|
4
|
-
import {
|
|
4
|
+
import { ActionParam, RunActionParams } from "../generic/ActionEngine";
|
|
5
5
|
/**
|
|
6
6
|
* Parameters type for invoking an entity action
|
|
7
7
|
*/
|
|
@@ -25,11 +25,40 @@ export declare class EntityActionInvocationParams {
|
|
|
25
25
|
/**
|
|
26
26
|
* If the invocation type is view-oriented, this parameter will be needed
|
|
27
27
|
*/
|
|
28
|
-
ViewID?:
|
|
28
|
+
ViewID?: string;
|
|
29
29
|
/**
|
|
30
30
|
* If the invocation type is list-oriented, this parameter will be needed
|
|
31
31
|
*/
|
|
32
|
-
ListID?:
|
|
32
|
+
ListID?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Class that has the result of a complete action execution, returned by the Run method of the ActionEngine.
|
|
36
|
+
*/
|
|
37
|
+
export declare class EntityActionResult {
|
|
38
|
+
/**
|
|
39
|
+
* Contains the parameters that were used to run the action as a convenience.
|
|
40
|
+
*/
|
|
41
|
+
RunParams: RunActionParams;
|
|
42
|
+
/**
|
|
43
|
+
* Indicates if the action was successful or not.
|
|
44
|
+
*/
|
|
45
|
+
Success: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* A code that indicates the outcome of the action. Will be one of the possible ResultCodes enumerated in the ActionResultCodeEntity
|
|
48
|
+
*/
|
|
49
|
+
Result?: ActionResultCodeEntity;
|
|
50
|
+
/**
|
|
51
|
+
* Whenever an action is executed a log entry is created. This log entry is stored in the database and can be used to track the execution of the action. This property contains the log entry object for the action that was run.
|
|
52
|
+
*/
|
|
53
|
+
LogEntry: ActionExecutionLogEntity;
|
|
54
|
+
/**
|
|
55
|
+
* Optional, a message an action can include that describes the outcome of the action. This is typically used to display a message to the user.
|
|
56
|
+
*/
|
|
57
|
+
Message?: string;
|
|
58
|
+
/**
|
|
59
|
+
* All parameters including inputs and outputs are provided here for convenience
|
|
60
|
+
*/
|
|
61
|
+
Params?: ActionParam[];
|
|
33
62
|
}
|
|
34
63
|
/**
|
|
35
64
|
* The purpose of this class is to handle the invocation of actions for entities in all of the supported invocation contexts.
|
|
@@ -37,6 +66,7 @@ export declare class EntityActionInvocationParams {
|
|
|
37
66
|
export declare class EntityActionEngine extends BaseEngine<EntityActionEngine> {
|
|
38
67
|
static get Instance(): EntityActionEngine;
|
|
39
68
|
private _EntityActions;
|
|
69
|
+
private _EntityActionParams;
|
|
40
70
|
private _EntityActionInvocationTypes;
|
|
41
71
|
private _EntityActionFilters;
|
|
42
72
|
private _EntityActionInvocations;
|
|
@@ -63,6 +93,10 @@ export declare class EntityActionEngine extends BaseEngine<EntityActionEngine> {
|
|
|
63
93
|
* List of all the Entity Action objects that are available for use in the system. Make sure you call Config() before any other methods on this class.
|
|
64
94
|
*/
|
|
65
95
|
get EntityActions(): EntityActionEntityServer[];
|
|
96
|
+
/**
|
|
97
|
+
* List of all of the Entity Action Params that are available for use in the system. Make sure you call Config() before any other methods on this class.
|
|
98
|
+
*/
|
|
99
|
+
get Params(): EntityActionParamEntity[];
|
|
66
100
|
/**
|
|
67
101
|
* Helper method to get the EntityActionEntityServer object for a given entity name
|
|
68
102
|
* @param entityName
|
|
@@ -75,7 +109,7 @@ export declare class EntityActionEngine extends BaseEngine<EntityActionEngine> {
|
|
|
75
109
|
* @param entityID
|
|
76
110
|
* @returns
|
|
77
111
|
*/
|
|
78
|
-
GetActionsByEntityID(entityID:
|
|
112
|
+
GetActionsByEntityID(entityID: string): EntityActionEntityServer[];
|
|
79
113
|
/**
|
|
80
114
|
* Helper method to get the EntityActionEntityServer object for a given entity name and invocation type
|
|
81
115
|
* @param entityName
|
|
@@ -89,6 +123,6 @@ export declare class EntityActionEngine extends BaseEngine<EntityActionEngine> {
|
|
|
89
123
|
* @param params Parameters for the action invocation
|
|
90
124
|
* @returns
|
|
91
125
|
*/
|
|
92
|
-
RunEntityAction(params: EntityActionInvocationParams): Promise<
|
|
126
|
+
RunEntityAction(params: EntityActionInvocationParams): Promise<EntityActionResult>;
|
|
93
127
|
}
|
|
94
128
|
//# sourceMappingURL=EntityActionEngine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityActionEngine.d.ts","sourceRoot":"","sources":["../../src/entity-actions/EntityActionEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA4B,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"EntityActionEngine.d.ts","sourceRoot":"","sources":["../../src/entity-actions/EntityActionEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA4B,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,gCAAgC,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAEpN,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,WAAW,EAAgB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAErF;;GAEG;AACH,qBAAa,4BAA4B;IACrC;;OAEG;IACI,YAAY,EAAE,wBAAwB,CAAC;IAE9C;;OAEG;IACI,cAAc,EAAE,gCAAgC,CAAC;IAExD;;OAEG;IACI,WAAW,CAAC,EAAE,QAAQ,CAAC;IAE9B;;OAEG;IACI,YAAY,CAAC,EAAE,UAAU,CAAC;IACjC;;OAEG;IACI,MAAM,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACI,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAID;;GAEG;AACH,qBAAa,kBAAkB;IAC3B;;OAEG;IACI,SAAS,EAAE,eAAe,CAAC;IAElC;;OAEG;IACI,OAAO,EAAE,OAAO,CAAC;IAExB;;OAEG;IACI,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAEvC;;OAEG;IACI,QAAQ,EAAE,wBAAwB,CAAC;IAE1C;;OAEG;IACI,OAAO,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACI,MAAM,CAAC,EAA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, "__esModule", { value: true });
|
|
3
|
-
exports.EntityActionEngine = exports.EntityActionInvocationParams = void 0;
|
|
3
|
+
exports.EntityActionEngine = exports.EntityActionResult = exports.EntityActionInvocationParams = void 0;
|
|
4
4
|
const core_1 = require("@memberjunction/core");
|
|
5
5
|
const global_1 = require("@memberjunction/global");
|
|
6
6
|
const EntityActionInvocationTypes_1 = require("./EntityActionInvocationTypes");
|
|
@@ -10,6 +10,12 @@ const EntityActionInvocationTypes_1 = require("./EntityActionInvocationTypes");
|
|
|
10
10
|
class EntityActionInvocationParams {
|
|
11
11
|
}
|
|
12
12
|
exports.EntityActionInvocationParams = EntityActionInvocationParams;
|
|
13
|
+
/**
|
|
14
|
+
* Class that has the result of a complete action execution, returned by the Run method of the ActionEngine.
|
|
15
|
+
*/
|
|
16
|
+
class EntityActionResult {
|
|
17
|
+
}
|
|
18
|
+
exports.EntityActionResult = EntityActionResult;
|
|
13
19
|
/**
|
|
14
20
|
* The purpose of this class is to handle the invocation of actions for entities in all of the supported invocation contexts.
|
|
15
21
|
*/
|
|
@@ -18,6 +24,7 @@ class EntityActionEngine extends core_1.BaseEngine {
|
|
|
18
24
|
super(...arguments);
|
|
19
25
|
// internal instance properties used for the singleton pattern
|
|
20
26
|
this._EntityActions = [];
|
|
27
|
+
this._EntityActionParams = [];
|
|
21
28
|
this._EntityActionInvocationTypes = [];
|
|
22
29
|
this._EntityActionFilters = [];
|
|
23
30
|
this._EntityActionInvocations = [];
|
|
@@ -46,8 +53,12 @@ class EntityActionEngine extends core_1.BaseEngine {
|
|
|
46
53
|
PropertyName: '_EntityActionInvocations'
|
|
47
54
|
},
|
|
48
55
|
{
|
|
49
|
-
EntityName: 'Entity Actions',
|
|
56
|
+
EntityName: 'Entity Actions', // sub-class for this will handle dynamic loading of filters, invocations, and params when needed by callers of those read-only properties
|
|
50
57
|
PropertyName: '_EntityActions'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
EntityName: 'Entity Action Params',
|
|
61
|
+
PropertyName: '_EntityActionParams'
|
|
51
62
|
}
|
|
52
63
|
];
|
|
53
64
|
await this.Load(configs, forceRefresh, contextUser);
|
|
@@ -76,6 +87,12 @@ class EntityActionEngine extends core_1.BaseEngine {
|
|
|
76
87
|
get EntityActions() {
|
|
77
88
|
return this._EntityActions;
|
|
78
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* List of all of the Entity Action Params that are available for use in the system. Make sure you call Config() before any other methods on this class.
|
|
92
|
+
*/
|
|
93
|
+
get Params() {
|
|
94
|
+
return this._EntityActionParams;
|
|
95
|
+
}
|
|
79
96
|
/**
|
|
80
97
|
* Helper method to get the EntityActionEntityServer object for a given entity name
|
|
81
98
|
* @param entityName
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityActionEngine.js","sourceRoot":"","sources":["../../src/entity-actions/EntityActionEngine.ts"],"names":[],"mappings":";;;AAAA,+CAAkG;AAElG,mDAAkD;AAElD,+EAA2E;AAG3E;;GAEG;AACH,MAAa,4BAA4B;CA4BxC;AA5BD,oEA4BC;
|
|
1
|
+
{"version":3,"file":"EntityActionEngine.js","sourceRoot":"","sources":["../../src/entity-actions/EntityActionEngine.ts"],"names":[],"mappings":";;;AAAA,+CAAkG;AAElG,mDAAkD;AAElD,+EAA2E;AAG3E;;GAEG;AACH,MAAa,4BAA4B;CA4BxC;AA5BD,oEA4BC;AAID;;GAEG;AACH,MAAa,kBAAkB;CA8B7B;AA9BF,gDA8BE;AAEF;;GAEG;AACH,MAAa,kBAAmB,SAAQ,iBAA8B;IAAtE;;QAMI,8DAA8D;QACtD,mBAAc,GAA+B,EAAE,CAAC;QAChD,wBAAmB,GAA8B,EAAE,CAAC;QACpD,iCAA4B,GAAuC,EAAE,CAAC;QACtE,yBAAoB,GAA+B,EAAE,CAAC;QACtD,6BAAwB,GAAmC,EAAE,CAAC;IAoI1E,CAAC;IA9IU,MAAM,KAAK,QAAQ;QACtB,OAAO,KAAK,CAAC,WAAW,EAAsB,CAAC;IAC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B;YACnB,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAElE,8CAA8C;QAC9C,OAAO,kBAAkB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;CAEJ;AA/ID,gDA+IC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { UserInfo } from "@memberjunction/core";
|
|
2
|
-
import { EntityActionEntity, EntityActionFilterEntity, EntityActionInvocationEntity } from "@memberjunction/core-entities";
|
|
2
|
+
import { EntityActionEntity, EntityActionFilterEntity, EntityActionInvocationEntity, EntityActionParamEntity } from "@memberjunction/core-entities";
|
|
3
3
|
export declare class EntityActionEntityServer extends EntityActionEntity {
|
|
4
4
|
private _filters;
|
|
5
5
|
private _invocations;
|
|
6
|
+
private _params;
|
|
6
7
|
/**
|
|
7
8
|
* Get the filters for this entity action
|
|
8
9
|
*/
|
|
@@ -11,6 +12,7 @@ export declare class EntityActionEntityServer extends EntityActionEntity {
|
|
|
11
12
|
* Get the invocations for this entity action
|
|
12
13
|
*/
|
|
13
14
|
get Invocations(): EntityActionInvocationEntity[];
|
|
15
|
+
get Params(): EntityActionParamEntity[];
|
|
14
16
|
/**
|
|
15
17
|
* Override the base class Config in order to ensure that EntityActionEngine is configured
|
|
16
18
|
* @param contextUser
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityActionEntity.server.d.ts","sourceRoot":"","sources":["../../src/entity-actions/EntityActionEntity.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"EntityActionEntity.server.d.ts","sourceRoot":"","sources":["../../src/entity-actions/EntityActionEntity.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAIpJ,qBACa,wBAAyB,SAAQ,kBAAkB;IAC5D,OAAO,CAAC,QAAQ,CAAoC;IACpD,OAAO,CAAC,YAAY,CAAwC;IAC5D,OAAO,CAAC,OAAO,CAAmC;IAElD;;OAEG;IACH,IAAW,OAAO,IAAI,wBAAwB,EAAE,CAM/C;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,4BAA4B,EAAE,CAMvD;IAED,IAAW,MAAM,IAAI,uBAAuB,EAAE,CAM7C;IAGD;;;OAGG;IACmB,MAAM,CAAC,WAAW,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAKrE"}
|
|
@@ -16,6 +16,7 @@ let EntityActionEntityServer = class EntityActionEntityServer extends core_entit
|
|
|
16
16
|
super(...arguments);
|
|
17
17
|
this._filters = null;
|
|
18
18
|
this._invocations = null;
|
|
19
|
+
this._params = null;
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* Get the filters for this entity action
|
|
@@ -37,6 +38,13 @@ let EntityActionEntityServer = class EntityActionEntityServer extends core_entit
|
|
|
37
38
|
}
|
|
38
39
|
return this._invocations;
|
|
39
40
|
}
|
|
41
|
+
get Params() {
|
|
42
|
+
if (!this._params) {
|
|
43
|
+
// load the data from the EntityActionEngine
|
|
44
|
+
this._params = EntityActionEngine_1.EntityActionEngine.Instance.Params?.filter(p => p.EntityActionID === this.ID) ?? [];
|
|
45
|
+
}
|
|
46
|
+
return this._params;
|
|
47
|
+
}
|
|
40
48
|
/**
|
|
41
49
|
* Override the base class Config in order to ensure that EntityActionEngine is configured
|
|
42
50
|
* @param contextUser
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityActionEntity.server.js","sourceRoot":"","sources":["../../src/entity-actions/EntityActionEntity.server.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+CAA4D;AAC5D,
|
|
1
|
+
{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CAAC;QACvG,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAGD;;;OAGG;IACa,KAAK,CAAC,MAAM,CAAC,WAAqB;QAC9C,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAC1B,uCAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,mKAAmK;QACnK,uGAAuG;IACnK,CAAC;CACJ,CAAA;AA7CY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,sBAAa,EAAC,iBAAU,EAAE,gBAAgB,CAAC;GAC/B,wBAAwB,CA6CpC"}
|
|
@@ -1,29 +1,60 @@
|
|
|
1
|
-
import { EntityActionInvocationParams } from "./EntityActionEngine";
|
|
2
|
-
import { ActionResult } from "../generic/ActionEngine";
|
|
3
|
-
import { ActionParamEntity } from "@memberjunction/core-entities";
|
|
1
|
+
import { EntityActionInvocationParams, EntityActionResult } from "./EntityActionEngine";
|
|
2
|
+
import { ActionParam, ActionResult } from "../generic/ActionEngine";
|
|
3
|
+
import { ActionParamEntity, EntityActionParamEntity } from "@memberjunction/core-entities";
|
|
4
|
+
import { BaseEntity } from "@memberjunction/core";
|
|
4
5
|
/**
|
|
5
6
|
* Base class for invocation of any entity action invocation type
|
|
6
7
|
*/
|
|
7
8
|
export declare abstract class EntityActionInvocationBase {
|
|
8
|
-
abstract InvokeAction(params: EntityActionInvocationParams): Promise<
|
|
9
|
+
abstract InvokeAction(params: EntityActionInvocationParams): Promise<EntityActionResult>;
|
|
9
10
|
/**
|
|
10
11
|
* Case insensitive helper method to find a param by valueType
|
|
11
12
|
* @param allParams
|
|
12
13
|
* @param valueType
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
+
FindActionParam(allParams: ActionParamEntity[], valueType: "Scalar" | "Simple Object" | "BaseEntity Sub-Class" | "Other"): ActionParamEntity;
|
|
16
|
+
MapActionResultToEntityActionResult(result: ActionResult): EntityActionResult;
|
|
17
|
+
/**
|
|
18
|
+
* This method will map the Entity Action Params to the Action Params and where needed evaluate scripts to get the run-time values that need
|
|
19
|
+
* to get passed to the Action.
|
|
20
|
+
* @param params
|
|
21
|
+
* @param entityActionParams
|
|
22
|
+
* @param entityObject
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
MapParams(params: ActionParamEntity[], entityActionParams: EntityActionParamEntity[], entityObject: BaseEntity): Promise<ActionParam[]>;
|
|
26
|
+
private _scriptCache;
|
|
27
|
+
/**
|
|
28
|
+
* Attempt to execute a script and wraps in try/catch to handle any errors so that no exceptions are thrown
|
|
29
|
+
* The scripts are passed an object called EntityActionContext which has a property called entityObject that is the entity object
|
|
30
|
+
* for the current Entity Action. The script can do whatever it wants to do, and passes back a value in the result property of the EntityActionContext object
|
|
31
|
+
* @param scriptText the script to execute
|
|
32
|
+
* @param entityObject the entity object to pass to the script
|
|
33
|
+
*/
|
|
34
|
+
SafeEvalScript(EntityActionID: string, scriptText: string, entityObject: BaseEntity): Promise<any>;
|
|
15
35
|
}
|
|
16
36
|
/**
|
|
17
37
|
* Base class for invocation of any entity action invocation type that is single record oriented
|
|
18
38
|
*/
|
|
19
39
|
export declare class EntityActionInvocationSingleRecord extends EntityActionInvocationBase {
|
|
20
40
|
ValidateParams(params: EntityActionInvocationParams): Promise<boolean>;
|
|
21
|
-
InvokeAction(params: EntityActionInvocationParams): Promise<
|
|
41
|
+
InvokeAction(params: EntityActionInvocationParams): Promise<EntityActionResult>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Base class for invocation of any entity action invocation type that is multiple-record oriented. Handles
|
|
45
|
+
* getting the list of records from the provided parameters (either ListID or ViewID), getting the actual records
|
|
46
|
+
* for each of those scenarios, and then invoking the action for each record, aggregating the results and returning
|
|
47
|
+
* a single ActionResult object.
|
|
48
|
+
*/
|
|
49
|
+
export declare class EntityActionInvocationMultipleRecords extends EntityActionInvocationBase {
|
|
50
|
+
ValidateParams(params: EntityActionInvocationParams): Promise<boolean>;
|
|
51
|
+
InvokeAction(params: EntityActionInvocationParams): Promise<EntityActionResult>;
|
|
52
|
+
protected GetRecordList(): Promise<BaseEntity[]>;
|
|
22
53
|
}
|
|
23
54
|
/**
|
|
24
55
|
* This class handles the invocation type of Validate and uses Entity Actions to validate a record and provide the results back to the caller
|
|
25
56
|
*/
|
|
26
57
|
export declare class EntityActionInvocationValidate extends EntityActionInvocationSingleRecord {
|
|
27
|
-
InvokeAction(params: EntityActionInvocationParams): Promise<
|
|
58
|
+
InvokeAction(params: EntityActionInvocationParams): Promise<EntityActionResult>;
|
|
28
59
|
}
|
|
29
60
|
//# sourceMappingURL=EntityActionInvocationTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityActionInvocationTypes.d.ts","sourceRoot":"","sources":["../../src/entity-actions/EntityActionInvocationTypes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"EntityActionInvocationTypes.d.ts","sourceRoot":"","sources":["../../src/entity-actions/EntityActionInvocationTypes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAgB,WAAW,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,8BAAsB,0BAA0B;aAC5B,YAAY,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAE/F;;;;OAIG;IACI,eAAe,CAAC,SAAS,EAAE,iBAAiB,EAAE,EAAE,SAAS,EAAE,QAAQ,GAAG,eAAe,GAAG,sBAAsB,GAAG,OAAO,GAAG,iBAAiB;IAI5I,mCAAmC,CAAC,MAAM,EAAE,YAAY,GAAG,kBAAkB;IASpF;;;;;;;OAOG;IACU,SAAS,CAAC,MAAM,EAAE,iBAAiB,EAAE,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,EAAE,YAAY,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAsCpJ,OAAO,CAAC,YAAY,CAAsD;IAE1E;;;;;;OAMG;IACU,cAAc,CAAC,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;CA0BlH;AAED;;GAEG;AACH,qBAQa,kCAAmC,SAAQ,0BAA0B;IACjE,cAAc,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,OAAO,CAAC;IAQtE,YAAY,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA2B/F;AAED;;;;;GAKG;AACH,qBAEa,qCAAsC,SAAQ,0BAA0B;IACpE,cAAc,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,OAAO,CAAC;IAgBtE,YAAY,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,kBAAkB,CAAC;cAqC5E,aAAa,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;CAGzD;AAED;;GAEG;AACH,qBACa,8BAA+B,SAAQ,kCAAkC;IAC5D,YAAY,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAwBxG"}
|
|
@@ -6,21 +6,103 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.EntityActionInvocationValidate = exports.EntityActionInvocationSingleRecord = exports.EntityActionInvocationBase = void 0;
|
|
9
|
+
exports.EntityActionInvocationValidate = exports.EntityActionInvocationMultipleRecords = exports.EntityActionInvocationSingleRecord = exports.EntityActionInvocationBase = void 0;
|
|
10
10
|
const global_1 = require("@memberjunction/global");
|
|
11
11
|
const ActionEngine_1 = require("../generic/ActionEngine");
|
|
12
12
|
/**
|
|
13
13
|
* Base class for invocation of any entity action invocation type
|
|
14
14
|
*/
|
|
15
15
|
class EntityActionInvocationBase {
|
|
16
|
+
constructor() {
|
|
17
|
+
this._scriptCache = new Map();
|
|
18
|
+
}
|
|
16
19
|
/**
|
|
17
20
|
* Case insensitive helper method to find a param by valueType
|
|
18
21
|
* @param allParams
|
|
19
22
|
* @param valueType
|
|
20
23
|
*/
|
|
21
|
-
|
|
24
|
+
FindActionParam(allParams, valueType) {
|
|
22
25
|
return allParams.find(p => p.ValueType.trim().toLowerCase() === valueType.trim().toLowerCase());
|
|
23
26
|
}
|
|
27
|
+
MapActionResultToEntityActionResult(result) {
|
|
28
|
+
return {
|
|
29
|
+
Success: result.Success,
|
|
30
|
+
Message: result.Message,
|
|
31
|
+
RunParams: result.RunParams,
|
|
32
|
+
LogEntry: result.LogEntry
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* This method will map the Entity Action Params to the Action Params and where needed evaluate scripts to get the run-time values that need
|
|
37
|
+
* to get passed to the Action.
|
|
38
|
+
* @param params
|
|
39
|
+
* @param entityActionParams
|
|
40
|
+
* @param entityObject
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
async MapParams(params, entityActionParams, entityObject) {
|
|
44
|
+
const returnValues = [];
|
|
45
|
+
for (const eap of entityActionParams) {
|
|
46
|
+
const param = params.find(p => p.ID === eap.ActionParamID);
|
|
47
|
+
let value = null;
|
|
48
|
+
switch (eap.ValueType) {
|
|
49
|
+
case 'Static':
|
|
50
|
+
// value could be a scalar or could be JSON. if JSON, we need to parse it so attempt to parse it and if we get a non-null value
|
|
51
|
+
// back then we use that, otherwise we use the original value
|
|
52
|
+
const jsonValue = (0, global_1.SafeJSONParse)(eap.Value);
|
|
53
|
+
if (jsonValue)
|
|
54
|
+
value = jsonValue;
|
|
55
|
+
else
|
|
56
|
+
value = eap.Value;
|
|
57
|
+
break;
|
|
58
|
+
case 'Entity Object':
|
|
59
|
+
value = entityObject;
|
|
60
|
+
break;
|
|
61
|
+
case 'Entity Field':
|
|
62
|
+
value = entityObject[eap.Value];
|
|
63
|
+
break;
|
|
64
|
+
case 'Script':
|
|
65
|
+
value = await this.SafeEvalScript(eap.ID, eap.Value, entityObject);
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
returnValues.push({
|
|
69
|
+
Name: param.Name,
|
|
70
|
+
Value: value
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return returnValues;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Attempt to execute a script and wraps in try/catch to handle any errors so that no exceptions are thrown
|
|
77
|
+
* The scripts are passed an object called EntityActionContext which has a property called entityObject that is the entity object
|
|
78
|
+
* for the current Entity Action. The script can do whatever it wants to do, and passes back a value in the result property of the EntityActionContext object
|
|
79
|
+
* @param scriptText the script to execute
|
|
80
|
+
* @param entityObject the entity object to pass to the script
|
|
81
|
+
*/
|
|
82
|
+
async SafeEvalScript(EntityActionID, scriptText, entityObject) {
|
|
83
|
+
const entityActionContext = {
|
|
84
|
+
entityObject,
|
|
85
|
+
result: null
|
|
86
|
+
};
|
|
87
|
+
try {
|
|
88
|
+
let scriptFunction;
|
|
89
|
+
if (this._scriptCache.has(EntityActionID)) {
|
|
90
|
+
scriptFunction = this._scriptCache.get(EntityActionID);
|
|
91
|
+
}
|
|
92
|
+
else
|
|
93
|
+
scriptFunction = new Function('EntityActionContext', `
|
|
94
|
+
return (async () => {
|
|
95
|
+
${scriptText}
|
|
96
|
+
})();
|
|
97
|
+
`);
|
|
98
|
+
const ret = await scriptFunction(entityActionContext);
|
|
99
|
+
return ret || entityActionContext.result;
|
|
100
|
+
}
|
|
101
|
+
catch (e) {
|
|
102
|
+
console.error(`Error executing script: ${e.message}`);
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
24
106
|
}
|
|
25
107
|
exports.EntityActionInvocationBase = EntityActionInvocationBase;
|
|
26
108
|
/**
|
|
@@ -40,19 +122,17 @@ let EntityActionInvocationSingleRecord = class EntityActionInvocationSingleRecor
|
|
|
40
122
|
// now do the work
|
|
41
123
|
// get the class that is derived from BaseAction for the Action Name
|
|
42
124
|
await ActionEngine_1.ActionEngine.Instance.Config(false, params.ContextUser);
|
|
125
|
+
// prepare the variables for the action
|
|
43
126
|
const action = ActionEngine_1.ActionEngine.Instance.Actions.find(a => a.ID === params.EntityAction.ActionID);
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
127
|
+
const internalParams = await this.MapParams(action.Params, params.EntityAction.Params, params.EntityObject);
|
|
128
|
+
const filters = params.EntityAction.Filters.map(f => {
|
|
129
|
+
const filter = ActionEngine_1.ActionEngine.Instance.ActionFilters.find(fi => fi.ID === f.ActionFilterID);
|
|
130
|
+
return filter;
|
|
131
|
+
});
|
|
49
132
|
const result = await ActionEngine_1.ActionEngine.Instance.RunAction({
|
|
50
133
|
Action: action,
|
|
51
134
|
ContextUser: params.ContextUser,
|
|
52
|
-
Filters:
|
|
53
|
-
const filter = ActionEngine_1.ActionEngine.Instance.ActionFilters.find(fi => fi.ID === f.ActionFilterID);
|
|
54
|
-
return filter;
|
|
55
|
-
}),
|
|
135
|
+
Filters: filters,
|
|
56
136
|
Params: internalParams
|
|
57
137
|
});
|
|
58
138
|
return result;
|
|
@@ -69,8 +149,72 @@ exports.EntityActionInvocationSingleRecord = EntityActionInvocationSingleRecord
|
|
|
69
149
|
(0, global_1.RegisterClass)(EntityActionInvocationBase, 'BeforeDelete'),
|
|
70
150
|
(0, global_1.RegisterClass)(EntityActionInvocationBase, 'AfterCreate'),
|
|
71
151
|
(0, global_1.RegisterClass)(EntityActionInvocationBase, 'AfterUpdate'),
|
|
72
|
-
(0, global_1.RegisterClass)(EntityActionInvocationBase, 'AfterDelete')
|
|
152
|
+
(0, global_1.RegisterClass)(EntityActionInvocationBase, 'AfterDelete'),
|
|
153
|
+
(0, global_1.RegisterClass)(EntityActionInvocationBase, 'SingleRecord')
|
|
73
154
|
], EntityActionInvocationSingleRecord);
|
|
155
|
+
/**
|
|
156
|
+
* Base class for invocation of any entity action invocation type that is multiple-record oriented. Handles
|
|
157
|
+
* getting the list of records from the provided parameters (either ListID or ViewID), getting the actual records
|
|
158
|
+
* for each of those scenarios, and then invoking the action for each record, aggregating the results and returning
|
|
159
|
+
* a single ActionResult object.
|
|
160
|
+
*/
|
|
161
|
+
let EntityActionInvocationMultipleRecords = class EntityActionInvocationMultipleRecords extends EntityActionInvocationBase {
|
|
162
|
+
async ValidateParams(params) {
|
|
163
|
+
// for this type of invocation we need to validate that the EntityObject is not null
|
|
164
|
+
const invoType = params.InvocationType.Name.trim().toLowerCase();
|
|
165
|
+
if (invoType === 'list' && !params.ListID) {
|
|
166
|
+
throw new Error('ListID is required for multiple record invocation when InvocationType=List');
|
|
167
|
+
}
|
|
168
|
+
else if (invoType === 'view' && !params.ViewID) {
|
|
169
|
+
throw new Error('ViewID is required for multiple record invocation when InvocationType=View');
|
|
170
|
+
}
|
|
171
|
+
else if (invoType !== 'list' && invoType !== 'view') {
|
|
172
|
+
throw new Error('This class only supports invocation types of List or View.');
|
|
173
|
+
}
|
|
174
|
+
else
|
|
175
|
+
return true;
|
|
176
|
+
}
|
|
177
|
+
async InvokeAction(params) {
|
|
178
|
+
// for this type of invocation we need to validate that we have either a list or a view
|
|
179
|
+
if (this.ValidateParams(params)) {
|
|
180
|
+
// now do the work
|
|
181
|
+
// get the class that is derived from BaseAction for the Action Name
|
|
182
|
+
await ActionEngine_1.ActionEngine.Instance.Config(false, params.ContextUser);
|
|
183
|
+
// prepare the variables for the action
|
|
184
|
+
const action = ActionEngine_1.ActionEngine.Instance.Actions.find(a => a.ID === params.EntityAction.ActionID);
|
|
185
|
+
// get the priority sub-class for the SingleRecord invocation type that we need now
|
|
186
|
+
const invocationInstance = global_1.MJGlobal.Instance.ClassFactory.CreateInstance(EntityActionInvocationBase, 'SingleRecord'); // get the single record class
|
|
187
|
+
if (!invocationInstance)
|
|
188
|
+
throw new Error('Error creating instance of invocation type');
|
|
189
|
+
// now, we loop through the list of records and invoke the action for each one
|
|
190
|
+
const recordList = await this.GetRecordList();
|
|
191
|
+
const results = [];
|
|
192
|
+
for (const record of recordList) {
|
|
193
|
+
const innerParams = { ...params };
|
|
194
|
+
innerParams.EntityObject = record;
|
|
195
|
+
const result = await invocationInstance.InvokeAction(innerParams);
|
|
196
|
+
results.push(result);
|
|
197
|
+
}
|
|
198
|
+
const consolidatedResult = {
|
|
199
|
+
Success: results.every(r => r.Success),
|
|
200
|
+
Message: results.map(r => r.Message).join('\n'),
|
|
201
|
+
RunParams: null,
|
|
202
|
+
LogEntry: null
|
|
203
|
+
};
|
|
204
|
+
return consolidatedResult;
|
|
205
|
+
}
|
|
206
|
+
else
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
async GetRecordList() {
|
|
210
|
+
return [];
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
exports.EntityActionInvocationMultipleRecords = EntityActionInvocationMultipleRecords;
|
|
214
|
+
exports.EntityActionInvocationMultipleRecords = EntityActionInvocationMultipleRecords = __decorate([
|
|
215
|
+
(0, global_1.RegisterClass)(EntityActionInvocationBase, 'List'),
|
|
216
|
+
(0, global_1.RegisterClass)(EntityActionInvocationBase, 'View')
|
|
217
|
+
], EntityActionInvocationMultipleRecords);
|
|
74
218
|
/**
|
|
75
219
|
* This class handles the invocation type of Validate and uses Entity Actions to validate a record and provide the results back to the caller
|
|
76
220
|
*/
|
|
@@ -81,11 +225,7 @@ let EntityActionInvocationValidate = class EntityActionInvocationValidate extend
|
|
|
81
225
|
// make sure the action engine is good to go, the below won't do anything if it was already configured
|
|
82
226
|
await ActionEngine_1.ActionEngine.Instance.Config(false, params.ContextUser);
|
|
83
227
|
const action = ActionEngine_1.ActionEngine.Instance.Actions.find(a => a.ID === params.EntityAction.ActionID);
|
|
84
|
-
const
|
|
85
|
-
const internalParams = [{
|
|
86
|
-
Name: param.Name, // parameter could be named anything, but we know it's the base entity sub-class so we are using it here
|
|
87
|
-
Value: params.EntityObject
|
|
88
|
-
}];
|
|
228
|
+
const internalParams = await this.MapParams(action.Params, params.EntityAction.Params, params.EntityObject);
|
|
89
229
|
const result = await ActionEngine_1.ActionEngine.Instance.RunAction({
|
|
90
230
|
Action: action,
|
|
91
231
|
ContextUser: params.ContextUser,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityActionInvocationTypes.js","sourceRoot":"","sources":["../../src/entity-actions/EntityActionInvocationTypes.ts"],"names":[],"mappings":";;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"EntityActionInvocationTypes.js","sourceRoot":"","sources":["../../src/entity-actions/EntityActionInvocationTypes.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAgF;AAEhF,0DAAkF;AAIlF;;GAEG;AACH,MAAsB,0BAA0B;IAAhD;QAmEY,iBAAY,GAA0B,IAAI,GAAG,EAAoB,CAAC;IAmC9E,CAAC;IAnGG;;;;OAIG;IACI,eAAe,CAAC,SAA8B,EAAE,SAAwE;QAC3H,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,SAAS,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;IACpG,CAAC;IAEM,mCAAmC,CAAC,MAAoB;QAC3D,OAAO;YACH,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;SAC5B,CAAA;IACL,CAAC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+
* Runtime parameter class that is used to pass key/value pairs in arrays to/from the action engine.
|
|
85
85
|
*/
|
|
86
86
|
export declare class ActionParam {
|
|
87
87
|
/**
|
|
@@ -26,7 +26,7 @@ class ActionResult {
|
|
|
26
26
|
}
|
|
27
27
|
exports.ActionResult = ActionResult;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Runtime parameter class that is used to pass key/value pairs in arrays to/from the action engine.
|
|
30
30
|
*/
|
|
31
31
|
class ActionParam {
|
|
32
32
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EntityInfo, EntitySaveOptions } from "@memberjunction/core";
|
|
2
2
|
import { ActionEntity, ActionLibraryEntity, ActionParamEntity, ActionResultCodeEntity } from "@memberjunction/core-entities";
|
|
3
|
-
import { GeneratedCode } from "./ActionEngine";
|
|
3
|
+
import { ActionLibrary, GeneratedCode } from "./ActionEngine";
|
|
4
4
|
import { BaseLLM, ChatParams } from "@memberjunction/ai";
|
|
5
5
|
/**
|
|
6
6
|
* Server-Only custom sub-class for Actions entity. This sub-class handles the process of auto-generation code for the Actions entity.
|
|
@@ -36,6 +36,7 @@ export declare class ActionEntityServerEntity extends ActionEntity {
|
|
|
36
36
|
* @returns
|
|
37
37
|
*/
|
|
38
38
|
Save(options?: EntitySaveOptions): Promise<boolean>;
|
|
39
|
+
protected manageLibraries(codeLibraries: ActionLibrary[], wasNewRecord: boolean): Promise<boolean>;
|
|
39
40
|
protected SendMessage(message: string): void;
|
|
40
41
|
/**
|
|
41
42
|
* This method will generate code using a combination of the UserPrompt field as well as the overall context of how an Action gets executed. Code from the Action is later used by CodeGen to inject into
|
|
@@ -44,9 +45,9 @@ export declare class ActionEntityServerEntity extends ActionEntity {
|
|
|
44
45
|
*/
|
|
45
46
|
GenerateCode(maxAttempts?: number): Promise<GeneratedCode>;
|
|
46
47
|
protected InternalGenerateCode(llm: BaseLLM, chatParams: ChatParams, attemptsRemaining: number): Promise<GeneratedCode>;
|
|
47
|
-
protected ValidateCode(llm: BaseLLM, generatedCode: GeneratedCode, attemptsRemaining: number): Promise<GeneratedCode>;
|
|
48
|
+
protected ValidateCode(llm: BaseLLM, userRequest: string, generatedCode: GeneratedCode, attemptsRemaining: number): Promise<GeneratedCode>;
|
|
48
49
|
GenerateSysPrompt(): string;
|
|
49
|
-
GenerateValidateCodePrompt(generatedCode: GeneratedCode): string;
|
|
50
|
+
GenerateValidateCodePrompt(userRequest: string, generatedCode: GeneratedCode): string;
|
|
50
51
|
GenerateContextInfo(): string;
|
|
51
52
|
GenerateRunViewParamsInfo(): string;
|
|
52
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionEntity.server.d.ts","sourceRoot":"","sources":["../../src/generic/ActionEntity.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,UAAU,EAAE,iBAAiB,EAA0C,MAAM,sBAAsB,CAAC;AAC7I,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAI7H,OAAO,
|
|
1
|
+
{"version":3,"file":"ActionEntity.server.d.ts","sourceRoot":"","sources":["../../src/generic/ActionEntity.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,UAAU,EAAE,iBAAiB,EAA0C,MAAM,sBAAsB,CAAC;AAC7I,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAI7H,OAAO,EAAgB,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAe,UAAU,EAAe,MAAM,oBAAoB,CAAC;AAGnF;;GAEG;AACH,qBACa,wBAAyB,SAAQ,YAAY;gBAC1C,MAAM,EAAE,UAAU;IAO9B;;;OAGG;IACH,SAAS,KAAK,YAAY,IAAI,MAAM,CAEnC;IAED;;OAEG;IACH,IAAW,gBAAgB,IAAI,MAAM,CAEpC;IAED;;OAEG;IACH,IAAW,YAAY,IAAI,OAAO,CAEjC;IAED,OAAO,CAAC,YAAY,CAAkC;IACtD;;OAEG;IACH,IAAW,WAAW,IAAI,sBAAsB,EAAE,CAMjD;IAED,OAAO,CAAC,OAAO,CAA6B;IAC5C,IAAW,MAAM,IAAI,iBAAiB,EAAE,CAMvC;IAED,OAAO,CAAC,KAAK,CAA+B;IAC5C,IAAW,SAAS,IAAI,mBAAmB,EAAE,CAM5C;IAGD;;;;;OAKG;IACmB,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;cAsCzD,eAAe,CAAC,aAAa,EAAE,aAAa,EAAE,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IA4DxG,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM;IAQrC;;;;OAIG;IACU,YAAY,CAAC,WAAW,GAAE,MAAU,GAAG,OAAO,CAAC,aAAa,CAAC;cAqC1D,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;cAqD7G,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IA8BzI,iBAAiB,IAAI,MAAM;IA+B3B,0BAA0B,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,GAAG,MAAM;IA2DrF,mBAAmB,IAAI,MAAM;IAsH7B,yBAAyB,IAAI,MAAM;CAsG7C;AAED,wBAAgB,sBAAsB,SAIrC"}
|
|
@@ -85,7 +85,10 @@ let ActionEntityServerEntity = class ActionEntityServerEntity extends core_entit
|
|
|
85
85
|
await doc_utils_1.DocumentationEngine.Instance.Config(false, this.ContextCurrentUser);
|
|
86
86
|
let newCodeGenerated = false;
|
|
87
87
|
let codeLibraries = [];
|
|
88
|
-
if (this.
|
|
88
|
+
if (this.Type === 'Generated' && // only generate when the type is Generated
|
|
89
|
+
!this.CodeLocked && // only generate when the code is not locked
|
|
90
|
+
(this.GetFieldByName('UserPrompt').Dirty || !this.IsSaved || this.ForceCodeGeneration) // only generate when the UserPrompt field is dirty or this is a new record or we are being asked to FORCE code generation
|
|
91
|
+
) {
|
|
89
92
|
// UserPrompt field is dirty, or this is a new record, either way, this is the condition where we want to generate the Code.
|
|
90
93
|
const result = await this.GenerateCode();
|
|
91
94
|
if (result.Success) {
|
|
@@ -103,64 +106,66 @@ let ActionEntityServerEntity = class ActionEntityServerEntity extends core_entit
|
|
|
103
106
|
this.ForceCodeGeneration = false; // make sure to reset this flag every time we save, it should never live past one run of the Save method, of course if Save fails, below, then it will not be reset
|
|
104
107
|
const wasNewRecord = !this.IsSaved;
|
|
105
108
|
if (await super.Save(options)) {
|
|
106
|
-
if (newCodeGenerated)
|
|
107
|
-
|
|
108
|
-
// get a list of existing ActionLibrary records that match this Action
|
|
109
|
-
const existingLibraries = [];
|
|
110
|
-
if (!wasNewRecord) {
|
|
111
|
-
const rv = new core_1.RunView();
|
|
112
|
-
const libResult = await rv.RunView({
|
|
113
|
-
EntityName: 'Action Libraries',
|
|
114
|
-
ExtraFilter: `ActionID = ${this.ID}`,
|
|
115
|
-
ResultType: 'entity_object'
|
|
116
|
-
}, this.ContextCurrentUser);
|
|
117
|
-
if (libResult.Success && libResult.Results.length > 0) {
|
|
118
|
-
existingLibraries.push(...libResult.Results);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
// now we need to go through the libraries we ARE currently using in the current code and make sure they are in the ActionLibraries table
|
|
122
|
-
// and make sure nothing is in the table that we are not using
|
|
123
|
-
const librariesToAdd = codeLibraries.filter(l => !existingLibraries.some(el => el.Library.trim().toLowerCase() === l.LibraryName.trim().toLowerCase()));
|
|
124
|
-
const librariesToRemove = existingLibraries.filter(el => !codeLibraries.some(l => l.LibraryName.trim().toLowerCase() === el.Library.trim().toLowerCase()));
|
|
125
|
-
const librariesToUpdate = existingLibraries.filter(el => codeLibraries.some(l => l.LibraryName.trim().toLowerCase() === el.Library.trim().toLowerCase()));
|
|
126
|
-
const md = new core_1.Metadata();
|
|
127
|
-
const tg = await md.CreateTransactionGroup();
|
|
128
|
-
for (const lib of librariesToAdd) {
|
|
129
|
-
const libMetadata = md.Libraries.find(l => l.Name.trim().toLowerCase() === lib.LibraryName.trim().toLowerCase());
|
|
130
|
-
if (libMetadata) {
|
|
131
|
-
const newLib = await md.GetEntityObject('Action Libraries', this.ContextCurrentUser);
|
|
132
|
-
newLib.ActionID = this.ID;
|
|
133
|
-
newLib.LibraryID = libMetadata.ID;
|
|
134
|
-
newLib.ItemsUsed = lib.ItemsUsed.join(',');
|
|
135
|
-
newLib.TransactionGroup = tg;
|
|
136
|
-
newLib.Save(); // no await, within a TG
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
// now update the libraries that were already in place to ensure the ItemsUsed are up to date
|
|
140
|
-
for (const lib of librariesToUpdate) {
|
|
141
|
-
const newCode = codeLibraries.find(l => l.LibraryName.trim().toLowerCase() === lib.Library.trim().toLowerCase());
|
|
142
|
-
lib.ItemsUsed = newCode.ItemsUsed.join(',');
|
|
143
|
-
lib.TransactionGroup = tg;
|
|
144
|
-
lib.Save(); // no await, within a TG
|
|
145
|
-
}
|
|
146
|
-
// now remove the libraries that are no longer used
|
|
147
|
-
for (const lib of librariesToRemove) {
|
|
148
|
-
// each lib in this array iteration is already a BaseEntity derived object
|
|
149
|
-
lib.TransactionGroup = tg;
|
|
150
|
-
lib.Delete(); // no await, within a TG
|
|
151
|
-
}
|
|
152
|
-
// now commit the transaction
|
|
153
|
-
if (await tg.Submit())
|
|
154
|
-
return true;
|
|
155
|
-
else
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
109
|
+
if (newCodeGenerated)
|
|
110
|
+
return this.manageLibraries(codeLibraries, wasNewRecord);
|
|
158
111
|
else
|
|
159
112
|
return true;
|
|
160
113
|
}
|
|
161
114
|
else
|
|
162
115
|
return false;
|
|
163
116
|
}
|
|
117
|
+
async manageLibraries(codeLibraries, wasNewRecord) {
|
|
118
|
+
// new code was generated, we need to sync up the ActionLibraries table with the libraries used in the code for this Action
|
|
119
|
+
// get a list of existing ActionLibrary records that match this Action
|
|
120
|
+
const existingLibraries = [];
|
|
121
|
+
if (!wasNewRecord) {
|
|
122
|
+
const rv = new core_1.RunView();
|
|
123
|
+
const libResult = await rv.RunView({
|
|
124
|
+
EntityName: 'Action Libraries',
|
|
125
|
+
ExtraFilter: `ActionID = '${this.ID}'`,
|
|
126
|
+
ResultType: 'entity_object'
|
|
127
|
+
}, this.ContextCurrentUser);
|
|
128
|
+
if (libResult.Success && libResult.Results.length > 0) {
|
|
129
|
+
existingLibraries.push(...libResult.Results);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// now we need to go through the libraries we ARE currently using in the current code and make sure they are in the ActionLibraries table
|
|
133
|
+
// and make sure nothing is in the table that we are not using
|
|
134
|
+
const librariesToAdd = codeLibraries.filter(l => !existingLibraries.some(el => el.Library.trim().toLowerCase() === l.LibraryName.trim().toLowerCase()));
|
|
135
|
+
const librariesToRemove = existingLibraries.filter(el => !codeLibraries.some(l => l.LibraryName.trim().toLowerCase() === el.Library.trim().toLowerCase()));
|
|
136
|
+
const librariesToUpdate = existingLibraries.filter(el => codeLibraries.some(l => l.LibraryName.trim().toLowerCase() === el.Library.trim().toLowerCase()));
|
|
137
|
+
const md = new core_1.Metadata();
|
|
138
|
+
const tg = await md.CreateTransactionGroup();
|
|
139
|
+
for (const lib of librariesToAdd) {
|
|
140
|
+
const libMetadata = md.Libraries.find(l => l.Name.trim().toLowerCase() === lib.LibraryName.trim().toLowerCase());
|
|
141
|
+
if (libMetadata) {
|
|
142
|
+
const newLib = await md.GetEntityObject('Action Libraries', this.ContextCurrentUser);
|
|
143
|
+
newLib.ActionID = this.ID;
|
|
144
|
+
newLib.LibraryID = libMetadata.ID;
|
|
145
|
+
newLib.ItemsUsed = lib.ItemsUsed.join(',');
|
|
146
|
+
newLib.TransactionGroup = tg;
|
|
147
|
+
newLib.Save(); // no await, within a TG
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// now update the libraries that were already in place to ensure the ItemsUsed are up to date
|
|
151
|
+
for (const lib of librariesToUpdate) {
|
|
152
|
+
const newCode = codeLibraries.find(l => l.LibraryName.trim().toLowerCase() === lib.Library.trim().toLowerCase());
|
|
153
|
+
lib.ItemsUsed = newCode.ItemsUsed.join(',');
|
|
154
|
+
lib.TransactionGroup = tg;
|
|
155
|
+
lib.Save(); // no await, within a TG
|
|
156
|
+
}
|
|
157
|
+
// now remove the libraries that are no longer used
|
|
158
|
+
for (const lib of librariesToRemove) {
|
|
159
|
+
// each lib in this array iteration is already a BaseEntity derived object
|
|
160
|
+
lib.TransactionGroup = tg;
|
|
161
|
+
lib.Delete(); // no await, within a TG
|
|
162
|
+
}
|
|
163
|
+
// now commit the transaction
|
|
164
|
+
if (await tg.Submit())
|
|
165
|
+
return true;
|
|
166
|
+
else
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
164
169
|
SendMessage(message) {
|
|
165
170
|
global_1.MJGlobal.Instance.RaiseEvent({
|
|
166
171
|
args: { message },
|
|
@@ -195,7 +200,7 @@ let ActionEntityServerEntity = class ActionEntityServerEntity extends core_entit
|
|
|
195
200
|
let result = await this.InternalGenerateCode(llm, chatParams, maxAttempts);
|
|
196
201
|
if (result.Success) {
|
|
197
202
|
//now run the code through the QA agent to make sure the code is valid
|
|
198
|
-
let qaResult = await this.ValidateCode(llm, result, maxAttempts);
|
|
203
|
+
let qaResult = await this.ValidateCode(llm, this.UserPrompt, result, maxAttempts);
|
|
199
204
|
return qaResult;
|
|
200
205
|
}
|
|
201
206
|
else {
|
|
@@ -258,10 +263,10 @@ let ActionEntityServerEntity = class ActionEntityServerEntity extends core_entit
|
|
|
258
263
|
};
|
|
259
264
|
}
|
|
260
265
|
}
|
|
261
|
-
async ValidateCode(llm, generatedCode, attemptsRemaining) {
|
|
266
|
+
async ValidateCode(llm, userRequest, generatedCode, attemptsRemaining) {
|
|
262
267
|
this.SendMessage(`Reviewing code...`);
|
|
263
268
|
const model = await aiengine_1.AIEngine.Instance.GetHighestPowerModel(this.AIVendorName, 'llm', this.ContextCurrentUser);
|
|
264
|
-
const promptMessage = this.GenerateValidateCodePrompt(generatedCode);
|
|
269
|
+
const promptMessage = this.GenerateValidateCodePrompt(userRequest, generatedCode);
|
|
265
270
|
const validatePrompt = {
|
|
266
271
|
role: 'system',
|
|
267
272
|
content: promptMessage
|
|
@@ -273,8 +278,16 @@ let ActionEntityServerEntity = class ActionEntityServerEntity extends core_entit
|
|
|
273
278
|
if (result.Success) {
|
|
274
279
|
return result;
|
|
275
280
|
}
|
|
281
|
+
else if (attemptsRemaining > 1) {
|
|
282
|
+
return this.ValidateCode(llm, userRequest, generatedCode, attemptsRemaining - 1);
|
|
283
|
+
}
|
|
276
284
|
else {
|
|
277
|
-
return
|
|
285
|
+
return {
|
|
286
|
+
Success: false,
|
|
287
|
+
Code: '',
|
|
288
|
+
Comments: `Error communicating with AI: ${result.Comments}`,
|
|
289
|
+
LibrariesUsed: []
|
|
290
|
+
};
|
|
278
291
|
}
|
|
279
292
|
}
|
|
280
293
|
GenerateSysPrompt() {
|
|
@@ -283,12 +296,12 @@ let ActionEntityServerEntity = class ActionEntityServerEntity extends core_entit
|
|
|
283
296
|
* YOUR RESPONSE MUST BE A JSON OBJECT
|
|
284
297
|
* MORE INFO BELOW
|
|
285
298
|
</RETURN_FORMAT>
|
|
286
|
-
|
|
299
|
+
|
|
287
300
|
<INTRODUCTION>
|
|
288
301
|
You are an expert in TypeScript coding and business applications. You take great pride in easy to read, commented, and nicely formatted code.
|
|
289
302
|
You will be provided a request for how to handle a specific type of action that they want created. An action is a "verb" in the MemberJunction framework that can do basically anything the user asks for.
|
|
290
303
|
Your job is to write the TypeScript code that will be taken and inserted into a class as shown below using the classes
|
|
291
|
-
for inputs/outputs and the ActionResultSimple class that is provided. The code you write will be used by the MemberJunction engine to execute the action when
|
|
304
|
+
for inputs/outputs and the ActionResultSimple class that is provided. The code you write will be used by the MemberJunction engine to execute the action when
|
|
292
305
|
it is called by the user.
|
|
293
306
|
</INTRODUCTION>
|
|
294
307
|
|
|
@@ -307,7 +320,7 @@ const returnType = {
|
|
|
307
320
|
`;
|
|
308
321
|
return prompt;
|
|
309
322
|
}
|
|
310
|
-
GenerateValidateCodePrompt(generatedCode) {
|
|
323
|
+
GenerateValidateCodePrompt(userRequest, generatedCode) {
|
|
311
324
|
return `<RETURN_FORMAT>
|
|
312
325
|
* CRITICAL - I am a bot, I can ONLY understand fully formed JSON responses
|
|
313
326
|
* YOUR RESPONSE MUST BE A JSON OBJECT
|
|
@@ -316,7 +329,7 @@ const returnType = {
|
|
|
316
329
|
|
|
317
330
|
<INTRODUCTION>
|
|
318
331
|
You are an expert in TypeScript coding and business applications. You take great pride in easy to read, commented, and nicely formatted code.
|
|
319
|
-
You are also exceptional in catching errors in other people's code and providing clear and easy to understand bug fixes, with comments explaining the
|
|
332
|
+
You are also exceptional in catching errors in other people's code and providing clear and easy to understand bug fixes, with comments explaining the
|
|
320
333
|
issues and how you corrected it.
|
|
321
334
|
You will be provided a request for how to handle a specific type of action that they want created, as well code written by someone else that attempts
|
|
322
335
|
to satisfy the request. An action is a "verb" in the MemberJunction framework that can do basically anything the user asks for.
|
|
@@ -325,7 +338,8 @@ Your job is to:
|
|
|
325
338
|
2- Verify that the given code satifies the user's request.
|
|
326
339
|
</INTRODUCTION>
|
|
327
340
|
|
|
328
|
-
The user's request
|
|
341
|
+
The user's original request was:
|
|
342
|
+
${userRequest}
|
|
329
343
|
|
|
330
344
|
The generated code is below:
|
|
331
345
|
<GENERATEDCODE>
|
|
@@ -356,12 +370,12 @@ Your response must be JSON and parsable into this type:
|
|
|
356
370
|
const returnType = {
|
|
357
371
|
reflection: string, //Jot down your notes here on why you think the given code was valid or not. If it wasnt, write down why it isnt. Is it because there are syntax or logic errors, or because it doesnt satisfy the user's request?
|
|
358
372
|
success: boolean //whether or not the above code is valid and can successfully compile and run, using the given libraries and data types
|
|
359
|
-
code: string, //
|
|
373
|
+
code: string, // REMEMBER: your code will be inserted INTO an existing method so do not generate the method signature, just the code that I will drop into my existing method as shown in the <CONTEXTINFO>
|
|
360
374
|
explanation: string // If the code is not valid, you will provide an explanation for a semi-technical person explaining what the corrected code does. Here again use line breaks liberally to make it easy to read but do NOT indent with spaces/tabs as I will handle that. Use * lists and numbered lists as appropriate.
|
|
361
375
|
libraries: [
|
|
362
376
|
{LibraryName: string, ItemsUsed: string[]}, // If the code is not valid, tell me the libraries you have used in the corrected code you created here in this array of libraries. I need this info to properly import them in the final code.
|
|
363
377
|
]
|
|
364
|
-
};
|
|
378
|
+
};
|
|
365
379
|
`;
|
|
366
380
|
}
|
|
367
381
|
GenerateContextInfo() {
|
|
@@ -471,7 +485,7 @@ ${JSON.stringify(core_1.Metadata.Provider.Entities.map(e => {
|
|
|
471
485
|
};
|
|
472
486
|
}))}
|
|
473
487
|
</ENTITIES>
|
|
474
|
-
The next message, which will be a user message in the conversation, will contain the sys admin's requested behavior for this entity.
|
|
488
|
+
The next message, which will be a user message in the conversation, will contain the sys admin's requested behavior for this entity.
|
|
475
489
|
|
|
476
490
|
<CRITICAL>
|
|
477
491
|
I am a bot and can only understand FULLY FORMED JSON responses that can be parsed with JSON.parse().
|
|
@@ -479,9 +493,9 @@ I am a bot and can only understand FULLY FORMED JSON responses that can be parse
|
|
|
479
493
|
}
|
|
480
494
|
GenerateRunViewParamsInfo() {
|
|
481
495
|
return `/**
|
|
482
|
-
* Parameters for running either a stored or dynamic view.
|
|
483
|
-
* A stored view is a view that is saved in the database and can be run either by ID or Name.
|
|
484
|
-
* A dynamic view is one that is not stored in the database and you provide parameters to return data as
|
|
496
|
+
* Parameters for running either a stored or dynamic view.
|
|
497
|
+
* A stored view is a view that is saved in the database and can be run either by ID or Name.
|
|
498
|
+
* A dynamic view is one that is not stored in the database and you provide parameters to return data as
|
|
485
499
|
* desired programatically.
|
|
486
500
|
*/
|
|
487
501
|
export type RunViewParams = {
|
|
@@ -490,26 +504,26 @@ export type RunViewParams = {
|
|
|
490
504
|
*/
|
|
491
505
|
ViewID?: number
|
|
492
506
|
/**
|
|
493
|
-
* optional - Name of the UserView record to run, if you are using this, make sure to use a naming convention
|
|
494
|
-
* so that your view names are unique. For example use a prefix like __Entity_View_ etc so that you're
|
|
495
|
-
* likely to have a single result. If more than one view is available that matches a provided view name an
|
|
507
|
+
* optional - Name of the UserView record to run, if you are using this, make sure to use a naming convention
|
|
508
|
+
* so that your view names are unique. For example use a prefix like __Entity_View_ etc so that you're
|
|
509
|
+
* likely to have a single result. If more than one view is available that matches a provided view name an
|
|
496
510
|
* exception will be thrown.
|
|
497
511
|
*/
|
|
498
512
|
ViewName?: string
|
|
499
513
|
/**
|
|
500
|
-
* optional - this is the loaded instance of the BaseEntity (UserViewEntityComplete or a subclass of it).
|
|
501
|
-
* This is the preferred parameter to use IF you already have a view entity object loaded up in your code
|
|
514
|
+
* optional - this is the loaded instance of the BaseEntity (UserViewEntityComplete or a subclass of it).
|
|
515
|
+
* This is the preferred parameter to use IF you already have a view entity object loaded up in your code
|
|
502
516
|
* becuase by passing this in, the RunView() method doesn't have to lookup all the metadata for the view and it is faster.
|
|
503
517
|
* If you provide ViewEntity, ViewID/ViewName are ignored.
|
|
504
518
|
*/
|
|
505
519
|
ViewEntity?: BaseEntity
|
|
506
520
|
/**
|
|
507
|
-
* optional - this is only used if ViewID/ViewName/ViewEntity are not provided, it is used for
|
|
521
|
+
* optional - this is only used if ViewID/ViewName/ViewEntity are not provided, it is used for
|
|
508
522
|
* Dynamic Views in combination with the optional ExtraFilter
|
|
509
523
|
*/
|
|
510
524
|
EntityName?: string
|
|
511
525
|
/**
|
|
512
|
-
* An optional SQL WHERE clause that you can add to the existing filters on a stored view. For dynamic views, you can either
|
|
526
|
+
* An optional SQL WHERE clause that you can add to the existing filters on a stored view. For dynamic views, you can either
|
|
513
527
|
* run a view without a filter (if the entity definition allows it with AllowAllRowsAPI=1) or filter with any valid SQL WHERE clause.
|
|
514
528
|
*/
|
|
515
529
|
ExtraFilter?: string
|
|
@@ -524,11 +538,11 @@ export type RunViewParams = {
|
|
|
524
538
|
Fields?: string[]
|
|
525
539
|
/**
|
|
526
540
|
* optional - string that represents a user "search" - typically from a text search option in a UI somewhere. This field is then used in the view filtering to search whichever fields are configured to be included in search in the Entity Fields definition.
|
|
527
|
-
* Search String is combined with the stored view filters as well as ExtraFilter with an AND.
|
|
541
|
+
* Search String is combined with the stored view filters as well as ExtraFilter with an AND.
|
|
528
542
|
*/
|
|
529
543
|
UserSearchString?: string
|
|
530
544
|
/**
|
|
531
|
-
* optional - if provided, records that were returned in the specified UserViewRunID will NOT be allowed in the result set.
|
|
545
|
+
* optional - if provided, records that were returned in the specified UserViewRunID will NOT be allowed in the result set.
|
|
532
546
|
* This is useful if you want to run a particular view over time and exclude a specific prior run's resulting data set. If you
|
|
533
547
|
* want to exclude ALL data returned from ALL prior runs, use the ExcludeDataFromAllPriorViewRuns property instead.
|
|
534
548
|
*/
|
|
@@ -539,11 +553,11 @@ export type RunViewParams = {
|
|
|
539
553
|
*/
|
|
540
554
|
ExcludeDataFromAllPriorViewRuns?: boolean
|
|
541
555
|
/**
|
|
542
|
-
* optional - if you are providing the optional ExcludeUserViewRunID property, you can also optionally provide
|
|
556
|
+
* optional - if you are providing the optional ExcludeUserViewRunID property, you can also optionally provide
|
|
543
557
|
* this filter which will negate the specific list of record IDs that are excluded by the ExcludeUserViewRunID property.
|
|
544
558
|
* This can be useful if you want to ensure a certain class of data is always allowed into your view and not filtered out
|
|
545
559
|
* by a prior view run.
|
|
546
|
-
*
|
|
560
|
+
*
|
|
547
561
|
*/
|
|
548
562
|
OverrideExcludeFilter?: string
|
|
549
563
|
/**
|
|
@@ -572,11 +586,11 @@ export type RunViewParams = {
|
|
|
572
586
|
|
|
573
587
|
/**
|
|
574
588
|
* Result Type is: 'simple', 'entity_object', or 'count_only' and defaults to 'simple'. If 'entity_object' is specified, the Results[] array will contain
|
|
575
|
-
* BaseEntity-derived objects instead of simple objects. This is useful if you want to work with the data in a more strongly typed manner and/or
|
|
589
|
+
* BaseEntity-derived objects instead of simple objects. This is useful if you want to work with the data in a more strongly typed manner and/or
|
|
576
590
|
* if you plan to do any update/delete operations on the data after it is returned. The 'count_only' option will return no rows, but the TotalRowCount property of the RunViewResult object will be populated.
|
|
577
591
|
*/
|
|
578
592
|
ResultType?: 'simple' | 'entity_object' | 'count_only';
|
|
579
|
-
}
|
|
593
|
+
}
|
|
580
594
|
`;
|
|
581
595
|
}
|
|
582
596
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionEntity.server.js","sourceRoot":"","sources":["../../src/generic/ActionEntity.server.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA6I;AAC7I,iEAA6H;AAC7H,mDAAyF;AACzF,uDAAoD;AAEpD,iDAA4E;AAC5E,2CAAmF;AACnF,yDAAkH;AAElH;;GAEG;AAEI,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,4BAAY;IACtD,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa;QA4BxB,iBAAY,GAA6B,IAAI,CAAC;QAY9C,YAAO,GAAwB,IAAI,CAAC;QASpC,UAAK,GAA0B,IAAI,CAAC;QA/CxC,MAAM,EAAE,GAAG,IAAI,eAAQ,EAAE,CAAC;QAC1B,IAAI,EAAE,CAAC,YAAY,KAAK,UAAU;YAC9B,MAAM,IAAI,KAAK,CAAC,6GAA6G,CAAC,CAAC;IACvI,CAAC;IACD;;;OAGG;IACH,IAAc,YAAY;QACtB,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,IAAW,gBAAgB;QACvB,OAAO,IAAA,yBAAkB,EAAC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,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6DA,IAAI,CAAC,SAAS,CAAC,eAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;YAC9C,2DAA2D;YAC3D,OAAO;gBACH,MAAM,EAAE,CAAC,CAAC,IAAI;gBACd,UAAU,EAAE,CAAC,CAAC,UAAU;gBACxB,WAAW,EAAE,CAAC,CAAC,WAAW;gBAC1B,QAAQ,EAAE,CAAC,CAAC,QAAQ;aACvB,CAAA;QACL,CAAC,CAAC,CACN;;;;;;SAMS,CAAC;IACN,CAAC;IAEM,yBAAyB;QAC5B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAmGN,CAAC;IACN,CAAC;CACJ,CAAA;AAhmBY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,sBAAa,EAAC,iBAAU,EAAE,SAAS,CAAC,CAAC,mEAAmE;;qCAEjF,iBAAU;GADrB,wBAAwB,CAgmBpC;AAED,SAAgB,sBAAsB;IAClC,uFAAuF;IACvF,sHAAsH;IACtH,6FAA6F;AACjG,CAAC;AAJD,wDAIC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/actions",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Main library for MemberJunction Actions. This library is only intended to be imported on the server side.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"typescript": "^5.4.5"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@memberjunction/global": "
|
|
23
|
-
"@memberjunction/core": "
|
|
24
|
-
"@memberjunction/core-entities": "
|
|
25
|
-
"@memberjunction/ai": "
|
|
26
|
-
"@memberjunction/aiengine": "
|
|
27
|
-
"@memberjunction/doc-utils": "
|
|
22
|
+
"@memberjunction/global": "2.0.0",
|
|
23
|
+
"@memberjunction/core": "2.0.0",
|
|
24
|
+
"@memberjunction/core-entities": "2.0.0",
|
|
25
|
+
"@memberjunction/ai": "2.0.0",
|
|
26
|
+
"@memberjunction/aiengine": "2.0.0",
|
|
27
|
+
"@memberjunction/doc-utils": "2.0.0"
|
|
28
28
|
}
|
|
29
29
|
}
|