@mcp-consultant-tools/powerplatform-core 26.0.0-beta.2
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/build/auth/index.d.ts +64 -0
- package/build/auth/index.d.ts.map +1 -0
- package/build/auth/index.js +39 -0
- package/build/auth/index.js.map +1 -0
- package/build/auth/interactive-auth.d.ts +60 -0
- package/build/auth/interactive-auth.d.ts.map +1 -0
- package/build/auth/interactive-auth.js +429 -0
- package/build/auth/interactive-auth.js.map +1 -0
- package/build/auth/service-principal-auth.d.ts +26 -0
- package/build/auth/service-principal-auth.d.ts.map +1 -0
- package/build/auth/service-principal-auth.js +60 -0
- package/build/auth/service-principal-auth.js.map +1 -0
- package/build/auth/token-cache.d.ts +40 -0
- package/build/auth/token-cache.d.ts.map +1 -0
- package/build/auth/token-cache.js +108 -0
- package/build/auth/token-cache.js.map +1 -0
- package/build/client/PowerPlatformClient.d.ts +78 -0
- package/build/client/PowerPlatformClient.d.ts.map +1 -0
- package/build/client/PowerPlatformClient.js +198 -0
- package/build/client/PowerPlatformClient.js.map +1 -0
- package/build/client/index.d.ts +6 -0
- package/build/client/index.d.ts.map +1 -0
- package/build/client/index.js +6 -0
- package/build/client/index.js.map +1 -0
- package/build/client/types.d.ts +300 -0
- package/build/client/types.d.ts.map +1 -0
- package/build/client/types.js +5 -0
- package/build/client/types.js.map +1 -0
- package/build/index.d.ts +36 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +55 -0
- package/build/index.js.map +1 -0
- package/build/services/AppManagementService.d.ts +95 -0
- package/build/services/AppManagementService.d.ts.map +1 -0
- package/build/services/AppManagementService.js +322 -0
- package/build/services/AppManagementService.js.map +1 -0
- package/build/services/AppService.d.ts +39 -0
- package/build/services/AppService.d.ts.map +1 -0
- package/build/services/AppService.js +173 -0
- package/build/services/AppService.js.map +1 -0
- package/build/services/AttributeService.d.ts +28 -0
- package/build/services/AttributeService.d.ts.map +1 -0
- package/build/services/AttributeService.js +86 -0
- package/build/services/AttributeService.js.map +1 -0
- package/build/services/BusinessRuleService.d.ts +22 -0
- package/build/services/BusinessRuleService.d.ts.map +1 -0
- package/build/services/BusinessRuleService.js +85 -0
- package/build/services/BusinessRuleService.js.map +1 -0
- package/build/services/DataService.d.ts +53 -0
- package/build/services/DataService.d.ts.map +1 -0
- package/build/services/DataService.js +204 -0
- package/build/services/DataService.js.map +1 -0
- package/build/services/DependencyService.d.ts +27 -0
- package/build/services/DependencyService.d.ts.map +1 -0
- package/build/services/DependencyService.js +47 -0
- package/build/services/DependencyService.js.map +1 -0
- package/build/services/EntityService.d.ts +42 -0
- package/build/services/EntityService.d.ts.map +1 -0
- package/build/services/EntityService.js +132 -0
- package/build/services/EntityService.js.map +1 -0
- package/build/services/FlowService.d.ts +55 -0
- package/build/services/FlowService.d.ts.map +1 -0
- package/build/services/FlowService.js +608 -0
- package/build/services/FlowService.js.map +1 -0
- package/build/services/FormService.d.ts +36 -0
- package/build/services/FormService.d.ts.map +1 -0
- package/build/services/FormService.js +55 -0
- package/build/services/FormService.js.map +1 -0
- package/build/services/MetadataService.d.ts +63 -0
- package/build/services/MetadataService.d.ts.map +1 -0
- package/build/services/MetadataService.js +176 -0
- package/build/services/MetadataService.js.map +1 -0
- package/build/services/OptionSetService.d.ts +40 -0
- package/build/services/OptionSetService.d.ts.map +1 -0
- package/build/services/OptionSetService.js +91 -0
- package/build/services/OptionSetService.js.map +1 -0
- package/build/services/PluginDeploymentService.d.ts +102 -0
- package/build/services/PluginDeploymentService.d.ts.map +1 -0
- package/build/services/PluginDeploymentService.js +412 -0
- package/build/services/PluginDeploymentService.js.map +1 -0
- package/build/services/PluginService.d.ts +61 -0
- package/build/services/PluginService.d.ts.map +1 -0
- package/build/services/PluginService.js +289 -0
- package/build/services/PluginService.js.map +1 -0
- package/build/services/PublishingService.d.ts +37 -0
- package/build/services/PublishingService.d.ts.map +1 -0
- package/build/services/PublishingService.js +65 -0
- package/build/services/PublishingService.js.map +1 -0
- package/build/services/RelationshipService.d.ts +29 -0
- package/build/services/RelationshipService.d.ts.map +1 -0
- package/build/services/RelationshipService.js +46 -0
- package/build/services/RelationshipService.js.map +1 -0
- package/build/services/SolutionService.d.ts +60 -0
- package/build/services/SolutionService.d.ts.map +1 -0
- package/build/services/SolutionService.js +125 -0
- package/build/services/SolutionService.js.map +1 -0
- package/build/services/ValidationService.d.ts +31 -0
- package/build/services/ValidationService.d.ts.map +1 -0
- package/build/services/ValidationService.js +391 -0
- package/build/services/ValidationService.js.map +1 -0
- package/build/services/ViewService.d.ts +36 -0
- package/build/services/ViewService.d.ts.map +1 -0
- package/build/services/ViewService.js +55 -0
- package/build/services/ViewService.js.map +1 -0
- package/build/services/WebResourceService.d.ts +40 -0
- package/build/services/WebResourceService.d.ts.map +1 -0
- package/build/services/WebResourceService.js +64 -0
- package/build/services/WebResourceService.js.map +1 -0
- package/build/services/WorkflowManagementService.d.ts +157 -0
- package/build/services/WorkflowManagementService.d.ts.map +1 -0
- package/build/services/WorkflowManagementService.js +567 -0
- package/build/services/WorkflowManagementService.js.map +1 -0
- package/build/services/WorkflowService.d.ts +28 -0
- package/build/services/WorkflowService.d.ts.map +1 -0
- package/build/services/WorkflowService.js +285 -0
- package/build/services/WorkflowService.js.map +1 -0
- package/build/services/index.d.ts +29 -0
- package/build/services/index.d.ts.map +1 -0
- package/build/services/index.js +31 -0
- package/build/services/index.js.map +1 -0
- package/build/utils/auditLogger.d.ts +76 -0
- package/build/utils/auditLogger.d.ts.map +1 -0
- package/build/utils/auditLogger.js +110 -0
- package/build/utils/auditLogger.js.map +1 -0
- package/build/utils/best-practices-formatters.d.ts +26 -0
- package/build/utils/best-practices-formatters.d.ts.map +1 -0
- package/build/utils/best-practices-formatters.js +238 -0
- package/build/utils/best-practices-formatters.js.map +1 -0
- package/build/utils/bestPractices.d.ts +150 -0
- package/build/utils/bestPractices.d.ts.map +1 -0
- package/build/utils/bestPractices.js +324 -0
- package/build/utils/bestPractices.js.map +1 -0
- package/build/utils/iconManager.d.ts +84 -0
- package/build/utils/iconManager.d.ts.map +1 -0
- package/build/utils/iconManager.js +338 -0
- package/build/utils/iconManager.js.map +1 -0
- package/build/utils/index.d.ts +11 -0
- package/build/utils/index.d.ts.map +1 -0
- package/build/utils/index.js +18 -0
- package/build/utils/index.js.map +1 -0
- package/build/utils/prompt-templates.d.ts +9 -0
- package/build/utils/prompt-templates.d.ts.map +1 -0
- package/build/utils/prompt-templates.js +31 -0
- package/build/utils/prompt-templates.js.map +1 -0
- package/build/utils/publisherConfig.d.ts +33 -0
- package/build/utils/publisherConfig.d.ts.map +1 -0
- package/build/utils/publisherConfig.js +54 -0
- package/build/utils/publisherConfig.js.map +1 -0
- package/build/utils/rate-limiter.d.ts +108 -0
- package/build/utils/rate-limiter.d.ts.map +1 -0
- package/build/utils/rate-limiter.js +242 -0
- package/build/utils/rate-limiter.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EntityService
|
|
3
|
+
*
|
|
4
|
+
* Service for entity (table) customization operations.
|
|
5
|
+
* Note: This service should only be used by powerplatform-customization package.
|
|
6
|
+
*/
|
|
7
|
+
import { bestPracticesValidator } from '../utils/bestPractices.js';
|
|
8
|
+
import { iconManager } from '../utils/iconManager.js';
|
|
9
|
+
import { rateLimiter } from '../utils/rate-limiter.js';
|
|
10
|
+
export class EntityService {
|
|
11
|
+
client;
|
|
12
|
+
constructor(client) {
|
|
13
|
+
this.client = client;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Create a new custom entity (table)
|
|
17
|
+
*/
|
|
18
|
+
async createEntity(entityDefinition, solutionUniqueName) {
|
|
19
|
+
// Validate entity name against best practices
|
|
20
|
+
const schemaName = entityDefinition.SchemaName ||
|
|
21
|
+
entityDefinition.LogicalName;
|
|
22
|
+
const isRefData = schemaName?.toLowerCase().includes('ref_') || false;
|
|
23
|
+
const nameValidation = bestPracticesValidator.validateEntityName(schemaName, isRefData);
|
|
24
|
+
if (!nameValidation.isValid) {
|
|
25
|
+
throw new Error(`Entity name validation failed: ${nameValidation.issues.join(', ')}`);
|
|
26
|
+
}
|
|
27
|
+
// Validate ownership type
|
|
28
|
+
const ownershipType = entityDefinition.OwnershipType;
|
|
29
|
+
if (ownershipType) {
|
|
30
|
+
bestPracticesValidator.validateOwnershipType(ownershipType);
|
|
31
|
+
}
|
|
32
|
+
const headers = {};
|
|
33
|
+
if (solutionUniqueName) {
|
|
34
|
+
headers['MSCRM.SolutionUniqueName'] = solutionUniqueName;
|
|
35
|
+
}
|
|
36
|
+
// Execute with rate limiting
|
|
37
|
+
return rateLimiter.execute(async () => {
|
|
38
|
+
return this.client.makeRequest('api/data/v9.2/EntityDefinitions', 'POST', entityDefinition, headers);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Update an existing entity
|
|
43
|
+
*/
|
|
44
|
+
async updateEntity(metadataId, updates, solutionUniqueName) {
|
|
45
|
+
const headers = {
|
|
46
|
+
'MSCRM.MergeLabels': 'true',
|
|
47
|
+
};
|
|
48
|
+
if (solutionUniqueName) {
|
|
49
|
+
headers['MSCRM.SolutionUniqueName'] = solutionUniqueName;
|
|
50
|
+
}
|
|
51
|
+
await this.client.makeRequest(`api/data/v9.2/EntityDefinitions(${metadataId})`, 'PUT', updates, headers);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Delete a custom entity
|
|
55
|
+
*/
|
|
56
|
+
async deleteEntity(metadataId) {
|
|
57
|
+
await this.client.makeRequest(`api/data/v9.2/EntityDefinitions(${metadataId})`, 'DELETE');
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Update entity icon using Fluent UI System Icon
|
|
61
|
+
*/
|
|
62
|
+
async updateEntityIcon(entityLogicalName, iconFileName, dependencies, solutionUniqueName) {
|
|
63
|
+
// Step 1: Get entity metadata
|
|
64
|
+
const entityMetadata = await dependencies.getEntityMetadata(entityLogicalName);
|
|
65
|
+
const entitySchemaName = entityMetadata.SchemaName;
|
|
66
|
+
const metadataId = entityMetadata.MetadataId;
|
|
67
|
+
if (!metadataId) {
|
|
68
|
+
throw new Error(`Could not find MetadataId for entity '${entityLogicalName}'`);
|
|
69
|
+
}
|
|
70
|
+
// Step 2: Fetch the icon SVG from Fluent UI GitHub
|
|
71
|
+
const svgContent = await iconManager.fetchIcon(iconFileName);
|
|
72
|
+
// Step 3: Validate the SVG
|
|
73
|
+
const validation = iconManager.validateIconSvg(svgContent);
|
|
74
|
+
if (!validation.valid) {
|
|
75
|
+
throw new Error(`Invalid SVG: ${validation.error}`);
|
|
76
|
+
}
|
|
77
|
+
// Step 4: Convert SVG to base64
|
|
78
|
+
const base64Content = Buffer.from(svgContent).toString('base64');
|
|
79
|
+
// Step 5: Generate web resource name
|
|
80
|
+
const webResourceName = iconManager.generateWebResourceName(entitySchemaName, iconFileName.replace('.svg', ''));
|
|
81
|
+
// Step 6: Check if web resource already exists
|
|
82
|
+
const existingResourcesResponse = await this.client.makeRequest(`api/data/v9.2/webresourceset?$filter=name eq '${webResourceName}'&$select=webresourceid,name`);
|
|
83
|
+
let webResourceId;
|
|
84
|
+
const displayName = entityMetadata.DisplayName
|
|
85
|
+
?.UserLocalizedLabel?.Label || entityLogicalName;
|
|
86
|
+
if (existingResourcesResponse.value &&
|
|
87
|
+
existingResourcesResponse.value.length > 0) {
|
|
88
|
+
// Web resource exists, update it
|
|
89
|
+
const existing = existingResourcesResponse.value[0];
|
|
90
|
+
webResourceId = existing.webresourceid;
|
|
91
|
+
await dependencies.updateWebResource(webResourceId, {
|
|
92
|
+
displayname: `Icon for ${displayName}`,
|
|
93
|
+
content: base64Content,
|
|
94
|
+
description: `Fluent UI icon (${iconFileName}) for ${entityLogicalName} entity`,
|
|
95
|
+
}, solutionUniqueName);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
// Web resource doesn't exist, create new
|
|
99
|
+
const webResourceResult = await dependencies.createWebResource({
|
|
100
|
+
name: webResourceName,
|
|
101
|
+
displayname: `Icon for ${displayName}`,
|
|
102
|
+
webresourcetype: 11, // SVG
|
|
103
|
+
content: base64Content,
|
|
104
|
+
description: `Fluent UI icon (${iconFileName}) for ${entityLogicalName} entity`,
|
|
105
|
+
}, solutionUniqueName);
|
|
106
|
+
webResourceId = webResourceResult.webresourceid;
|
|
107
|
+
}
|
|
108
|
+
// Step 7: Generate icon vector name
|
|
109
|
+
const iconVectorName = iconManager.generateIconVectorName(webResourceName);
|
|
110
|
+
// Step 8: Update entity metadata with icon reference
|
|
111
|
+
const entityUpdates = {
|
|
112
|
+
'@odata.type': 'Microsoft.Dynamics.CRM.EntityMetadata',
|
|
113
|
+
IconVectorName: iconVectorName,
|
|
114
|
+
};
|
|
115
|
+
await this.updateEntity(metadataId, entityUpdates, solutionUniqueName);
|
|
116
|
+
// Step 9: Publish the web resource (component type 61)
|
|
117
|
+
await dependencies.publishComponent(webResourceId, 61);
|
|
118
|
+
// Step 10: Publish the entity (component type 1)
|
|
119
|
+
await dependencies.publishComponent(metadataId, 1);
|
|
120
|
+
return {
|
|
121
|
+
success: true,
|
|
122
|
+
entityLogicalName,
|
|
123
|
+
entitySchemaName,
|
|
124
|
+
iconFileName,
|
|
125
|
+
webResourceId,
|
|
126
|
+
webResourceName,
|
|
127
|
+
iconVectorName,
|
|
128
|
+
message: 'Entity icon updated and published successfully. The icon should now be visible in the UI.',
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=EntityService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityService.js","sourceRoot":"","sources":["../../src/services/EntityService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;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AAC;QAE3E,qDAAqD;QACrD,MAAM,aAAa,GAAG;YACpB,aAAa,EAAE,uCAAuC;YACtD,cAAc,EAAE,cAAc;SAC/B,CAAC;QAEF,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,aAAa,EAAE,kBAAkB,CAAC,CAAC;QAEvE,uDAAuD;QACvD,MAAM,YAAY,CAAC,gBAAgB,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;QAEvD,iDAAiD;QACjD,MAAM,YAAY,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QAEnD,OAAO;YACL,OAAO,EAAE,IAAI;YACb,iBAAiB;YACjB,gBAAgB;YAChB,YAAY;YACZ,aAAa;YACb,eAAe;YACf,cAAc;YACd,OAAO,EACL,2FAA2F;SAC9F,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowService
|
|
3
|
+
*
|
|
4
|
+
* Read-only service for Power Automate cloud flows.
|
|
5
|
+
*/
|
|
6
|
+
import type { PowerPlatformClient } from '../client/PowerPlatformClient.js';
|
|
7
|
+
import type { FlowFilterOptions, FlowListResult } from '../client/types.js';
|
|
8
|
+
export declare class FlowService {
|
|
9
|
+
private client;
|
|
10
|
+
private environmentId;
|
|
11
|
+
constructor(client: PowerPlatformClient);
|
|
12
|
+
/**
|
|
13
|
+
* Get Power Automate cloud flows with smart filtering
|
|
14
|
+
*/
|
|
15
|
+
getFlows(options?: FlowFilterOptions): Promise<FlowListResult>;
|
|
16
|
+
/**
|
|
17
|
+
* Search workflows (both classic workflows and Power Automate flows)
|
|
18
|
+
*/
|
|
19
|
+
searchWorkflows(options?: {
|
|
20
|
+
name?: string;
|
|
21
|
+
primaryEntity?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
category?: number;
|
|
24
|
+
statecode?: number;
|
|
25
|
+
includeDescription?: boolean;
|
|
26
|
+
maxResults?: number;
|
|
27
|
+
}): Promise<{
|
|
28
|
+
totalCount: number;
|
|
29
|
+
hasMore: boolean;
|
|
30
|
+
requestedMax: number;
|
|
31
|
+
workflows: unknown[];
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Get a specific Power Automate flow with its complete definition
|
|
35
|
+
*/
|
|
36
|
+
getFlowDefinition(flowId: string, summary?: boolean): Promise<unknown>;
|
|
37
|
+
/**
|
|
38
|
+
* Parse a flow definition to extract a summary
|
|
39
|
+
*/
|
|
40
|
+
parseFlowSummary(flowDef: Record<string, unknown>): Record<string, unknown>;
|
|
41
|
+
/**
|
|
42
|
+
* Get flow run history for a specific Power Automate flow
|
|
43
|
+
*/
|
|
44
|
+
getFlowRuns(flowId: string, maxRecords?: number): Promise<{
|
|
45
|
+
flowId: string;
|
|
46
|
+
totalCount: number;
|
|
47
|
+
runs: unknown[];
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* Get detailed flow run information
|
|
51
|
+
*/
|
|
52
|
+
getFlowRunDetails(flowId: string, runId: string): Promise<unknown>;
|
|
53
|
+
private getEnvironmentId;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=FlowService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowService.d.ts","sourceRoot":"","sources":["../../src/services/FlowService.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAEV,iBAAiB,EACjB,cAAc,EAEf,MAAM,oBAAoB,CAAC;AA4C5B,qBAAa,WAAW;IAGV,OAAO,CAAC,MAAM;IAF1B,OAAO,CAAC,aAAa,CAAuB;gBAExB,MAAM,EAAE,mBAAmB;IAE/C;;OAEG;IACG,QAAQ,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,cAAc,CAAC;IAgHxE;;OAEG;IACG,eAAe,CACnB,OAAO,GAAE;QACP,IAAI,CAAC,EA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