@mcp-consultant-tools/powerplatform-customization 25.0.0 → 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.
@@ -1,132 +1,75 @@
1
- export interface PowerPlatformConfig {
2
- organizationUrl: string;
3
- clientId: string;
4
- clientSecret: string;
5
- tenantId: string;
6
- }
7
- export interface ApiCollectionResponse<T> {
8
- value: T[];
9
- [key: string]: any;
10
- }
1
+ /**
2
+ * PowerPlatformService - Slim Customization Facade
3
+ *
4
+ * This is a facade that delegates to services in @mcp-consultant-tools/powerplatform-core.
5
+ * It provides CUSTOMIZATION operations for PowerPlatform/Dataverse entities.
6
+ *
7
+ * For read-only operations, use @mcp-consultant-tools/powerplatform.
8
+ * For data CRUD operations, use @mcp-consultant-tools/powerplatform-data.
9
+ */
10
+ import { type PowerPlatformConfig, type ApiCollectionResponse, type RegisterPluginStepOptions, type RegisterPluginImageOptions, type AuthProvider } from '@mcp-consultant-tools/powerplatform-core';
11
+ export type { PowerPlatformConfig, ApiCollectionResponse };
11
12
  export declare class PowerPlatformService {
12
- private config;
13
- private msalClient;
14
- private accessToken;
15
- private tokenExpirationTime;
16
- constructor(config: PowerPlatformConfig);
17
- /**
18
- * Get an access token for the PowerPlatform API
19
- */
20
- private getAccessToken;
21
- /**
22
- * Make an authenticated request to the PowerPlatform API
23
- * Extended to support all HTTP methods for write operations
24
- */
25
- private makeRequest;
26
- /**
27
- * Get metadata about an entity
28
- * @param entityName The logical name of the entity
29
- */
30
- getEntityMetadata(entityName: string): Promise<any>;
31
- /**
32
- * Get metadata about entity attributes/fields
33
- * @param entityName The logical name of the entity
34
- */
35
- getEntityAttributes(entityName: string): Promise<ApiCollectionResponse<any>>;
36
- /**
37
- * Get metadata about a specific entity attribute/field
38
- * @param entityName The logical name of the entity
39
- * @param attributeName The logical name of the attribute
40
- */
41
- getEntityAttribute(entityName: string, attributeName: string): Promise<any>;
42
- /**
43
- * Get one-to-many relationships for an entity
44
- * @param entityName The logical name of the entity
45
- */
46
- getEntityOneToManyRelationships(entityName: string): Promise<ApiCollectionResponse<any>>;
47
- /**
48
- * Get many-to-many relationships for an entity
49
- * @param entityName The logical name of the entity
50
- */
51
- getEntityManyToManyRelationships(entityName: string): Promise<ApiCollectionResponse<any>>;
52
- /**
53
- * Get all relationships (one-to-many and many-to-many) for an entity
54
- * @param entityName The logical name of the entity
55
- */
13
+ private client;
14
+ private metadata;
15
+ private plugin;
16
+ private flow;
17
+ private workflow;
18
+ private businessRule;
19
+ private app;
20
+ private validation;
21
+ private entity;
22
+ private attribute;
23
+ private relationship;
24
+ private optionSet;
25
+ private form;
26
+ private view;
27
+ private webResource;
28
+ private solution;
29
+ private publishing;
30
+ private dependency;
31
+ private pluginDeployment;
32
+ private appManagement;
33
+ private workflowManagement;
34
+ constructor(config: PowerPlatformConfig, authProvider?: AuthProvider);
35
+ getAuthMode(): 'service-principal' | 'interactive';
36
+ getUserInfo(): Promise<{
37
+ name: string;
38
+ email: string;
39
+ oid: string;
40
+ } | null>;
41
+ logout(): Promise<void>;
42
+ getEntityMetadata(entityName: string): Promise<unknown>;
43
+ getEntityAttributes(entityName: string, options?: {
44
+ prefix?: string;
45
+ attributeType?: string;
46
+ maxAttributes?: number;
47
+ }): Promise<{
48
+ value: unknown[];
49
+ hasMore: boolean;
50
+ returnedCount: number;
51
+ totalBeforeFilter?: number;
52
+ }>;
53
+ getEntityAttribute(entityName: string, attributeName: string): Promise<unknown>;
56
54
  getEntityRelationships(entityName: string): Promise<{
57
- oneToMany: ApiCollectionResponse<any>;
58
- manyToMany: ApiCollectionResponse<any>;
55
+ oneToMany: ApiCollectionResponse<unknown>;
56
+ manyToMany: ApiCollectionResponse<unknown>;
59
57
  }>;
60
- /**
61
- * Get a global option set definition by name
62
- * @param optionSetName The name of the global option set
63
- * @returns The global option set definition
64
- */
65
- getGlobalOptionSet(optionSetName: string): Promise<any>;
66
- /**
67
- * Get a specific record by entity name (plural) and ID
68
- * @param entityNamePlural The plural name of the entity (e.g., 'accounts', 'contacts')
69
- * @param recordId The GUID of the record
70
- * @returns The record data
71
- */
72
- getRecord(entityNamePlural: string, recordId: string): Promise<any>;
73
- /**
74
- * Query records using entity name (plural) and a filter expression
75
- * @param entityNamePlural The plural name of the entity (e.g., 'accounts', 'contacts')
76
- * @param filter OData filter expression (e.g., "name eq 'test'")
77
- * @param maxRecords Maximum number of records to retrieve (default: 50)
78
- * @returns Filtered list of records
79
- */
80
- queryRecords(entityNamePlural: string, filter: string, maxRecords?: number): Promise<ApiCollectionResponse<any>>;
81
- /**
82
- * Create a new record in Dataverse
83
- * @param entityNamePlural The plural name of the entity (e.g., 'accounts', 'contacts')
84
- * @param data Record data as JSON object (field names must match logical names)
85
- * @returns Created record with ID and OData context
86
- */
87
- createRecord(entityNamePlural: string, data: Record<string, any>): Promise<any>;
88
- /**
89
- * Update an existing record in Dataverse
90
- * @param entityNamePlural The plural name of the entity (e.g., 'accounts', 'contacts')
91
- * @param recordId The GUID of the record to update
92
- * @param data Partial record data to update (only fields being changed)
93
- * @returns Updated record (if Prefer header used) or void
94
- */
95
- updateRecord(entityNamePlural: string, recordId: string, data: Record<string, any>): Promise<any>;
96
- /**
97
- * Delete a record from Dataverse
98
- * @param entityNamePlural The plural name of the entity (e.g., 'accounts', 'contacts')
99
- * @param recordId The GUID of the record to delete
100
- * @returns Void (successful deletion returns 204 No Content)
101
- */
102
- deleteRecord(entityNamePlural: string, recordId: string): Promise<void>;
103
- /**
104
- * Get all plugin assemblies in the environment
105
- * @param includeManaged Include managed assemblies (default: false)
106
- * @param maxRecords Maximum number of assemblies to return (default: 100)
107
- * @returns List of plugin assemblies with basic information
108
- */
109
- getPluginAssemblies(includeManaged?: boolean, maxRecords?: number): Promise<any>;
110
- /**
111
- * Get a plugin assembly by name with all related plugin types, steps, and images
112
- * @param assemblyName The name of the plugin assembly
113
- * @param includeDisabled Include disabled steps (default: false)
114
- * @returns Complete plugin assembly information with validation
115
- */
116
- getPluginAssemblyComplete(assemblyName: string, includeDisabled?: boolean): Promise<any>;
117
- /**
118
- * Get all plugins that execute on a specific entity, organized by message and execution order
119
- * @param entityName The logical name of the entity
120
- * @param messageFilter Optional filter by message name (e.g., "Create", "Update")
121
- * @param includeDisabled Include disabled steps (default: false)
122
- * @returns Complete plugin pipeline for the entity
123
- */
124
- getEntityPluginPipeline(entityName: string, messageFilter?: string, includeDisabled?: boolean): Promise<any>;
125
- /**
126
- * Get plugin trace logs with filtering
127
- * @param options Filtering options for trace logs
128
- * @returns Filtered trace logs with parsed exception details
129
- */
58
+ getGlobalOptionSet(optionSetName: string): Promise<unknown>;
59
+ getGlobalOptionSets(options?: {
60
+ maxRecords?: number;
61
+ prefix?: string;
62
+ }): Promise<{
63
+ value: unknown[];
64
+ hasMore: boolean;
65
+ totalCount: number;
66
+ }>;
67
+ getPluginAssemblies(includeManaged?: boolean, maxRecords?: number): Promise<{
68
+ totalCount: number;
69
+ assemblies: unknown[];
70
+ }>;
71
+ getPluginAssemblyComplete(assemblyName: string, includeDisabled?: boolean): Promise<unknown>;
72
+ getEntityPluginPipeline(entityName: string, messageFilter?: string, includeDisabled?: boolean): Promise<unknown>;
130
73
  getPluginTraceLogs(options: {
131
74
  entityName?: string;
132
75
  messageName?: string;
@@ -135,651 +78,158 @@ export declare class PowerPlatformService {
135
78
  exceptionOnly?: boolean;
136
79
  hoursBack?: number;
137
80
  maxRecords?: number;
138
- }): Promise<any>;
139
- private getOperationTypeName;
140
- private extractExceptionType;
141
- private extractExceptionMessage;
142
- /**
143
- * Get all Power Automate flows (cloud flows) in the environment
144
- * @param activeOnly Only return activated flows (default: false)
145
- * @param maxRecords Maximum number of flows to return (default: 100)
146
- * @returns List of Power Automate flows with basic information
147
- */
148
- getFlows(activeOnly?: boolean, maxRecords?: number): Promise<any>;
149
- /**
150
- * Get a specific Power Automate flow with its complete definition
151
- * @param flowId The GUID of the flow (workflowid)
152
- * @returns Complete flow information including the flow definition JSON
153
- */
154
- getFlowDefinition(flowId: string): Promise<any>;
155
- /**
156
- * Get flow run history for a specific Power Automate flow
157
- * @param flowId The GUID of the flow (workflowid)
158
- * @param maxRecords Maximum number of runs to return (default: 100)
159
- * @returns List of flow runs with status, start time, duration, and error details
160
- */
161
- getFlowRuns(flowId: string, maxRecords?: number): Promise<any>;
162
- /**
163
- * Get all classic Dynamics workflows in the environment
164
- * @param activeOnly Only return activated workflows (default: false)
165
- * @param maxRecords Maximum number of workflows to return (default: 100)
166
- * @returns List of classic workflows with basic information
167
- */
168
- getWorkflows(activeOnly?: boolean, maxRecords?: number): Promise<any>;
169
- /**
170
- * Get a specific classic workflow with its complete XAML definition
171
- * @param workflowId The GUID of the workflow (workflowid)
172
- * @returns Complete workflow information including the XAML definition
173
- */
174
- getWorkflowDefinition(workflowId: string): Promise<any>;
175
- /**
176
- * Update a workflow's description field
177
- * @param workflowId GUID of the workflow
178
- * @param description New description content
179
- * @returns Previous and new description
180
- */
181
- updateWorkflowDescription(workflowId: string, description: string): Promise<{
182
- success: boolean;
183
- previousDescription: string;
184
- newDescription: string;
185
- }>;
186
- /**
187
- * Deactivate a workflow (set to Draft state)
188
- * @param workflowId GUID of the workflow
189
- * @returns Previous and new state information
190
- */
191
- deactivateWorkflow(workflowId: string): Promise<{
192
- success: boolean;
193
- workflowId: string;
194
- workflowName: string;
195
- previousState: string;
196
- newState: string;
197
- }>;
198
- /**
199
- * Activate a workflow (set to Activated state)
200
- * @param workflowId GUID of the workflow
201
- * @returns Previous and new state information
202
- */
203
- activateWorkflow(workflowId: string): Promise<{
204
- success: boolean;
205
- workflowId: string;
206
- workflowName: string;
207
- previousState: string;
208
- newState: string;
209
- }>;
210
- /**
211
- * Document a workflow safely by deactivating, updating description, and reactivating
212
- * Atomic operation with rollback on failure
213
- * @param workflowId GUID of the workflow
214
- * @param type Type of automation ('flow' or 'workflow'), auto-detected if not provided
215
- * @returns Documentation result with state management summary
216
- */
217
- documentWorkflowSafe(workflowId: string, type?: 'flow' | 'workflow'): Promise<{
218
- success: boolean;
219
- workflowId: string;
220
- workflowName: string;
221
- analysis: {
222
- tablesModified: string[];
223
- trigger: string;
224
- triggerFields: string[];
225
- actions: string[];
226
- actionCount: number;
227
- customApisCalled: string[];
228
- };
229
- descriptionUpdated: boolean;
230
- previousDescription: string;
231
- newDescription: string;
232
- stateManagement: {
233
- initialState: string;
234
- wasDeactivated: boolean;
235
- wasReactivated: boolean;
236
- finalState: string;
237
- };
238
- }>;
239
- /**
240
- * Generate YAML metadata block for automation documentation
241
- */
242
- private generateAutomationYaml;
243
- /**
244
- * Merge YAML metadata with existing description, preserving manual notes
245
- */
246
- private mergeDescriptionWithYaml;
247
- /**
248
- * Analyze a flow or workflow and document it with YAML metadata
249
- * @param automationId GUID of the flow or workflow
250
- * @param type Type of automation ('flow' or 'workflow'), auto-detected if not provided
251
- * @returns Analysis and description update result
252
- */
253
- documentAutomation(automationId: string, type?: 'flow' | 'workflow'): Promise<{
254
- analysis: {
255
- tablesModified: string[];
256
- trigger: string;
257
- triggerFields: string[];
258
- actions: string[];
259
- actionCount: number;
260
- customApisCalled: string[];
261
- };
262
- descriptionUpdated: boolean;
263
- previousDescription: string;
264
- newDescription: string;
81
+ }): Promise<{
82
+ totalCount: number;
83
+ logs: unknown[];
265
84
  }>;
266
- /**
267
- * Update a Power Automate flow's description field
268
- * @param flowId GUID of the flow (workflowid in workflows entity)
269
- * @param description New description content
270
- * @returns Previous and new description
271
- */
272
- updateFlowDescription(flowId: string, description: string): Promise<{
273
- success: boolean;
274
- previousDescription: string;
275
- newDescription: string;
85
+ getFlows(options?: {
86
+ activeOnly?: boolean;
87
+ maxRecords?: number;
88
+ }): Promise<unknown>;
89
+ getFlowDefinition(flowId: string, summary?: boolean): Promise<unknown>;
90
+ getFlowRuns(flowId: string, maxRecords?: number): Promise<unknown>;
91
+ getWorkflows(activeOnly?: boolean, maxRecords?: number): Promise<unknown>;
92
+ getWorkflowDefinition(workflowId: string, summary?: boolean): Promise<unknown>;
93
+ getBusinessRules(activeOnly?: boolean, maxRecords?: number): Promise<{
94
+ totalCount: number;
95
+ businessRules: unknown[];
276
96
  }>;
277
- /**
278
- * Get all business rules in the environment
279
- * @param activeOnly Only return activated business rules (default: false)
280
- * @param maxRecords Maximum number of business rules to return (default: 100)
281
- * @returns List of business rules with basic information
282
- */
283
- getBusinessRules(activeOnly?: boolean, maxRecords?: number): Promise<any>;
284
- /**
285
- * Get a specific business rule with its complete XAML definition
286
- * @param workflowId The GUID of the business rule (workflowid)
287
- * @returns Complete business rule information including the XAML definition
288
- */
289
- getBusinessRule(workflowId: string): Promise<any>;
290
- /**
291
- * Get all model-driven apps in the environment
292
- * @param activeOnly Only return active apps (default: false)
293
- * @param maxRecords Maximum number of apps to return (default: 100)
294
- * @returns List of model-driven apps with basic information
295
- */
296
- getApps(activeOnly?: boolean, maxRecords?: number, includeUnpublished?: boolean, solutionUniqueName?: string): Promise<any>;
297
- /**
298
- * Get a specific model-driven app by ID
299
- * @param appId The GUID of the app (appmoduleid)
300
- * @returns Complete app information including publisher details
301
- */
302
- getApp(appId: string): Promise<any>;
303
- /**
304
- * Get all components (entities, forms, views, sitemaps) associated with an app
305
- * @param appId The GUID of the app (appmoduleid)
306
- * @returns List of app components with type information
307
- */
308
- getAppComponents(appId: string): Promise<any>;
309
- /**
310
- * Get the sitemap for a specific app
311
- * @param appId The GUID of the app (appmoduleid)
312
- * @returns Sitemap information including XML
313
- */
314
- getAppSitemap(appId: string): Promise<any>;
315
- /**
316
- * Create a new model-driven app
317
- * @param appDefinition The app definition object
318
- * @param solutionUniqueName Optional solution to add the app to
319
- * @returns The created app information including ID
320
- */
321
- createApp(appDefinition: any, solutionUniqueName?: string): Promise<any>;
322
- /**
323
- * Create a sitemap from simplified configuration (no XML knowledge required)
324
- * @param config Simplified sitemap configuration
325
- * @param solutionUniqueName Optional solution to add the sitemap to
326
- * @returns The created sitemap information including ID and XML
327
- */
328
- createSimpleSitemap(config: any, solutionUniqueName?: string): Promise<any>;
329
- /**
330
- * Add entities to an app by modifying the sitemap XML
331
- * @param appId The GUID of the app
332
- * @param entityNames Array of entity logical names to add
333
- * @returns Result of the operation
334
- */
335
- addEntitiesToApp(appId: string, entityNames: string[]): Promise<any>;
336
- /**
337
- * Validate an app before publishing
338
- * @param appId The GUID of the app
339
- * @returns Validation result with any issues found
340
- */
341
- validateApp(appId: string): Promise<any>;
342
- /**
343
- * Publish an app to make it available to users
344
- * @param appId The GUID of the app
345
- * @returns Result of the publish operation
346
- */
347
- publishApp(appId: string): Promise<any>;
348
- /**
349
- * Helper to escape XML special characters
350
- */
351
- private escapeXml;
352
- /**
353
- * Create a new custom entity (table)
354
- * @param entityDefinition The entity definition object
355
- * @param solutionUniqueName Optional solution to add the entity to
356
- * @returns The created entity metadata
357
- */
358
- createEntity(entityDefinition: any, solutionUniqueName?: string): Promise<any>;
359
- /**
360
- * Update an existing entity
361
- * @param metadataId The MetadataId of the entity
362
- * @param updates The properties to update
363
- * @param solutionUniqueName Optional solution context
364
- */
365
- updateEntity(metadataId: string, updates: any, solutionUniqueName?: string): Promise<void>;
366
- /**
367
- * Delete a custom entity
368
- * @param metadataId The MetadataId of the entity to delete
369
- */
97
+ getBusinessRule(workflowId: string): Promise<unknown>;
98
+ getApps(activeOnly?: boolean, maxRecords?: number, includeUnpublished?: boolean, solutionUniqueName?: string): Promise<unknown>;
99
+ getApp(appId: string): Promise<unknown>;
100
+ getAppComponents(appId: string): Promise<unknown>;
101
+ getAppSitemap(appId: string): Promise<unknown>;
102
+ createEntity(entityDefinition: unknown, solutionUniqueName?: string): Promise<unknown>;
103
+ updateEntity(metadataId: string, updates: unknown, solutionUniqueName?: string): Promise<void>;
370
104
  deleteEntity(metadataId: string): Promise<void>;
371
- /**
372
- * Update entity icon using Fluent UI System Icon
373
- * @param entityLogicalName The logical name of the entity
374
- * @param iconFileName The Fluent UI icon file name (e.g., 'people_community_24_filled.svg')
375
- * @param solutionUniqueName Optional solution to add the web resource to
376
- * @returns Result with web resource ID and icon vector name
377
- */
378
- updateEntityIcon(entityLogicalName: string, iconFileName: string, solutionUniqueName?: string): Promise<any>;
379
- /**
380
- * Create a new attribute on an entity
381
- * @param entityLogicalName The logical name of the entity
382
- * @param attributeDefinition The attribute definition object
383
- * @param solutionUniqueName Optional solution to add the attribute to
384
- * @returns The created attribute metadata
385
- */
386
- createAttribute(entityLogicalName: string, attributeDefinition: any, solutionUniqueName?: string): Promise<any>;
387
- /**
388
- * Update an existing attribute
389
- * @param entityLogicalName The logical name of the entity
390
- * @param attributeLogicalName The logical name of the attribute
391
- * @param updates The properties to update
392
- * @param solutionUniqueName Optional solution context
393
- */
394
- updateAttribute(entityLogicalName: string, attributeLogicalName: string, updates: any, solutionUniqueName?: string): Promise<void>;
395
- /**
396
- * Delete an attribute
397
- * @param entityLogicalName The logical name of the entity
398
- * @param attributeMetadataId The MetadataId of the attribute to delete
399
- */
105
+ updateEntityIcon(entityLogicalName: string, iconFileName: string, solutionUniqueName?: string): Promise<unknown>;
106
+ createAttribute(entityLogicalName: string, attributeDefinition: unknown, solutionUniqueName?: string): Promise<unknown>;
107
+ updateAttribute(entityLogicalName: string, attributeLogicalName: string, updates: unknown, solutionUniqueName?: string): Promise<void>;
400
108
  deleteAttribute(entityLogicalName: string, attributeMetadataId: string): Promise<void>;
401
- /**
402
- * Create a picklist attribute using a global option set
403
- * @param entityLogicalName The logical name of the entity
404
- * @param attributeDefinition The attribute definition (must reference a global option set)
405
- * @param solutionUniqueName Optional solution to add the attribute to
406
- * @returns The created attribute metadata
407
- */
408
- createGlobalOptionSetAttribute(entityLogicalName: string, attributeDefinition: any, solutionUniqueName?: string): Promise<any>;
409
- /**
410
- * Create a one-to-many relationship
411
- * @param relationshipDefinition The relationship definition
412
- * @param solutionUniqueName Optional solution to add the relationship to
413
- */
414
- createOneToManyRelationship(relationshipDefinition: any, solutionUniqueName?: string): Promise<any>;
415
- /**
416
- * Create a many-to-many relationship
417
- * @param relationshipDefinition The relationship definition
418
- * @param solutionUniqueName Optional solution to add the relationship to
419
- */
420
- createManyToManyRelationship(relationshipDefinition: any, solutionUniqueName?: string): Promise<any>;
421
- /**
422
- * Delete a relationship
423
- * @param metadataId The MetadataId of the relationship to delete
424
- */
109
+ createGlobalOptionSetAttribute(entityLogicalName: string, schemaName: string, displayName: string, globalOptionSetName: string, options?: {
110
+ description?: string;
111
+ requiredLevel?: string;
112
+ solutionUniqueName?: string;
113
+ }): Promise<unknown>;
114
+ createOneToManyRelationship(definition: unknown, solutionUniqueName?: string): Promise<unknown>;
115
+ createManyToManyRelationship(definition: unknown, solutionUniqueName?: string): Promise<unknown>;
425
116
  deleteRelationship(metadataId: string): Promise<void>;
426
- /**
427
- * Update a relationship
428
- * Note: Most relationship properties are immutable, only labels can be updated
429
- * @param metadataId The MetadataId of the relationship
430
- * @param updates The properties to update (typically labels)
431
- */
432
- updateRelationship(metadataId: string, updates: any): Promise<void>;
433
- /**
434
- * Get detailed information about a relationship
435
- * @param metadataId The MetadataId of the relationship
436
- * @returns The relationship metadata
437
- */
438
- getRelationshipDetails(metadataId: string): Promise<any>;
439
- /**
440
- * Publish all customizations
441
- */
442
- publishAllCustomizations(): Promise<void>;
443
- /**
444
- * Publish specific customizations
445
- * @param parameterXml The ParameterXml specifying what to publish
446
- */
447
- publishXml(parameterXml: string): Promise<void>;
448
- /**
449
- * Create a global option set
450
- * @param optionSetDefinition The option set definition
451
- * @param solutionUniqueName Optional solution to add the option set to
452
- */
453
- createGlobalOptionSet(optionSetDefinition: any, solutionUniqueName?: string): Promise<any>;
454
- /**
455
- * Delete a global option set
456
- * @param metadataId The MetadataId of the option set to delete
457
- */
458
- deleteGlobalOptionSet(metadataId: string): Promise<void>;
459
- /**
460
- * Update a global option set
461
- */
462
- updateGlobalOptionSet(metadataId: string, updates: any, solutionUniqueName?: string): Promise<void>;
463
- /**
464
- * Add a value to a global option set
465
- */
466
- addOptionSetValue(optionSetName: string, value: number, label: string, solutionUniqueName?: string): Promise<any>;
467
- /**
468
- * Update an option set value
469
- */
117
+ updateRelationship(metadataId: string, updates: unknown): Promise<void>;
118
+ createGlobalOptionSet(definition: unknown, solutionUniqueName?: string): Promise<unknown>;
119
+ updateGlobalOptionSet(metadataId: string, updates: unknown, solutionUniqueName?: string): Promise<void>;
120
+ addOptionSetValue(optionSetName: string, value: number, label: string, solutionUniqueName?: string): Promise<unknown>;
470
121
  updateOptionSetValue(optionSetName: string, value: number, label: string, solutionUniqueName?: string): Promise<void>;
471
- /**
472
- * Delete an option set value
473
- */
474
122
  deleteOptionSetValue(optionSetName: string, value: number): Promise<void>;
475
- /**
476
- * Reorder option set values
477
- */
478
123
  reorderOptionSetValues(optionSetName: string, values: number[], solutionUniqueName?: string): Promise<void>;
479
- /**
480
- * Create a form (systemform)
481
- */
482
- createForm(form: any, solutionUniqueName?: string): Promise<any>;
483
- /**
484
- * Update a form
485
- */
486
- updateForm(formId: string, updates: any, solutionUniqueName?: string): Promise<void>;
487
- /**
488
- * Delete a form
489
- */
124
+ getForms(entityLogicalName: string): Promise<unknown>;
125
+ createForm(name: string, entityLogicalName: string, formType: string, formXml: string, options?: {
126
+ description?: string;
127
+ solutionUniqueName?: string;
128
+ }): Promise<unknown>;
129
+ private getFormTypeCode;
130
+ updateForm(formId: string, updates: unknown, solutionUniqueName?: string): Promise<void>;
490
131
  deleteForm(formId: string): Promise<void>;
491
- /**
492
- * Get forms for an entity
493
- */
494
- getForms(entityLogicalName: string): Promise<any>;
495
- /**
496
- * Create a view (savedquery)
497
- */
498
- createView(view: any, solutionUniqueName?: string): Promise<any>;
499
- /**
500
- * Update a view
501
- */
502
- updateView(viewId: string, updates: any, solutionUniqueName?: string): Promise<void>;
503
- /**
504
- * Delete a view
505
- */
506
- deleteView(viewId: string): Promise<void>;
507
- /**
508
- * Get views for an entity
509
- */
510
- getViews(entityLogicalName: string): Promise<any>;
511
- /**
512
- * Activate a form (set statecode=1)
513
- * @param formId The systemformid (GUID)
514
- */
515
132
  activateForm(formId: string): Promise<void>;
516
- /**
517
- * Deactivate a form (set statecode=0)
518
- * @param formId The systemformid (GUID)
519
- */
520
133
  deactivateForm(formId: string): Promise<void>;
521
- /**
522
- * Set a view as the default view for its entity
523
- * @param viewId The savedqueryid (GUID)
524
- */
134
+ getViews(entityLogicalName: string): Promise<unknown>;
135
+ getViewFetchXml(viewId: string): Promise<unknown>;
136
+ createView(name: string, entityLogicalName: string, fetchXml: string, layoutXml: string, options?: {
137
+ description?: string;
138
+ isDefault?: boolean;
139
+ queryType?: number;
140
+ solutionUniqueName?: string;
141
+ }): Promise<unknown>;
142
+ updateView(viewId: string, updates: unknown, solutionUniqueName?: string): Promise<void>;
143
+ deleteView(viewId: string): Promise<void>;
525
144
  setDefaultView(viewId: string): Promise<void>;
526
- /**
527
- * Get the FetchXML from a view
528
- * @param viewId The savedqueryid (GUID)
529
- * @returns The view with FetchXML
530
- */
531
- getViewFetchXml(viewId: string): Promise<any>;
532
- /**
533
- * Create a web resource
534
- */
535
- createWebResource(webResource: any, solutionUniqueName?: string): Promise<any>;
536
- /**
537
- * Update a web resource
538
- */
539
- updateWebResource(webResourceId: string, updates: any, solutionUniqueName?: string): Promise<void>;
540
- /**
541
- * Delete a web resource
542
- */
145
+ getWebResource(webResourceId: string): Promise<unknown>;
146
+ getWebResources(nameFilter?: string): Promise<unknown>;
147
+ createWebResource(name: string, displayName: string, webResourceType: number, content: string, options?: {
148
+ description?: string;
149
+ solutionUniqueName?: string;
150
+ }): Promise<unknown>;
151
+ updateWebResource(webResourceId: string, updates: unknown, solutionUniqueName?: string): Promise<void>;
543
152
  deleteWebResource(webResourceId: string): Promise<void>;
544
- /**
545
- * Get web resource
546
- */
547
- getWebResource(webResourceId: string): Promise<any>;
548
- /**
549
- * Get web resources by name pattern
550
- */
551
- getWebResources(nameFilter?: string): Promise<any>;
552
- /**
553
- * Get web resource content (base64 encoded)
554
- * @param webResourceId The webresourceid (GUID)
555
- * @returns The web resource with content field
556
- */
557
- getWebResourceContent(webResourceId: string): Promise<any>;
558
- /**
559
- * Get web resource dependencies
560
- * @param webResourceId The webresourceid (GUID)
561
- * @returns List of dependencies
562
- */
563
- getWebResourceDependencies(webResourceId: string): Promise<any>;
564
- /**
565
- * Create a publisher
566
- */
567
- createPublisher(publisher: any): Promise<any>;
568
- /**
569
- * Get publishers
570
- */
571
- getPublishers(): Promise<any>;
572
- /**
573
- * Create a solution
574
- */
575
- createSolution(solution: any): Promise<any>;
576
- /**
577
- * Get solutions
578
- */
579
- getSolutions(): Promise<any>;
580
- /**
581
- * Get solution by unique name
582
- */
583
- getSolution(uniqueName: string): Promise<any>;
584
- /**
585
- * Add component to solution
586
- */
587
- addComponentToSolution(solutionUniqueName: string, componentId: string, componentType: number, addRequiredComponents?: boolean, includedComponentSettingsValues?: string): Promise<void>;
588
- /**
589
- * Remove component from solution
590
- */
153
+ getPublishers(): Promise<unknown>;
154
+ createPublisher(uniqueName: string, friendlyName: string, customizationPrefix: string, customizationOptionValuePrefix: number, description?: string): Promise<unknown>;
155
+ getSolutions(): Promise<unknown>;
156
+ getSolution(uniqueName: string): Promise<unknown>;
157
+ createSolution(uniqueName: string, friendlyName: string, version: string, publisherId: string, description?: string): Promise<unknown>;
158
+ getSolutionComponents(solutionUniqueName: string): Promise<unknown>;
159
+ addComponentToSolution(solutionUniqueName: string, componentId: string, componentType: number, addRequiredComponents?: boolean): Promise<void>;
591
160
  removeComponentFromSolution(solutionUniqueName: string, componentId: string, componentType: number): Promise<void>;
592
- /**
593
- * Get solution components
594
- */
595
- getSolutionComponents(solutionUniqueName: string): Promise<any>;
596
- /**
597
- * Export solution
598
- */
599
- exportSolution(solutionName: string, managed?: boolean): Promise<any>;
600
- /**
601
- * Import solution
602
- */
603
- importSolution(customizationFile: string, publishWorkflows?: boolean, overwriteUnmanagedCustomizations?: boolean): Promise<any>;
604
- /**
605
- * Delete a solution
606
- */
607
- deleteSolution(solutionId: string): Promise<void>;
608
- /**
609
- * Publish specific entity
610
- */
161
+ exportSolution(solutionName: string, managed?: boolean): Promise<unknown>;
162
+ importSolution(customizationFile: string, overwriteUnmanagedCustomizations?: boolean, publishWorkflows?: boolean): Promise<unknown>;
163
+ publishAllCustomizations(): Promise<void>;
611
164
  publishEntity(entityLogicalName: string): Promise<void>;
612
- /**
613
- * Publish specific component
614
- */
615
- publishComponent(componentId: string, componentType: number): Promise<void>;
616
- /**
617
- * Check for unpublished customizations
618
- */
619
- checkUnpublishedChanges(): Promise<any>;
620
- /**
621
- * Check component dependencies
622
- */
623
- checkDependencies(componentId: string, componentType: number): Promise<any>;
624
- /**
625
- * Check if component can be deleted
626
- */
165
+ checkDependencies(componentId: string, componentType: number): Promise<unknown>;
627
166
  checkDeleteEligibility(componentId: string, componentType: number): Promise<{
628
167
  canDelete: boolean;
629
- dependencies: any[];
168
+ dependencies: unknown[];
630
169
  }>;
631
- /**
632
- * Preview unpublished changes
633
- * Returns all components that have unpublished customizations
634
- */
635
- previewUnpublishedChanges(): Promise<any>;
636
- /**
637
- * Check dependencies for a specific component
638
- * @param componentId The component ID (GUID)
639
- * @param componentType The component type code
640
- * @returns Dependency information
641
- */
642
- checkComponentDependencies(componentId: string, componentType: number): Promise<any>;
643
- /**
644
- * Validate solution integrity
645
- * Checks for missing dependencies and other issues
646
- * @param solutionUniqueName The unique name of the solution
647
- * @returns Validation results
648
- */
649
- validateSolutionIntegrity(solutionUniqueName: string): Promise<any>;
650
- /**
651
- * Validate schema name
652
- */
653
- validateSchemaName(schemaName: string, prefix: string): {
654
- valid: boolean;
655
- errors: string[];
656
- };
657
- /**
658
- * Get entity customization information
659
- */
660
- getEntityCustomizationInfo(entityLogicalName: string): Promise<any>;
661
- /**
662
- * Check if entity has dependencies
663
- */
664
- checkEntityDependencies(entityLogicalName: string): Promise<any>;
665
- /**
666
- * Helper to generate GUID
667
- */
668
- private generateGuid;
669
- /**
670
- * Extract assembly version from .NET DLL using PE header parsing
671
- * @param assemblyPath - Path to the compiled .NET assembly (DLL)
672
- * @returns Version string (e.g., "1.0.0.0")
673
- */
674
170
  extractAssemblyVersion(assemblyPath: string): Promise<string>;
675
- /**
676
- * Query plugin type by typename
677
- * @param typename - Plugin type typename (e.g., "MyNamespace.ContactPlugin")
678
- * @returns Plugin type ID
679
- */
680
171
  queryPluginTypeByTypename(typename: string): Promise<string>;
681
- /**
682
- * Query plugin assembly by name
683
- * @param assemblyName - Assembly name
684
- * @returns Plugin assembly ID or null if not found
685
- */
686
172
  queryPluginAssemblyByName(assemblyName: string): Promise<string | null>;
687
- /**
688
- * Get plugin types for an existing assembly
689
- * Used to retrieve type information after an assembly update
690
- * @param assemblyId - Assembly GUID
691
- * @returns Array of plugin type information
692
- */
693
- getPluginTypesForAssembly(assemblyId: string): Promise<Array<{
694
- pluginTypeId: string;
695
- typeName: string;
696
- friendlyName: string;
697
- }>>;
698
- /**
699
- * Resolve SDK Message and Filter IDs for plugin step registration
700
- * @param messageName - SDK message name (e.g., "Create", "Update", "Delete")
701
- * @param entityName - Entity logical name (e.g., "contact", "account")
702
- * @returns Object containing messageId and filterId
703
- */
704
- resolveSdkMessageAndFilter(messageName: string, entityName: string): Promise<{
705
- messageId: string;
706
- filterId: string;
707
- }>;
708
- /**
709
- * Create a new plugin assembly in Dataverse
710
- * @param options - Assembly creation options
711
- * @returns Created assembly ID and plugin types
712
- */
173
+ getPluginTypesForAssembly(assemblyId: string): Promise<unknown[]>;
174
+ resolveSdkMessageAndFilter(messageName: string, primaryEntity: string): Promise<unknown>;
713
175
  createPluginAssembly(options: {
714
176
  name: string;
715
177
  content: string;
716
178
  version: string;
717
- isolationMode?: number;
718
- sourceType?: number;
719
179
  description?: string;
180
+ isolationMode?: number;
720
181
  solutionUniqueName?: string;
721
- }): Promise<{
722
- pluginAssemblyId: string;
723
- pluginTypes: Array<{
724
- pluginTypeId: string;
725
- typeName: string;
726
- friendlyName: string;
727
- }>;
728
- }>;
182
+ }): Promise<unknown>;
183
+ updatePluginAssembly(assemblyId: string, content: string, version: string, solutionUniqueName?: string): Promise<void>;
184
+ deletePluginAssembly(assemblyId: string): Promise<void>;
185
+ deletePluginStep(stepId: string): Promise<void>;
186
+ registerPluginStep(config: RegisterPluginStepOptions): Promise<unknown>;
187
+ registerPluginImage(config: RegisterPluginImageOptions): Promise<unknown>;
188
+ createSimpleSitemap(config: unknown, solutionUniqueName?: string): Promise<unknown>;
189
+ addEntitiesToApp(appId: string, entityNames: string[]): Promise<unknown>;
190
+ validateApp(appId: string): Promise<unknown>;
191
+ publishApp(appId: string): Promise<unknown>;
192
+ deactivateWorkflow(workflowId: string): Promise<unknown>;
193
+ activateWorkflow(workflowId: string): Promise<unknown>;
194
+ updateWorkflowDescription(workflowId: string, description: string): Promise<unknown>;
195
+ updateFlowDescription(flowId: string, description: string): Promise<unknown>;
729
196
  /**
730
- * Update an existing plugin assembly with new DLL content
731
- * @param assemblyId - Assembly GUID
732
- * @param content - Base64-encoded DLL content
733
- * @param version - New version string
734
- * @param solutionUniqueName - Optional solution context
197
+ * Adapter function to convert FlowService.parseFlowSummary output to expected format
735
198
  */
