UNPKG

powerplatform-review-tool

Version:

Evaluate Power Platform solution zip files based on best practice patterns

94 lines 3.78 kB
import { PatternResult } from "../interface/pattern"; /** * This function checks if each topic contains at least 5 trigger phrases. * It identifies topics that do not meet this requirement and returns a result indicating whether * all topics pass the check. * * @param topicsArray - A record of topics and their associated trigger queries. * @returns An object containing the pattern name, status, instance value, failure reason, and recommendation. */ /** * Now receives an array of topic objects. We extract the trigger phrases for each * topic in the function, and check if less than 5. */ export declare function patternCheckTriggerPhraseCount(topicsArray: Array<{ name: string; data: any; isEnabled?: boolean; }>): Promise<PatternResult>; /** * This function checks if any of the trigger phrases in the topics are single words. * It identifies topics that contain single-word phrases and returns a result. * * @param topicsArray - A record of topics and their associated trigger queries. * @returns An object containing the pattern name, status, instance value, failure reason, and recommendation. */ export declare function patternCheckSingleWordPhrases(topicsArray: Array<{ name: string; data: any; isEnabled?: boolean; }>): Promise<PatternResult>; /** * This function checks if any of the trigger phrases in the topics exceed 10 words in length. * It identifies topics with overly long phrases and returns a result. * * @param topicsArray - An array of topics. * @returns An object containing the pattern name, status, instance value, failure reason, and recommendation. */ export declare function patternCheckLongPhrases(topicsArray: Array<{ name: string; data: any; isEnabled?: boolean; }>): Promise<PatternResult>; export declare function patternCheckConditionCount(topics: Array<{ name: string; data: any; isEnabled?: boolean; }>): Promise<PatternResult>; export declare function patternCheckFlowCount(topics: Array<{ name: string; data: any; isEnabled?: boolean; }>): Promise<PatternResult>; export declare function patternCheckSharePointAuthMode(finalBotData: any): Promise<PatternResult>; /** * Checks for topics that have no trigger queries and are not referenced by any other topic * in a `BeginDialog` action's `dialog` property. */ export declare function patternCheckUnusedTopics(topics: Array<{ name: string; botComponentXml: string | null; data: any; isEnabled?: boolean; }>, botLogicalName: string): Promise<PatternResult>; /** * Checks synonyms within ClosedListEntity definitions to ensure no synonym is more than 2 words long. * Returns an array of objects, each containing just { entityName, longSynonyms }. * * If `entityArray` is null, undefined, or empty, it automatically **passes**. */ export declare function patternCheckSynonymsQuality(entityArray?: Array<{ name: string; data: any; }>): Promise<PatternResult>; /** * Checks for duplicate RegexEntity patterns across entities in finalBotData.botComponents.entity. * If multiple entities use the same `pattern` property, it is flagged as a failure. * * If `entityArray` is null, undefined, or empty, it automatically **passes**. */ export declare function patternCheckDuplicateRegexEntities(entityArray?: Array<{ name: string; botComponentXml: string | null; data: any; }>): Promise<PatternResult>; /** * Checks if there's at least one End Of Conversation topic (enabled) and at least one other topic (enabled) * that references it. */ export declare function patternCheckEndOfConversationUsage(topics: Array<{ name: string; data: any; isEnabled?: boolean; }>, botLogicalName: string): Promise<PatternResult>; //# sourceMappingURL=copilotPatterns.d.ts.map