@memberjunction/core-entities-server 2.52.0 → 2.54.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,9 @@
1
+ import { EntitySaveOptions } from "@memberjunction/core";
2
+ import { TemplateContentEntity } from "@memberjunction/core-entities";
3
+ export declare class TemplateContentEntityExtended extends TemplateContentEntity {
4
+ Save(options?: EntitySaveOptions): Promise<boolean>;
5
+ private extractAndSyncParameters;
6
+ private syncTemplateParameters;
7
+ }
8
+ export declare function LoadTemplateContentEntityServerSubClass(): void;
9
+ //# sourceMappingURL=TemplateContentEntity.server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TemplateContentEntity.server.d.ts","sourceRoot":"","sources":["../../src/custom/TemplateContentEntity.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAA+B,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAuC,MAAM,+BAA+B,CAAC;AAmB3G,qBACa,6BAA8B,SAAQ,qBAAqB;IACrD,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;YAmCpD,wBAAwB;YAiDxB,sBAAsB;CAuHvC;AAED,wBAAgB,uCAAuC,SAAK"}
@@ -0,0 +1,183 @@
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.LoadTemplateContentEntityServerSubClass = exports.TemplateContentEntityExtended = void 0;
10
+ const core_1 = require("@memberjunction/core");
11
+ const core_entities_1 = require("@memberjunction/core-entities");
12
+ const global_1 = require("@memberjunction/global");
13
+ const aiengine_1 = require("@memberjunction/aiengine");
14
+ const ai_prompts_1 = require("@memberjunction/ai-prompts");
15
+ let TemplateContentEntityExtended = class TemplateContentEntityExtended extends core_entities_1.TemplateContentEntity {
16
+ async Save(options) {
17
+ const provider = core_1.Metadata.Provider;
18
+ // Start a database transaction
19
+ await provider.BeginTransaction();
20
+ try {
21
+ // Check if this is a new record or if TemplateText has changed
22
+ const templateTextField = this.GetFieldByName('TemplateText');
23
+ const shouldExtractParams = !this.IsSaved || templateTextField.Dirty;
24
+ // Save the template content first
25
+ const saveResult = await super.Save(options);
26
+ if (!saveResult) {
27
+ await provider.RollbackTransaction();
28
+ return false;
29
+ }
30
+ // Extract and sync parameters if needed
31
+ if (shouldExtractParams && this.TemplateText && this.TemplateText.trim().length > 0) {
32
+ await this.extractAndSyncParameters();
33
+ }
34
+ // Commit the transaction
35
+ await provider.CommitTransaction();
36
+ return true;
37
+ }
38
+ catch (e) {
39
+ // Rollback on any error
40
+ await provider.RollbackTransaction();
41
+ (0, core_1.LogError)('Failed to save template content and extract parameters:', e);
42
+ throw e;
43
+ }
44
+ }
45
+ async extractAndSyncParameters() {
46
+ try {
47
+ if (this.Template === "Template Parameter Extraction") {
48
+ return; // Skip extraction for this special case - this is ourselves!
49
+ }
50
+ // Ensure AIEngine is configured
51
+ await aiengine_1.AIEngine.Instance.Config(false, this.ContextCurrentUser);
52
+ // Find the Template Parameter Extraction prompt
53
+ const aiPrompt = aiengine_1.AIEngine.Instance.Prompts.find(p => p.Name === 'Template Parameter Extraction' &&
54
+ p.Category === 'MJ: System');
55
+ if (!aiPrompt) {
56
+ // prompt not configured, non-fatl, just warn and return
57
+ console.warn('AI prompt for Template Parameter Extraction not found. Skipping parameter extraction.');
58
+ return;
59
+ }
60
+ // Prepare prompt data
61
+ const promptData = {
62
+ templateText: this.TemplateText
63
+ };
64
+ // Execute the prompt using AIPromptRunner
65
+ const promptRunner = new ai_prompts_1.AIPromptRunner();
66
+ const params = new ai_prompts_1.AIPromptParams();
67
+ params.prompt = aiPrompt;
68
+ params.data = promptData;
69
+ params.contextUser = this.ContextCurrentUser;
70
+ const result = await promptRunner.ExecutePrompt(params);
71
+ if (!result.success || !result.result) {
72
+ (0, core_1.LogError)('Failed to extract template parameters:', result.errorMessage);
73
+ return;
74
+ }
75
+ // Process the extracted parameters
76
+ await this.syncTemplateParameters(result.result.parameters);
77
+ }
78
+ catch (e) {
79
+ (0, core_1.LogError)('Error extracting template parameters:', e);
80
+ // Don't throw here - we don't want to fail the save if parameter extraction fails
81
+ // The user can still manually manage parameters if needed
82
+ }
83
+ }
84
+ async syncTemplateParameters(extractedParams) {
85
+ const md = new core_1.Metadata();
86
+ try {
87
+ // Get existing template parameters
88
+ const rv = new core_1.RunView();
89
+ const existingParamsResult = await rv.RunView({
90
+ EntityName: 'Template Params',
91
+ ExtraFilter: `TemplateID='${this.TemplateID}'`,
92
+ ResultType: 'entity_object'
93
+ }, this.ContextCurrentUser);
94
+ if (!existingParamsResult.Success) {
95
+ throw new Error(`Failed to load existing template parameters: ${existingParamsResult.ErrorMessage}`);
96
+ }
97
+ const existingParams = existingParamsResult.Results || [];
98
+ // Determine if we're in single or multiple template content scenario
99
+ const templateContentsResult = await rv.RunView({
100
+ EntityName: 'Template Contents',
101
+ ExtraFilter: `TemplateID='${this.TemplateID}'`,
102
+ ResultType: 'simple'
103
+ }, this.ContextCurrentUser);
104
+ const isMultipleContents = templateContentsResult.Success &&
105
+ templateContentsResult.Results &&
106
+ templateContentsResult.Results.length > 1;
107
+ // For single template content, all params have TemplateContentID = NULL
108
+ // For multiple contents, we need to be more careful about global vs content-specific params
109
+ const templateContentID = isMultipleContents ? this.ID : null;
110
+ // Filter existing params relevant to this content
111
+ const relevantExistingParams = existingParams.filter(p => isMultipleContents ? p.TemplateContentID === this.ID : p.TemplateContentID == null);
112
+ // Convert extracted param names to lowercase for comparison
113
+ const extractedParamNames = extractedParams.map(p => p.name.toLowerCase());
114
+ // Find parameters to add, update, or remove
115
+ const paramsToAdd = extractedParams.filter(p => !relevantExistingParams.some(ep => ep.Name.toLowerCase() === p.name.toLowerCase()));
116
+ const paramsToUpdate = relevantExistingParams.filter(ep => extractedParams.some(p => p.name.toLowerCase() === ep.Name.toLowerCase()));
117
+ const paramsToRemove = relevantExistingParams.filter(ep => !extractedParamNames.includes(ep.Name.toLowerCase()));
118
+ // Prepare all save/delete operations
119
+ const promises = [];
120
+ // Add new parameters
121
+ for (const param of paramsToAdd) {
122
+ const newParam = await md.GetEntityObject('Template Params', this.ContextCurrentUser);
123
+ newParam.TemplateID = this.TemplateID;
124
+ newParam.TemplateContentID = templateContentID;
125
+ newParam.Name = param.name;
126
+ newParam.Type = param.type;
127
+ newParam.IsRequired = param.isRequired;
128
+ newParam.DefaultValue = param.defaultValue;
129
+ newParam.Description = param.description;
130
+ promises.push(newParam.Save());
131
+ }
132
+ // Update existing parameters if properties changed
133
+ for (const existingParam of paramsToUpdate) {
134
+ const extractedParam = extractedParams.find(p => p.name.toLowerCase() === existingParam.Name.toLowerCase());
135
+ if (extractedParam) {
136
+ let hasChanges = false;
137
+ // Check each property for changes
138
+ if (existingParam.Type !== extractedParam.type) {
139
+ existingParam.Type = extractedParam.type;
140
+ hasChanges = true;
141
+ }
142
+ if (existingParam.IsRequired !== extractedParam.isRequired) {
143
+ existingParam.IsRequired = extractedParam.isRequired;
144
+ hasChanges = true;
145
+ }
146
+ if (existingParam.DefaultValue !== extractedParam.defaultValue) {
147
+ existingParam.DefaultValue = extractedParam.defaultValue;
148
+ hasChanges = true;
149
+ }
150
+ if (existingParam.Description !== extractedParam.description) {
151
+ existingParam.Description = extractedParam.description;
152
+ hasChanges = true;
153
+ }
154
+ if (hasChanges) {
155
+ promises.push(existingParam.Save());
156
+ }
157
+ }
158
+ }
159
+ // Remove parameters that are no longer in the template
160
+ for (const paramToRemove of paramsToRemove) {
161
+ promises.push(paramToRemove.Delete());
162
+ }
163
+ // Execute all operations in parallel
164
+ if (promises.length > 0) {
165
+ await Promise.all(promises); // saving these is non-critical
166
+ }
167
+ // If this is multiple contents scenario, we might need to handle global params
168
+ // This is a more complex scenario that would require analyzing all template contents
169
+ // For now, we're handling content-specific params only
170
+ }
171
+ catch (e) {
172
+ (0, core_1.LogError)('Failed to sync template parameters:', e);
173
+ throw e; // Re-throw since we're in a transaction
174
+ }
175
+ }
176
+ };
177
+ exports.TemplateContentEntityExtended = TemplateContentEntityExtended;
178
+ exports.TemplateContentEntityExtended = TemplateContentEntityExtended = __decorate([
179
+ (0, global_1.RegisterClass)(core_1.BaseEntity, 'Template Contents')
180
+ ], TemplateContentEntityExtended);
181
+ function LoadTemplateContentEntityServerSubClass() { }
182
+ exports.LoadTemplateContentEntityServerSubClass = LoadTemplateContentEntityServerSubClass;
183
+ //# sourceMappingURL=TemplateContentEntity.server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TemplateContentEntity.server.js","sourceRoot":"","sources":["../../src/custom/TemplateContentEntity.server.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+CAAkG;AAClG,iEAA2G;AAC3G,mDAAuD;AACvD,uDAAoD;AAEpD,2DAA4E;AAgBrE,IAAM,6BAA6B,GAAnC,MAAM,6BAA8B,SAAQ,qCAAqB;IAC3D,KAAK,CAAC,IAAI,CAAC,OAA2B;QAC3C,MAAM,QAAQ,GAAG,eAAQ,CAAC,QAAiC,CAAC;QAE5D,+BAA+B;QAC/B,MAAM,QAAQ,CAAC,gBAAgB,EAAE,CAAC;QAElC,IAAI,CAAC;YACD,+DAA+D;YAC/D,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;YAC9D,MAAM,mBAAmB,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,iBAAiB,CAAC,KAAK,CAAC;YAErE,kCAAkC;YAClC,MAAM,U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,CAAC;gBACtB,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,+BAA+B;YAChE,CAAC;YAED,+EAA+E;YAC/E,qFAAqF;YACrF,uDAAuD;QAE3D,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,IAAA,eAAQ,EAAC,qCAAqC,EAAE,CAAC,CAAC,CAAC;YACnD,MAAM,CAAC,CAAC,CAAC,wCAAwC;QACrD,CAAC;IACL,CAAC;CACJ,CAAA;AA5MY,sEAA6B;wCAA7B,6BAA6B;IADzC,IAAA,sBAAa,EAAC,iBAAU,EAAE,mBAAmB,CAAC;GAClC,6BAA6B,CA4MzC;AAED,SAAgB,uCAAuC,KAAI,CAAC;AAA5D,0FAA4D"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './custom/AIPromptEntityExtended.server';
2
2
  export * from './custom/DuplicateRunEntity.server';