736
- updatePluginAssembly(assemblyId: string, content: string, version: string, solutionUniqueName?: string): Promise<void>;
199
+ private adaptFlowSummary;
737
200
  /**
738
- * Delete a plugin assembly and all its associated components
739
- * Used for rollback on deployment failure
740
- * @param assemblyId - Assembly GUID to delete
201
+ * Adapter function to convert WorkflowService.parseWorkflowXamlSummary output to expected format
741
202
  */
742
- deletePluginAssembly(assemblyId: string): Promise<void>;
203
+ private adaptWorkflowSummary;
204
+ documentAutomation(automationId: string, type?: 'flow' | 'workflow'): Promise<unknown>;
205
+ documentWorkflowSafe(workflowId: string, type?: 'flow' | 'workflow'): Promise<unknown>;
743
206
  /**
744
- * Delete a plugin step
745
- * Used for rollback on deployment failure
746
- * @param stepId - Step GUID to delete
207
+ * Create a new Power Automate flow from an existing template flow
747
208
  */
748
- deletePluginStep(stepId: string): Promise<void>;
209
+ createFlow(name: string, templateFlowId: string, options?: {
210
+ description?: string;
211
+ state?: 'draft' | 'activated';
212
+ connectionReferenceMappings?: Record<string, string>;
213
+ }): Promise<unknown>;
749
214
  /**
750
- * Register a plugin step on an SDK message
751
- * @param options - Step registration options
752
- * @returns Created step ID
215
+ * Delete a Power Automate flow (permanent operation)
753
216
  */
