@mcp-consultant-tools/powerplatform-data
Version:
MCP server for PowerPlatform data CRUD operations (operational use)
84 lines • 2.34 kB
TypeScript
/**
* Icon Management Module
*
* Integrates with Fluent UI System Icons for entity icon management.
* Fetches SVG icons from GitHub and uploads them as web resources.
*/
export interface IconSuggestion {
name: string;
fileName: string;
url: string;
category: string;
}
export interface IconUploadResult {
webResourceId: string;
webResourceName: string;
iconVectorName: string;
success: boolean;
error?: string;
}
/**
* Icon Manager Class
*/
export declare class IconManager {
private baseUrl;
private cache;
constructor();
/**
* Suggest icons based on entity name or type
*/
suggestIcons(entityName: string): IconSuggestion[];
/**
* Populate full URLs for icon suggestions
*/
private populateUrls;
/**
* Parse icon filename and construct GitHub path
* Converts: people_community_24_filled.svg
* To: assets/People Community/SVG/ic_fluent_people_community_24_filled.svg
*/
private constructFluentIconPath;
/**
* Fetch SVG icon from Fluent UI GitHub repository
*/
fetchIcon(fileName: string): Promise<string>;
/**
* Generate web resource name for icon
*/
generateWebResourceName(entitySchemaName: string, iconName: string): string;
/**
* Generate icon vector name for EntityMetadata
* Uses $webresource: directive which is the correct syntax for Dynamics 365
* This creates a solution dependency and tells the system to look up the web resource by name
*/
generateIconVectorName(webResourceName: string): string;
/**
* Validate icon SVG content
*/
validateIconSvg(svg: string): {
valid: boolean;
error?: string;
};
/**
* Get all available icon categories
*/
getCategories(): string[];
/**
* Search icons by name
*/
searchIcons(searchTerm: string): IconSuggestion[];
/**
* Get icons by category
*/
getIconsByCategory(category: string): IconSuggestion[];
/**
* Build custom icon URL for specific size/style
*/
buildIconUrl(iconName: string, size?: number, style?: 'filled' | 'regular'): string;
/**
* Clear icon cache
*/
clearCache(): void;
}
export declare const iconManager: IconManager;
//# sourceMappingURL=iconManager.d.ts.map