3
3
  export * from './custom/reportEntity.server';
4
+ export * from './custom/TemplateContentEntity.server';
4
5
  export * from './custom/userViewEntity.server';
5
6
  export declare function LoadCoreEntitiesServerSubClasses(): void;
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAG/C,wBAAgB,gCAAgC,IAAI,IAAI,CAKvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAG/C,wBAAgB,gCAAgC,IAAI,IAAI,CAMvD"}
package/dist/index.js CHANGED
@@ -18,16 +18,19 @@ exports.LoadCoreEntitiesServerSubClasses = void 0;
18
18
  const AIPromptEntityExtended_server_1 = require("./custom/AIPromptEntityExtended.server");
19
19
  const DuplicateRunEntity_server_1 = require("./custom/DuplicateRunEntity.server");
20
20
  const reportEntity_server_1 = require("./custom/reportEntity.server");
21
+ const TemplateContentEntity_server_1 = require("./custom/TemplateContentEntity.server");
21
22
  const userViewEntity_server_1 = require("./custom/userViewEntity.server");
22
23
  __exportStar(require("./custom/AIPromptEntityExtended.server"), exports);
23
24
  __exportStar(require("./custom/DuplicateRunEntity.server"), exports);
24
25
  __exportStar(require("./custom/reportEntity.server"), exports);
