@memberjunction/core-entities
Advanced tools
Comparing version 0.9.18 to 0.9.19
@@ -49,3 +49,6 @@ import { BaseInfo, EntityInfo, EntityFieldInfo, UserInfo, EntitySaveOptions } from "@memberjunction/core"; | ||
*/ | ||
GenerateSmartFilterWhereClause(prompt: string, entityInfo: EntityInfo): Promise<string>; | ||
GenerateSmartFilterWhereClause(prompt: string, entityInfo: EntityInfo): Promise<{ | ||
whereClause: string; | ||
userExplanation: string; | ||
}>; | ||
/** | ||
@@ -52,0 +55,0 @@ * This is a stub method that always returns false - the intent is for the server-only sub-class to override this and return true if it supprots smart filters and then the rest of the smart filter |
@@ -194,3 +194,5 @@ "use strict"; | ||
// the prompt has changed (or is newly populated, either way it is dirty) so use the AI to figure this out | ||
this.SmartFilterWhereClause = await this.GenerateSmartFilterWhereClause(this.SmartFilterPrompt, this.ViewEntityInfo); | ||
const result = await this.GenerateSmartFilterWhereClause(this.SmartFilterPrompt, this.ViewEntityInfo); | ||
this.SmartFilterWhereClause = result.whereClause; | ||
this.SmartFilterExplanation = result.userExplanation; | ||
} | ||
@@ -216,3 +218,3 @@ // now that we have the SmartFilterWhereClause, we need to update the WhereClause property | ||
async GenerateSmartFilterWhereClause(prompt, entityInfo) { | ||
return ''; // stub function returns blank where clause. Sub-Class will do this. | ||
return { whereClause: '', userExplanation: '' }; // stub function returns blank where clause. Sub-Class will do this. | ||
} | ||
@@ -219,0 +221,0 @@ /** |
{ | ||
"name": "@memberjunction/core-entities", | ||
"version": "0.9.18", | ||
"version": "0.9.19", | ||
"description": "Entity subclasses for the metadata layer of MemberJunction defined in the MJ_CORE schema (usually 'admin'), distributed as part of each release of MemberJunction", | ||
@@ -22,5 +22,5 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@memberjunction/core": "^0.9.45", | ||
"@memberjunction/global": "^0.9.45" | ||
"@memberjunction/core": "^0.9.46", | ||
"@memberjunction/global": "^0.9.46" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
471085
13577