754
- registerPluginStep(options: {
755
- pluginTypeId: string;
756
- name: string;
757
- messageName: string;
758
- primaryEntityName: string;
759
- stage: number;
760
- executionMode: number;
761
- rank?: number;
762
- filteringAttributes?: string;
763
- configuration?: string;
764
- supportedDeployment?: number;
765
- solutionUniqueName?: string;
766
- }): Promise<{
767
- stepId: string;
768
- }>;
217
+ deleteFlow(flowId: string): Promise<unknown>;
769
218
  /**
770
- * Register a pre/post image for a plugin step
771
- * @param options - Image registration options
772
- * @returns Created image ID
219
+ * Clone an existing flow with a new name
773
220
  */
774
- registerPluginImage(options: {
775
- stepId: string;
776
- name: string;
777
- imageType: number;
778
- entityAlias: string;
779
- attributes?: string;
780
- messagePropertyName?: string;
781
- }): Promise<{
782
- imageId: string;
783
- }>;
221
+ cloneFlow(sourceFlowId: string, newName: string, options?: {
222
+ description?: string;
223
+ updateConnectionReferences?: boolean;
224
+ connectionReferenceMappings?: Record<string, string>;
225
+ }): Promise<unknown>;
226
+ /**
227
+ * Activate a Power Automate flow (alias for activateWorkflow)
228
+ */
229
+ activateFlow(flowId: string): Promise<unknown>;
230
+ /**
231
+ * Deactivate a Power Automate flow (alias for deactivateWorkflow)
232
+ */
233
+ deactivateFlow(flowId: string): Promise<unknown>;
784
234
  }
785
235
  //# sourceMappingURL=PowerPlatformService.d.ts.map