26
+ __exportStar(require("./custom/TemplateContentEntity.server"), exports);
25
27
  __exportStar(require("./custom/userViewEntity.server"), exports);
26
28
  // Call the stub functions to ensure that the custom subclasses are not tree shaken out.
27
29
  function LoadCoreEntitiesServerSubClasses() {
28
30
  (0, AIPromptEntityExtended_server_1.LoadAIPromptEntityExtendedServerSubClass)();
29
31
  (0, DuplicateRunEntity_server_1.LoadDuplicateRunEntityServerSubClass)();
30
32
  (0, reportEntity_server_1.LoadReportEntityServerSubClass)();
33
+ (0, TemplateContentEntity_server_1.LoadTemplateContentEntityServerSubClass)();
31
34
  (0, userViewEntity_server_1.LoadUserViewEntityServerSubClass)();
32
35
  }
33
36
  exports.LoadCoreEntitiesServerSubClasses = LoadCoreEntitiesServerSubClasses;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0FAAkG;AAClG,kFAA0F;AAC1F,sEAA8E;AAC9E,0EAAkF;AAElF,yEAAuD;AACvD,qEAAmD;AACnD,+DAA6C;AAC7C,iEAA+C;AAE/C,wFAAwF;AACxF,SAAgB,gCAAgC;IAC5C,IAAA,wEAAwC,GAAE,CAAC;IAC3C,IAAA,gEAAoC,GAAE,CAAC;IACvC,IAAA,oDAA8B,GAAE,CAAC;IACjC,IAAA,wDAAgC,GAAE,CAAC;AACvC,CAAC;AALD,4EAKC;AACD,gCAAgC,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0FAAkG;AAClG,kFAA0F;AAC1F,sEAA8E;AAC9E,wFAAgG;AAChG,0EAAkF;AAElF,yEAAuD;AACvD,qEAAmD;AACnD,+DAA6C;AAC7C,wEAAsD;AACtD,iEAA+C;AAE/C,wFAAwF;AACxF,SAAgB,gCAAgC;IAC5C,IAAA,wEAAwC,GAAE,CAAC;IAC3C,IAAA,gEAAoC,GAAE,CAAC;IACvC,IAAA,oDAA8B,GAAE,CAAC;IACjC,IAAA,sEAAuC,GAAE,CAAC;IAC1C,IAAA,wDAAgC,GAAE,CAAC;AACvC,CAAC;AAND,4EAMC;AACD,gCAAgC,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/core-entities-server",
3
- "version": "2.52.0",
3
+ "version": "2.54.0",
4
4
  "description": "Entity subclasses for the metadata layer of MemberJunction that are only used on server side applications like MJAPI, distributed as part of each release of MemberJunction",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,12 +19,13 @@
19
19
  "typescript": "^5.4.5"
20
20
  },
21
21
  "dependencies": {
22
- "@memberjunction/core": "2.52.0",
23
- "@memberjunction/global": "2.52.0",
24
- "@memberjunction/core-entities": "2.52.0",
25
- "@memberjunction/ai-vector-dupe": "2.52.0",
26
- "@memberjunction/skip-types": "2.52.0",
27
- "@memberjunction/aiengine": "2.52.0",
22
+ "@memberjunction/core": "2.54.0",
23
+ "@memberjunction/global": "2.54.0",
24
+ "@memberjunction/core-entities": "2.54.0",
25
+ "@memberjunction/ai-vector-dupe": "2.54.0",
26
+ "@memberjunction/skip-types": "2.54.0",
27
+ "@memberjunction/aiengine": "2.54.0",
28
+ "@memberjunction/sqlserver-dataprovider": "2.54.0",
28
29
  "zod": "^3.23.8"
29
30
  }
30
31
  }