@pptb/types 1.2.3-beta.0 → 1.2.4-beta.0
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/README.md +150 -17
- package/index.d.ts +4 -1
- package/package.json +2 -1
- package/powerplatformAPI.d.ts +200 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ TypeScript type definitions for Power Platform ToolBox APIs, plus a built-in CLI
|
|
|
8
8
|
- [Quick start](#quick-start)
|
|
9
9
|
- [CLI options](#cli-options)
|
|
10
10
|
- [What is validated](#what-is-validated)
|
|
11
|
-
|
|
11
|
+
- [pptb.config.json (optional)](#pptbconfigjson-optional)
|
|
12
12
|
- [Overview](#overview)
|
|
13
13
|
- [Usage](#usage)
|
|
14
14
|
- [Include all type definitions](#include-all-type-definitions)
|
|
@@ -19,12 +19,22 @@ TypeScript type definitions for Power Platform ToolBox APIs, plus a built-in CLI
|
|
|
19
19
|
- [Terminal Operations](#terminal-operations)
|
|
20
20
|
- [Events](#events)
|
|
21
21
|
- [Inter-Tool Invocation](#inter-tool-invocation)
|
|
22
|
+
- [Caller: launching another tool with prefill data](#caller-launching-another-tool-with-prefill-data)
|
|
23
|
+
- [Caller: tag-based capability discovery](#caller-tag-based-capability-discovery)
|
|
24
|
+
- [Callee: reading prefill data and returning a result](#callee-reading-prefill-data-and-returning-a-result)
|
|
25
|
+
- [Declaring your invocation contract](#declaring-your-invocation-contract)
|
|
22
26
|
- [Dataverse API Examples](#dataverse-api-examples)
|
|
23
27
|
- [CRUD Operations](#crud-operations)
|
|
24
28
|
- [FetchXML Queries](#fetchxml-queries)
|
|
25
29
|
- [Metadata Operations](#metadata-operations)
|
|
26
30
|
- [Execute Actions/Functions](#execute-actionsfunctions)
|
|
27
31
|
- [Deploy Solutions](#deploy-solutions)
|
|
32
|
+
- [Power Platform API Examples](#power-platform-api-examples)
|
|
33
|
+
- [Using Power Apps API](#using-power-apps-api)
|
|
34
|
+
- [Using Power Automate API](#using-power-automate-api)
|
|
35
|
+
- [Using Environment Management API](#using-environment-management-api)
|
|
36
|
+
- [Using Governance API](#using-governance-api)
|
|
37
|
+
- [Available Categories](#available-categories)
|
|
28
38
|
- [API Reference](#api-reference)
|
|
29
39
|
- [ToolBox API (`window.toolboxAPI`)](#toolbox-api-windowtoolboxapi)
|
|
30
40
|
- [Connections](#connections-1)
|
|
@@ -37,6 +47,8 @@ TypeScript type definitions for Power Platform ToolBox APIs, plus a built-in CLI
|
|
|
37
47
|
- [Query Operations](#query-operations)
|
|
38
48
|
- [Metadata Operations](#metadata-operations-1)
|
|
39
49
|
- [Advanced Operations](#advanced-operations)
|
|
50
|
+
- [Power Platform API (`window.powerplatformAPI`)](#power-platform-api-windowpowerplatformapi)
|
|
51
|
+
- [Category Methods](#category-methods)
|
|
40
52
|
- [Security Notes](#security-notes)
|
|
41
53
|
- [Publishing the package to npm](#publishing-the-package-to-npm)
|
|
42
54
|
- [License](#license)
|
|
@@ -116,14 +128,14 @@ The validator checks every field that the official review pipeline inspects:
|
|
|
116
128
|
|
|
117
129
|
In addition to `package.json`, the validator automatically checks a `pptb.config.json` file if one is present in the same directory. This file declares tool-to-tool communication contracts and other PPTB-specific metadata.
|
|
118
130
|
|
|
119
|
-
| Field
|
|
120
|
-
|
|
|
121
|
-
| `invocation.version`
|
|
122
|
-
| `invocation.capabilities`
|
|
123
|
-
| `invocation.prefill`
|
|
124
|
-
| `invocation.prefill.properties`
|
|
125
|
-
| `invocation.returnTopic`
|
|
126
|
-
| `invocation.returnTopic.properties`
|
|
131
|
+
| Field | Required | Rules |
|
|
132
|
+
| ----------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
133
|
+
| `invocation.version` | ✅\*\* | Must be a valid **semantic version** string (e.g. `"1.0.0"`). Tool developers own this version and bump it when the invocation contract changes. |
|
|
134
|
+
| `invocation.capabilities` | ❌ | Array of non-empty string tags (e.g. `["entity-picker"]`). Used by callers to discover this tool via `findToolsByCapability`. |
|
|
135
|
+
| `invocation.prefill` | ❌ | JSON-schema-style object describing data callers can pre-populate |
|
|
136
|
+
| `invocation.prefill.properties` | ❌ | Map of property names to `{ type?, enum?, items? }` descriptors |
|
|
137
|
+
| `invocation.returnTopic` | ❌ | JSON-schema-style object describing the data this tool returns to its caller |
|
|
138
|
+
| `invocation.returnTopic.properties` | ❌ | Map of property names to `{ type?, enum?, items? }` descriptors |
|
|
127
139
|
|
|
128
140
|
> \*\* Required only when the `invocation` object is present.
|
|
129
141
|
|
|
@@ -153,10 +165,11 @@ In addition to `package.json`, the validator automatically checks a `pptb.config
|
|
|
153
165
|
|
|
154
166
|
## Overview
|
|
155
167
|
|
|
156
|
-
The `@pptb/types` package provides TypeScript definitions for
|
|
168
|
+
The `@pptb/types` package provides TypeScript definitions for three main APIs:
|
|
157
169
|
|
|
158
170
|
1. **ToolBox API** (`window.toolboxAPI`) - Core platform features (connections, utilities, terminals, events)
|
|
159
171
|
2. **Dataverse API** (`window.dataverseAPI`) - Microsoft Dataverse Web API operations
|
|
172
|
+
3. **Power Platform API** (`window.powerplatformAPI`) - Power Platform Admin APIs with generic HTTP methods
|
|
160
173
|
|
|
161
174
|
## Usage
|
|
162
175
|
|
|
@@ -165,9 +178,10 @@ The `@pptb/types` package provides TypeScript definitions for two main APIs:
|
|
|
165
178
|
```typescript
|
|
166
179
|
/// <reference types="@pptb/types" />
|
|
167
180
|
|
|
168
|
-
//
|
|
181
|
+
// All APIs are now available
|
|
169
182
|
const toolbox = window.toolboxAPI;
|
|
170
183
|
const dataverse = window.dataverseAPI;
|
|
184
|
+
const powerplatform = window.powerplatformAPI;
|
|
171
185
|
```
|
|
172
186
|
|
|
173
187
|
### Include specific API types
|
|
@@ -178,6 +192,9 @@ const dataverse = window.dataverseAPI;
|
|
|
178
192
|
|
|
179
193
|
// Only Dataverse API types
|
|
180
194
|
/// <reference types="@pptb/types/dataverseAPI" />
|
|
195
|
+
|
|
196
|
+
// Only Power Platform API types
|
|
197
|
+
/// <reference types="@pptb/types/powerplatformAPI" />
|
|
181
198
|
```
|
|
182
199
|
|
|
183
200
|
## ToolBox API Examples
|
|
@@ -299,10 +316,7 @@ Tools can launch one another and pass data between them using the `invocation` n
|
|
|
299
316
|
```typescript
|
|
300
317
|
// Tool A – launches the entity-picker tool and waits for a selection
|
|
301
318
|
// The callee automatically inherits this tool's FXS connection
|
|
302
|
-
const result = await toolboxAPI.invocation.launchTool(
|
|
303
|
-
"@my-org/entity-picker",
|
|
304
|
-
{ entityName: "account", allowMultiSelect: false },
|
|
305
|
-
);
|
|
319
|
+
const result = await toolboxAPI.invocation.launchTool("@my-org/entity-picker", { entityName: "account", allowMultiSelect: false });
|
|
306
320
|
|
|
307
321
|
if (result !== null) {
|
|
308
322
|
console.log("Selected record id:", (result as { selectedId: string }).selectedId);
|
|
@@ -339,7 +353,7 @@ if (ctx) {
|
|
|
339
353
|
}
|
|
340
354
|
```
|
|
341
355
|
|
|
342
|
-
> **Tip:** A tool that was
|
|
356
|
+
> **Tip:** A tool that was _not_ launched by another tool receives `null` from `getLaunchContext()`.
|
|
343
357
|
> Use this to show a standalone UI or redirect accordingly.
|
|
344
358
|
|
|
345
359
|
> **Auto-close**: after calling `returnData`, PPTB automatically closes the callee window. The callee does **not** need to close itself.
|
|
@@ -523,9 +537,84 @@ await waitForImport(result.ImportJobId);
|
|
|
523
537
|
|
|
524
538
|
> **Note:** `deploySolution` automatically supplies `PublishWorkflows` and `OverwriteUnmanagedCustomizations` with a default value of `false` when you do not specify them, aligning with Dataverse's ImportSolution requirements.
|
|
525
539
|
|
|
540
|
+
## Power Platform API Examples
|
|
541
|
+
|
|
542
|
+
The Power Platform API provides generic HTTP methods for all Power Platform Admin API categories:
|
|
543
|
+
|
|
544
|
+
### Using Power Apps API
|
|
545
|
+
|
|
546
|
+
```typescript
|
|
547
|
+
// Get an admin app
|
|
548
|
+
const app = await powerplatformAPI.PowerApps.Get("environments/{environmentId}/apps/{app}?api-version=2024-10-01");
|
|
549
|
+
|
|
550
|
+
// List all apps in an environment
|
|
551
|
+
const apps = await powerplatformAPI.PowerApps.Get("environments/{environmentId}/apps?api-version=2024-10-01");
|
|
552
|
+
|
|
553
|
+
// Create a new app
|
|
554
|
+
await powerplatformAPI.PowerApps.Post("environments/{environmentId}/apps?api-version=2024-10-01", {
|
|
555
|
+
name: "My App",
|
|
556
|
+
environmentId: "{environmentId}",
|
|
557
|
+
});
|
|
558
|
+
|
|
559
|
+
// Update an app
|
|
560
|
+
await powerplatformAPI.PowerApps.Patch("environments/{environmentId}/apps/{appId}?api-version=2024-10-01", {
|
|
561
|
+
name: "Updated App Name",
|
|
562
|
+
});
|
|
563
|
+
|
|
564
|
+
// Delete an app
|
|
565
|
+
await powerplatformAPI.PowerApps.Delete("environments/{environmentId}/apps/{appId}?api-version=2024-10-01");
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
### Using Power Automate API
|
|
569
|
+
|
|
570
|
+
```typescript
|
|
571
|
+
// List flows
|
|
572
|
+
const flows = await powerplatformAPI.PowerAutomate.Get("environments/{environmentId}/flows?api-version=2024-10-01");
|
|
573
|
+
|
|
574
|
+
// Get flow details
|
|
575
|
+
const flow = await powerplatformAPI.PowerAutomate.Get("environments/{environmentId}/flows/{flowId}?api-version=2024-10-01");
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
### Using Environment Management API
|
|
579
|
+
|
|
580
|
+
```typescript
|
|
581
|
+
// List environments
|
|
582
|
+
const environments = await powerplatformAPI.EnvironmentManagement.Get("environments?api-version=2024-10-01");
|
|
583
|
+
|
|
584
|
+
// Get environment details
|
|
585
|
+
const env = await powerplatformAPI.EnvironmentManagement.Get("environments/{environmentId}?api-version=2024-10-01");
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
### Using Governance API
|
|
589
|
+
|
|
590
|
+
```typescript
|
|
591
|
+
// Get governance data
|
|
592
|
+
const data = await powerplatformAPI.Governance.Get("environments/{environmentId}/governance?api-version=2024-10-01");
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
### Available Categories
|
|
596
|
+
|
|
597
|
+
The Power Platform API exposes the following categories, each with `Get`, `Post`, `Put`, `Patch`, and `Delete` methods:
|
|
598
|
+
|
|
599
|
+
- **Analytics** - `https://api.powerplatform.com/analytics`
|
|
600
|
+
- **AppManagement** - `https://api.powerplatform.com/appmanagement`
|
|
601
|
+
- **Authorization** - `https://api.powerplatform.com/authorization`
|
|
602
|
+
- **Connectivity** - `https://api.powerplatform.com/connectivity`
|
|
603
|
+
- **CopilotStudio** - `https://api.powerplatform.com/copilotstudio`
|
|
604
|
+
- **Dynamics** - `https://api.powerplatform.com/dynamics`
|
|
605
|
+
- **EnvironmentManagement** - `https://api.powerplatform.com/environmentmanagement`
|
|
606
|
+
- **Governance** - `https://api.powerplatform.com/governance`
|
|
607
|
+
- **Licensing** - `https://api.powerplatform.com/licensing`
|
|
608
|
+
- **PowerApps** - `https://api.powerplatform.com/powerapps`
|
|
609
|
+
- **PowerAutomate** - `https://api.powerplatform.com/powerautomate`
|
|
610
|
+
- **PowerPages** - `https://api.powerplatform.com/powerpages`
|
|
611
|
+
- **ResourceQuery** - `https://api.powerplatform.com/resourcequery`
|
|
612
|
+
- **UserManagement** - `https://api.powerplatform.com/usermanagement`
|
|
613
|
+
- **WorkflowAgents** - `https://api.powerplatform.com/workflowagents`
|
|
614
|
+
|
|
526
615
|
## API Reference
|
|
527
616
|
|
|
528
|
-
The Power Platform ToolBox exposes
|
|
617
|
+
The Power Platform ToolBox exposes three main APIs to tools:
|
|
529
618
|
|
|
530
619
|
### ToolBox API (`window.toolboxAPI`)
|
|
531
620
|
|
|
@@ -697,6 +786,50 @@ Complete HTTP client for interacting with Microsoft Dataverse:
|
|
|
697
786
|
- Returns import job details including progress, completion status, and error information
|
|
698
787
|
- Use to track the progress of a solution deployment initiated with deploySolution
|
|
699
788
|
|
|
789
|
+
### Power Platform API (`window.powerplatformAPI`)
|
|
790
|
+
|
|
791
|
+
Generic HTTP client for Power Platform Admin APIs covering all categories:
|
|
792
|
+
|
|
793
|
+
#### Category Methods
|
|
794
|
+
|
|
795
|
+
Each category (Analytics, AppManagement, Authorization, Connectivity, CopilotStudio, Dynamics, EnvironmentManagement, Governance, Licensing, PowerApps, PowerAutomate, PowerPages, ResourceQuery, UserManagement, WorkflowAgents) exposes:
|
|
796
|
+
|
|
797
|
+
- **Get(path?, connectionTarget?, headers?)**: Promise<PowerPlatformResponse>
|
|
798
|
+
- Makes a GET request to the category endpoint
|
|
799
|
+
- Example: `powerplatformAPI.PowerApps.Get('environments/{environmentId}/apps/{app}?api-version=2024-10-01')`
|
|
800
|
+
|
|
801
|
+
- **Post(path?, body?, connectionTarget?, headers?)**: Promise<PowerPlatformResponse>
|
|
802
|
+
- Makes a POST request to the category endpoint
|
|
803
|
+
|
|
804
|
+
- **Put(path?, body?, connectionTarget?, headers?)**: Promise<PowerPlatformResponse>
|
|
805
|
+
- Makes a PUT request to the category endpoint
|
|
806
|
+
|
|
807
|
+
- **Patch(path?, body?, connectionTarget?, headers?)**: Promise<PowerPlatformResponse>
|
|
808
|
+
- Makes a PATCH request to the category endpoint
|
|
809
|
+
|
|
810
|
+
- **Delete(path?, connectionTarget?, headers?, body?)**: Promise<PowerPlatformResponse>
|
|
811
|
+
- Makes a DELETE request to the category endpoint
|
|
812
|
+
|
|
813
|
+
Available categories and their base URLs:
|
|
814
|
+
|
|
815
|
+
| Category | Base URL |
|
|
816
|
+
| --------------------- | ----------------------------------------------------- |
|
|
817
|
+
| Analytics | `https://api.powerplatform.com/analytics` |
|
|
818
|
+
| AppManagement | `https://api.powerplatform.com/appmanagement` |
|
|
819
|
+
| Authorization | `https://api.powerplatform.com/authorization` |
|
|
820
|
+
| Connectivity | `https://api.powerplatform.com/connectivity` |
|
|
821
|
+
| CopilotStudio | `https://api.powerplatform.com/copilotstudio` |
|
|
822
|
+
| Dynamics | `https://api.powerplatform.com/dynamics` |
|
|
823
|
+
| EnvironmentManagement | `https://api.powerplatform.com/environmentmanagement` |
|
|
824
|
+
| Governance | `https://api.powerplatform.com/governance` |
|
|
825
|
+
| Licensing | `https://api.powerplatform.com/licensing` |
|
|
826
|
+
| PowerApps | `https://api.powerplatform.com/powerapps` |
|
|
827
|
+
| PowerAutomate | `https://api.powerplatform.com/powerautomate` |
|
|
828
|
+
| PowerPages | `https://api.powerplatform.com/powerpages` |
|
|
829
|
+
| ResourceQuery | `https://api.powerplatform.com/resourcequery` |
|
|
830
|
+
| UserManagement | `https://api.powerplatform.com/usermanagement` |
|
|
831
|
+
| WorkflowAgents | `https://api.powerplatform.com/workflowagents` |
|
|
832
|
+
|
|
700
833
|
### Security Notes
|
|
701
834
|
|
|
702
835
|
- **Access Tokens**: Tools do NOT have direct access to access tokens. All Dataverse operations are authenticated automatically by the platform.
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/triple-slash-reference */
|
|
1
2
|
/**
|
|
2
3
|
* Power Platform ToolBox API Type Definitions
|
|
3
4
|
*
|
|
@@ -16,9 +17,11 @@
|
|
|
16
17
|
|
|
17
18
|
/// <reference path="./toolboxAPI.d.ts" />
|
|
18
19
|
/// <reference path="./dataverseAPI.d.ts" />
|
|
20
|
+
/// <reference path="./powerplatformAPI.d.ts" />
|
|
19
21
|
/// <reference path="./pptbConfig.d.ts" />
|
|
20
22
|
|
|
21
23
|
// Re-export all namespaces for convenience
|
|
22
24
|
export * from "./dataverseAPI";
|
|
23
|
-
export * from "./
|
|
25
|
+
export * from "./powerplatformAPI";
|
|
24
26
|
export * from "./pptbConfig";
|
|
27
|
+
export * from "./toolboxAPI";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pptb/types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4-beta.0",
|
|
4
4
|
"description": "Type definitions for Power Platform ToolBox APIs and validity checks for tool packages",
|
|
5
5
|
"main": "index.d.ts",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"index.d.ts",
|
|
27
27
|
"toolboxAPI.d.ts",
|
|
28
28
|
"dataverseAPI.d.ts",
|
|
29
|
+
"powerplatformAPI.d.ts",
|
|
29
30
|
"pptbConfig.d.ts",
|
|
30
31
|
"bin/",
|
|
31
32
|
"lib/",
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Power Platform ToolBox - Power Platform API Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Power Platform Admin APIs exposed to tools via window.powerplatformAPI
|
|
5
|
+
* https://learn.microsoft.com/en-us/rest/api/power-platform/
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
declare namespace PowerPlatformAPI {
|
|
9
|
+
/**
|
|
10
|
+
* Power Platform API category response type
|
|
11
|
+
*/
|
|
12
|
+
export interface PowerPlatformResponse {
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Generic HTTP method type
|
|
18
|
+
*/
|
|
19
|
+
export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Power Platform API category client interface
|
|
23
|
+
* Provides generic HTTP methods for each API category
|
|
24
|
+
*/
|
|
25
|
+
export interface CategoryClient {
|
|
26
|
+
/**
|
|
27
|
+
* Make a GET request to the category endpoint
|
|
28
|
+
* @param path Relative path after the category base URL (e.g., "environments/{environmentId}/apps/{app}?api-version=2024-10-01")
|
|
29
|
+
* @param connectionTarget Optional connection target for multi-connection tools ('primary' or 'secondary'). Defaults to 'primary'.
|
|
30
|
+
* @param headers Optional custom headers
|
|
31
|
+
*/
|
|
32
|
+
Get: (path?: string, connectionTarget?: "primary" | "secondary", headers?: Record<string, string>) => Promise<PowerPlatformResponse>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Make a POST request to the category endpoint
|
|
36
|
+
* @param path Relative path after the category base URL
|
|
37
|
+
* @param body Optional request body
|
|
38
|
+
* @param connectionTarget Optional connection target for multi-connection tools ('primary' or 'secondary'). Defaults to 'primary'.
|
|
39
|
+
* @param headers Optional custom headers
|
|
40
|
+
*/
|
|
41
|
+
Post: (path?: string, body?: unknown, connectionTarget?: "primary" | "secondary", headers?: Record<string, string>) => Promise<PowerPlatformResponse>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Make a PUT request to the category endpoint
|
|
45
|
+
* @param path Relative path after the category base URL
|
|
46
|
+
* @param body Optional request body
|
|
47
|
+
* @param connectionTarget Optional connection target for multi-connection tools ('primary' or 'secondary'). Defaults to 'primary'.
|
|
48
|
+
* @param headers Optional custom headers
|
|
49
|
+
*/
|
|
50
|
+
Put: (path?: string, body?: unknown, connectionTarget?: "primary" | "secondary", headers?: Record<string, string>) => Promise<PowerPlatformResponse>;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Make a PATCH request to the category endpoint
|
|
54
|
+
* @param path Relative path after the category base URL
|
|
55
|
+
* @param body Optional request body
|
|
56
|
+
* @param connectionTarget Optional connection target for multi-connection tools ('primary' or 'secondary'). Defaults to 'primary'.
|
|
57
|
+
* @param headers Optional custom headers
|
|
58
|
+
*/
|
|
59
|
+
Patch: (path?: string, body?: unknown, connectionTarget?: "primary" | "secondary", headers?: Record<string, string>) => Promise<PowerPlatformResponse>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Make a DELETE request to the category endpoint
|
|
63
|
+
* @param path Relative path after the category base URL
|
|
64
|
+
* @param connectionTarget Optional connection target for multi-connection tools ('primary' or 'secondary'). Defaults to 'primary'.
|
|
65
|
+
* @param headers Optional custom headers
|
|
66
|
+
* @param body Optional request body (for DELETE with payload)
|
|
67
|
+
*/
|
|
68
|
+
Delete: (path?: string, connectionTarget?: "primary" | "secondary", headers?: Record<string, string>, body?: unknown) => Promise<PowerPlatformResponse>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Power Platform Analytics API
|
|
73
|
+
* https://api.powerplatform.com/analytics
|
|
74
|
+
*/
|
|
75
|
+
export interface Analytics extends CategoryClient {}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Power Platform App Management API
|
|
79
|
+
* https://api.powerplatform.com/appmanagement
|
|
80
|
+
*/
|
|
81
|
+
export interface AppManagement extends CategoryClient {}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Power Platform Authorization API
|
|
85
|
+
* https://api.powerplatform.com/authorization
|
|
86
|
+
*/
|
|
87
|
+
export interface Authorization extends CategoryClient {}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Power Platform Connectivity API
|
|
91
|
+
* https://api.powerplatform.com/connectivity
|
|
92
|
+
*/
|
|
93
|
+
export interface Connectivity extends CategoryClient {}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Power Platform Copilot Studio API
|
|
97
|
+
* https://api.powerplatform.com/copilotstudio
|
|
98
|
+
*/
|
|
99
|
+
export interface CopilotStudio extends CategoryClient {}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Power Platform Dynamics API
|
|
103
|
+
* https://api.powerplatform.com/dynamics
|
|
104
|
+
*/
|
|
105
|
+
export interface Dynamics extends CategoryClient {}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Power Platform Environment Management API
|
|
109
|
+
* https://api.powerplatform.com/environmentmanagement
|
|
110
|
+
*/
|
|
111
|
+
export interface EnvironmentManagement extends CategoryClient {}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Power Platform Governance API
|
|
115
|
+
* https://api.powerplatform.com/governance
|
|
116
|
+
*/
|
|
117
|
+
export interface Governance extends CategoryClient {}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Power Platform Licensing API
|
|
121
|
+
* https://api.powerplatform.com/licensing
|
|
122
|
+
*/
|
|
123
|
+
export interface Licensing extends CategoryClient {}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Power Platform Power Apps API
|
|
127
|
+
* https://api.powerplatform.com/powerapps
|
|
128
|
+
*/
|
|
129
|
+
export interface PowerApps extends CategoryClient {}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Power Platform Power Automate API
|
|
133
|
+
* https://api.powerplatform.com/powerautomate
|
|
134
|
+
*/
|
|
135
|
+
export interface PowerAutomate extends CategoryClient {}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Power Platform Power Pages API
|
|
139
|
+
* https://api.powerplatform.com/powerpages
|
|
140
|
+
*/
|
|
141
|
+
export interface PowerPages extends CategoryClient {}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Power Platform Resource Query API
|
|
145
|
+
* https://api.powerplatform.com/resourcequery
|
|
146
|
+
*/
|
|
147
|
+
export interface ResourceQuery extends CategoryClient {}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Power Platform User Management API
|
|
151
|
+
* https://api.powerplatform.com/usermanagement
|
|
152
|
+
*/
|
|
153
|
+
export interface UserManagement extends CategoryClient {}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Power Platform Workflow Agents API
|
|
157
|
+
* https://api.powerplatform.com/workflowagents
|
|
158
|
+
*/
|
|
159
|
+
export interface WorkflowAgents extends CategoryClient {}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Main Power Platform API interface
|
|
163
|
+
* Each category exposes generic HTTP methods (Get, Post, Put, Patch, Delete)
|
|
164
|
+
*/
|
|
165
|
+
export interface API {
|
|
166
|
+
Analytics: Analytics;
|
|
167
|
+
AppManagement: AppManagement;
|
|
168
|
+
Authorization: Authorization;
|
|
169
|
+
Connectivity: Connectivity;
|
|
170
|
+
CopilotStudio: CopilotStudio;
|
|
171
|
+
Dynamics: Dynamics;
|
|
172
|
+
EnvironmentManagement: EnvironmentManagement;
|
|
173
|
+
Governance: Governance;
|
|
174
|
+
Licensing: Licensing;
|
|
175
|
+
PowerApps: PowerApps;
|
|
176
|
+
PowerAutomate: PowerAutomate;
|
|
177
|
+
PowerPages: PowerPages;
|
|
178
|
+
ResourceQuery: ResourceQuery;
|
|
179
|
+
UserManagement: UserManagement;
|
|
180
|
+
WorkflowAgents: WorkflowAgents;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Global window interface extension for Power Platform API
|
|
186
|
+
*/
|
|
187
|
+
declare global {
|
|
188
|
+
interface Window {
|
|
189
|
+
/**
|
|
190
|
+
* Power Platform Admin API accessible to tools
|
|
191
|
+
* @example
|
|
192
|
+
* // Get admin app from Power Apps
|
|
193
|
+
* const app = await powerplatformAPI.PowerApps.Get('environments/{environmentId}/apps/{app}?api-version=2024-10-01');
|
|
194
|
+
*/
|
|
195
|
+
powerplatformAPI: PowerPlatformAPI.API;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export = PowerPlatformAPI;
|
|
200
|
+
export as namespace PowerPlatformAPI;
|