@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.
Files changed (153) hide show
  1. package/build/auth/index.d.ts +64 -0
  2. package/build/auth/index.d.ts.map +1 -0
  3. package/build/auth/index.js +39 -0
  4. package/build/auth/index.js.map +1 -0
  5. package/build/auth/interactive-auth.d.ts +60 -0
  6. package/build/auth/interactive-auth.d.ts.map +1 -0
  7. package/build/auth/interactive-auth.js +429 -0
  8. package/build/auth/interactive-auth.js.map +1 -0
  9. package/build/auth/service-principal-auth.d.ts +26 -0
  10. package/build/auth/service-principal-auth.d.ts.map +1 -0
  11. package/build/auth/service-principal-auth.js +60 -0
  12. package/build/auth/service-principal-auth.js.map +1 -0
  13. package/build/auth/token-cache.d.ts +40 -0
  14. package/build/auth/token-cache.d.ts.map +1 -0
  15. package/build/auth/token-cache.js +108 -0
  16. package/build/auth/token-cache.js.map +1 -0
  17. package/build/client/PowerPlatformClient.d.ts +78 -0
  18. package/build/client/PowerPlatformClient.d.ts.map +1 -0
  19. package/build/client/PowerPlatformClient.js +198 -0
  20. package/build/client/PowerPlatformClient.js.map +1 -0
  21. package/build/client/index.d.ts +6 -0
  22. package/build/client/index.d.ts.map +1 -0
  23. package/build/client/index.js +6 -0
  24. package/build/client/index.js.map +1 -0
  25. package/build/client/types.d.ts +300 -0
  26. package/build/client/types.d.ts.map +1 -0
  27. package/build/client/types.js +5 -0
  28. package/build/client/types.js.map +1 -0
  29. package/build/index.d.ts +36 -0
  30. package/build/index.d.ts.map +1 -0
  31. package/build/index.js +55 -0
  32. package/build/index.js.map +1 -0
  33. package/build/services/AppManagementService.d.ts +95 -0
  34. package/build/services/AppManagementService.d.ts.map +1 -0
  35. package/build/services/AppManagementService.js +322 -0
  36. package/build/services/AppManagementService.js.map +1 -0
  37. package/build/services/AppService.d.ts +39 -0
  38. package/build/services/AppService.d.ts.map +1 -0
  39. package/build/services/AppService.js +173 -0
  40. package/build/services/AppService.js.map +1 -0
  41. package/build/services/AttributeService.d.ts +28 -0
  42. package/build/services/AttributeService.d.ts.map +1 -0
  43. package/build/services/AttributeService.js +86 -0
  44. package/build/services/AttributeService.js.map +1 -0
  45. package/build/services/BusinessRuleService.d.ts +22 -0
  46. package/build/services/BusinessRuleService.d.ts.map +1 -0
  47. package/build/services/BusinessRuleService.js +85 -0
  48. package/build/services/BusinessRuleService.js.map +1 -0
  49. package/build/services/DataService.d.ts +53 -0
  50. package/build/services/DataService.d.ts.map +1 -0
  51. package/build/services/DataService.js +204 -0
  52. package/build/services/DataService.js.map +1 -0
  53. package/build/services/DependencyService.d.ts +27 -0
  54. package/build/services/DependencyService.d.ts.map +1 -0
  55. package/build/services/DependencyService.js +47 -0
  56. package/build/services/DependencyService.js.map +1 -0
  57. package/build/services/EntityService.d.ts +42 -0
  58. package/build/services/EntityService.d.ts.map +1 -0
  59. package/build/services/EntityService.js +132 -0
  60. package/build/services/EntityService.js.map +1 -0
  61. package/build/services/FlowService.d.ts +55 -0
  62. package/build/services/FlowService.d.ts.map +1 -0
  63. package/build/services/FlowService.js +608 -0
  64. package/build/services/FlowService.js.map +1 -0
  65. package/build/services/FormService.d.ts +36 -0
  66. package/build/services/FormService.d.ts.map +1 -0
  67. package/build/services/FormService.js +55 -0
  68. package/build/services/FormService.js.map +1 -0
  69. package/build/services/MetadataService.d.ts +63 -0
  70. package/build/services/MetadataService.d.ts.map +1 -0
  71. package/build/services/MetadataService.js +176 -0
  72. package/build/services/MetadataService.js.map +1 -0
  73. package/build/services/OptionSetService.d.ts +40 -0
  74. package/build/services/OptionSetService.d.ts.map +1 -0
  75. package/build/services/OptionSetService.js +91 -0
  76. package/build/services/OptionSetService.js.map +1 -0
  77. package/build/services/PluginDeploymentService.d.ts +102 -0
  78. package/build/services/PluginDeploymentService.d.ts.map +1 -0
  79. package/build/services/PluginDeploymentService.js +412 -0
  80. package/build/services/PluginDeploymentService.js.map +1 -0
  81. package/build/services/PluginService.d.ts +61 -0
  82. package/build/services/PluginService.d.ts.map +1 -0
  83. package/build/services/PluginService.js +289 -0
  84. package/build/services/PluginService.js.map +1 -0
  85. package/build/services/PublishingService.d.ts +37 -0
  86. package/build/services/PublishingService.d.ts.map +1 -0
  87. package/build/services/PublishingService.js +65 -0
  88. package/build/services/PublishingService.js.map +1 -0
  89. package/build/services/RelationshipService.d.ts +29 -0
  90. package/build/services/RelationshipService.d.ts.map +1 -0
  91. package/build/services/RelationshipService.js +46 -0
  92. package/build/services/RelationshipService.js.map +1 -0
  93. package/build/services/SolutionService.d.ts +60 -0
  94. package/build/services/SolutionService.d.ts.map +1 -0
  95. package/build/services/SolutionService.js +125 -0
  96. package/build/services/SolutionService.js.map +1 -0
  97. package/build/services/ValidationService.d.ts +31 -0
  98. package/build/services/ValidationService.d.ts.map +1 -0
  99. package/build/services/ValidationService.js +391 -0
  100. package/build/services/ValidationService.js.map +1 -0
  101. package/build/services/ViewService.d.ts +36 -0
  102. package/build/services/ViewService.d.ts.map +1 -0
  103. package/build/services/ViewService.js +55 -0
  104. package/build/services/ViewService.js.map +1 -0
  105. package/build/services/WebResourceService.d.ts +40 -0
  106. package/build/services/WebResourceService.d.ts.map +1 -0
  107. package/build/services/WebResourceService.js +64 -0
  108. package/build/services/WebResourceService.js.map +1 -0
  109. package/build/services/WorkflowManagementService.d.ts +157 -0
  110. package/build/services/WorkflowManagementService.d.ts.map +1 -0
  111. package/build/services/WorkflowManagementService.js +567 -0
  112. package/build/services/WorkflowManagementService.js.map +1 -0
  113. package/build/services/WorkflowService.d.ts +28 -0
  114. package/build/services/WorkflowService.d.ts.map +1 -0
  115. package/build/services/WorkflowService.js +285 -0
  116. package/build/services/WorkflowService.js.map +1 -0
  117. package/build/services/index.d.ts +29 -0
  118. package/build/services/index.d.ts.map +1 -0
  119. package/build/services/index.js +31 -0
  120. package/build/services/index.js.map +1 -0
  121. package/build/utils/auditLogger.d.ts +76 -0
  122. package/build/utils/auditLogger.d.ts.map +1 -0
  123. package/build/utils/auditLogger.js +110 -0
  124. package/build/utils/auditLogger.js.map +1 -0
  125. package/build/utils/best-practices-formatters.d.ts +26 -0
  126. package/build/utils/best-practices-formatters.d.ts.map +1 -0
  127. package/build/utils/best-practices-formatters.js +238 -0
  128. package/build/utils/best-practices-formatters.js.map +1 -0
  129. package/build/utils/bestPractices.d.ts +150 -0
  130. package/build/utils/bestPractices.d.ts.map +1 -0
  131. package/build/utils/bestPractices.js +324 -0
  132. package/build/utils/bestPractices.js.map +1 -0
  133. package/build/utils/iconManager.d.ts +84 -0
  134. package/build/utils/iconManager.d.ts.map +1 -0
  135. package/build/utils/iconManager.js +338 -0
  136. package/build/utils/iconManager.js.map +1 -0
  137. package/build/utils/index.d.ts +11 -0
  138. package/build/utils/index.d.ts.map +1 -0
  139. package/build/utils/index.js +18 -0
  140. package/build/utils/index.js.map +1 -0
  141. package/build/utils/prompt-templates.d.ts +9 -0
  142. package/build/utils/prompt-templates.d.ts.map +1 -0
  143. package/build/utils/prompt-templates.js +31 -0
  144. package/build/utils/prompt-templates.js.map +1 -0
  145. package/build/utils/publisherConfig.d.ts +33 -0
  146. package/build/utils/publisherConfig.d.ts.map +1 -0
  147. package/build/utils/publisherConfig.js +54 -0
  148. package/build/utils/publisherConfig.js.map +1 -0
  149. package/build/utils/rate-limiter.d.ts +108 -0
  150. package/build/utils/rate-limiter.d.ts.map +1 -0
  151. package/build/utils/rate-limiter.js +242 -0
  152. package/build/utils/rate-limiter.js.map +1 -0
  153. 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;AAEvD,MAAM,OAAO,aAAa;IACJ;IAApB,YAAoB,MAA2B;QAA3B,WAAM,GAAN,MAAM,CAAqB;IAAG,CAAC;IAEnD;;OAEG;IACH,KAAK,CAAC,YAAY,CAChB,gBAAyC,EACzC,kBAA2B;QAE3B,8CAA8C;QAC9C,MAAM,UAAU,GACb,gBAAgB,CAAC,UAAqB;YACtC,gBAAgB,CAAC,WAAsB,CAAC;QAC3C,MAAM,SAAS,GAAG,UAAU,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC;QACtE,MAAM,cAAc,GAAG,sBAAsB,CAAC,kBAAkB,CAC9D,UAAU,EACV,SAAS,CACV,CAAC;QAEF,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CACb,kCAAkC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACrE,CAAC;QACJ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ows.
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,MA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