pptb-standard-sample-tool 1.1.12 → 1.2.1

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/dist/app.js CHANGED
@@ -15,14 +15,17 @@ import { createSecuritySuites } from "./security/suites.js";
15
15
  // Global API references
16
16
  const toolbox = window.toolboxAPI;
17
17
  const dataverse = window.dataverseAPI;
18
+ const powerplatform = window.powerplatformAPI;
18
19
  // Application state
19
20
  let currentConnection = null;
20
21
  let secondaryConnection = null;
21
22
  let currentTerminal = null;
22
23
  let createdId = null;
24
+ let currentLaunchContext = null;
23
25
  let securitySuites = null;
24
26
  let terminalFeature = null;
25
27
  let fileSystemFeature = null;
28
+ let inputEntityName = null;
26
29
  /**
27
30
  * Initialize the application
28
31
  */
@@ -60,6 +63,7 @@ async function initialize() {
60
63
  showNotification,
61
64
  log,
62
65
  });
66
+ await identifyLaunchContext();
63
67
  // Setup UI event handlers
64
68
  setupEventHandlers();
65
69
  // Apply theme
@@ -72,6 +76,41 @@ async function initialize() {
72
76
  log(`Initialization error: ${error.message}`, "error");
73
77
  }
74
78
  }
79
+ /**
80
+ * Identifying Launch Context
81
+ */
82
+ async function identifyLaunchContext() {
83
+ try {
84
+ const ctx = await toolbox.invocation.getLaunchContext();
85
+ log(`Launch context: ${ctx}`, "info");
86
+ if (ctx !== null) {
87
+ // Tool was launched via inter-tool invocation
88
+ inputEntityName = ctx.entityName;
89
+ currentLaunchContext = ctx;
90
+ log(`Launched with context for entity: ${inputEntityName}`, "success");
91
+ // Set iti-entity-name value with the entity name from the launch context
92
+ const entityNameInput = document.getElementById("iti-entity-name");
93
+ if (entityNameInput) {
94
+ entityNameInput.value = inputEntityName;
95
+ }
96
+ // Set default fetchXML to query the launched entity
97
+ const defaultFetchOutput = document.getElementById("iti-default-fetch-output");
98
+ if (defaultFetchOutput) {
99
+ defaultFetchOutput.textContent = `
100
+ <fetch top="10">
101
+ <entity name="${inputEntityName}">
102
+ <attribute name="name" />
103
+ <attribute name="${inputEntityName}id" />
104
+ <order attribute="name" />
105
+ </entity>
106
+ </fetch>`;
107
+ }
108
+ }
109
+ }
110
+ catch (error) {
111
+ log(`Error getting launch context: ${error.message}`, "error");
112
+ }
113
+ }
75
114
  /**
76
115
  * Refresh connection information
77
116
  */
@@ -189,7 +228,6 @@ function setupEventHandlers() {
189
228
  document.getElementById("show-info-btn")?.addEventListener("click", () => showNotification("Information", "This is an informational message", "info"));
190
229
  document.getElementById("show-warning-btn")?.addEventListener("click", () => showNotification("Warning", "Please review this warning", "warning"));
191
230
  document.getElementById("show-error-btn")?.addEventListener("click", () => showNotification("Error", "An error has occurred", "error"));
192
- document.getElementById("show-loading-btn")?.addEventListener("click", showLoading);
193
231
  // Utility buttons
194
232
  document.getElementById("copy-clipboard-btn")?.addEventListener("click", copyToClipboard);
195
233
  document.getElementById("get-theme-btn")?.addEventListener("click", showCurrentTheme);
@@ -226,6 +264,11 @@ function setupEventHandlers() {
226
264
  document.getElementById("get-metadata-allentities")?.addEventListener("click", getAllEntities);
227
265
  //Execute buttons
228
266
  document.getElementById("whoami-btn")?.addEventListener("click", executeWhoAmI);
267
+ // Power Platform API buttons
268
+ document.getElementById("list-apps-btn")?.addEventListener("click", listPowerApps);
269
+ document.getElementById("list-flows-btn")?.addEventListener("click", listPowerAutomateFlows);
270
+ document.getElementById("list-environments-btn")?.addEventListener("click", listEnvironments);
271
+ document.getElementById("get-governance-btn")?.addEventListener("click", getGovernanceData);
229
272
  // Clear log button
230
273
  document.getElementById("clear-log-btn")?.addEventListener("click", clearLog);
231
274
  // Advanced utilities demos
@@ -234,6 +277,21 @@ function setupEventHandlers() {
234
277
  // Settings buttons
235
278
  document.getElementById("load-setting-btn")?.addEventListener("click", loadToolSetting);
236
279
  document.getElementById("save-setting-btn")?.addEventListener("click", saveToolSetting);
280
+ // Inter-tool invocation buttons
281
+ document.getElementById("iti-return-value-btn")?.addEventListener("click", async () => {
282
+ const fetchXML = document.getElementById("iti-default-fetch-output")?.textContent;
283
+ await toolbox.invocation.returnData({
284
+ fetchXml: fetchXML,
285
+ });
286
+ log(`Returned data to caller: ${fetchXML}`, "info");
287
+ // PPTB automatically closes this window after delivering the result.
288
+ });
289
+ document.getElementById("iti-launch-fetchxml-btn")?.addEventListener("click", async () => {
290
+ const entityName = document.getElementById("iti-entity-logical-name").value;
291
+ const result = await toolbox.invocation.launchTool("@mohsinonxrm/pptb-fetchxml-studio", // npm package name of the target tool
292
+ { entityName: entityName });
293
+ log(`Launched entity picker with result: ${JSON.stringify(result)}`, "info");
294
+ });
237
295
  }
238
296
  /**
239
297
  * Show notification
@@ -252,17 +310,6 @@ async function showNotification(title, body, type) {
252
310
  log(`Error showing notification: ${error.message}`, "error");
253
311
  }
254
312
  }
255
- async function showLoading() {
256
- try {
257
- await toolbox.utils.showLoading("Loading... for 3 seconds");
258
- log("Loading shown for 3 seconds", "info");
259
- await new Promise((resolve) => setTimeout(resolve, 3000));
260
- await toolbox.utils.hideLoading();
261
- }
262
- catch (error) {
263
- log(`Error showing loading: ${error.message}`, "error");
264
- }
265
- }
266
313
  /**
267
314
  * Copy text to clipboard
268
315
  */
@@ -885,7 +932,6 @@ async function demoLoading() {
885
932
  if (output)
886
933
  output.textContent = "Showing loading screen...\n";
887
934
  try {
888
- await toolbox.utils.showLoading("Processing data...");
889
935
  log("Loading screen displayed", "info");
890
936
  // Simulate async work or perform a lightweight query
891
937
  if (currentConnection) {
@@ -910,13 +956,123 @@ async function demoLoading() {
910
956
  await showNotification("Loading Demo Error", error.message, "error");
911
957
  }
912
958
  finally {
913
- await toolbox.utils.hideLoading();
914
959
  if (output)
915
960
  output.textContent += "\nLoading screen hidden.";
916
961
  log("Loading screen hidden", "info");
917
962
  await showNotification("Loading Complete", "Demo finished", "success");
918
963
  }
919
964
  }
965
+ // -----------------------------
966
+ // Power Platform API Examples
967
+ // -----------------------------
968
+ async function listPowerApps() {
969
+ const output = document.getElementById("powerapps-output");
970
+ const envId = document.getElementById("ppapps-env-id")?.value;
971
+ if (!envId) {
972
+ await showNotification("Missing Environment ID", "Please enter an environment ID", "warning");
973
+ if (output)
974
+ output.textContent = "Enter an environment ID to list apps.";
975
+ return;
976
+ }
977
+ try {
978
+ if (output)
979
+ output.textContent = "Fetching Power Apps...\n";
980
+ const result = await powerplatform.PowerApps.Get(`environments/${envId}/apps?api-version=2024-10-01`);
981
+ if (output) {
982
+ const apps = result.value || [];
983
+ output.textContent += `Found ${apps.length} app(s):\n\n`;
984
+ apps.forEach((app, index) => {
985
+ output.textContent += `${index + 1}. ${app.name}\n`;
986
+ output.textContent += ` ID: ${app.id || app.appId}\n`;
987
+ output.textContent += ` Type: ${app.type || "N/A"}\n\n`;
988
+ });
989
+ log(`Listed ${apps.length} Power Apps`, "success");
990
+ }
991
+ }
992
+ catch (error) {
993
+ if (output)
994
+ output.textContent = `Error: ${error.message}`;
995
+ log(`Error listing Power Apps: ${error.message}`, "error");
996
+ }
997
+ }
998
+ async function listPowerAutomateFlows() {
999
+ const output = document.getElementById("powerautomate-output");
1000
+ const envId = document.getElementById("ppautomate-env-id")?.value;
1001
+ if (!envId) {
1002
+ await showNotification("Missing Environment ID", "Please enter an environment ID", "warning");
1003
+ if (output)
1004
+ output.textContent = "Enter an environment ID to list flows.";
1005
+ return;
1006
+ }
1007
+ try {
1008
+ if (output)
1009
+ output.textContent = "Fetching Power Automate flows...\n";
1010
+ const result = await powerplatform.PowerAutomate.Get(`environments/${envId}/cloudFlows?api-version=2024-10-01`);
1011
+ if (output) {
1012
+ const flows = result.value || [];
1013
+ output.textContent += `Found ${flows.length} flow(s):\n\n`;
1014
+ flows.forEach((flow, index) => {
1015
+ output.textContent += `${index + 1}. ${flow.displayName || flow.name}\n`;
1016
+ output.textContent += ` ID: ${flow.id || flow.flowId}\n`;
1017
+ output.textContent += ` State: ${flow.state || "N/A"}\n\n`;
1018
+ });
1019
+ log(`Listed ${flows.length} Power Automate flows`, "success");
1020
+ }
1021
+ }
1022
+ catch (error) {
1023
+ if (output)
1024
+ output.textContent = `Error: ${error.message}`;
1025
+ log(`Error listing flows: ${error.message}`, "error");
1026
+ }
1027
+ }
1028
+ async function listEnvironments() {
1029
+ const output = document.getElementById("environments-output");
1030
+ try {
1031
+ if (output)
1032
+ output.textContent = "Fetching environments...\n";
1033
+ const result = await powerplatform.EnvironmentManagement.Get("environments?api-version=2024-10-01");
1034
+ if (output) {
1035
+ const envs = result.value || [];
1036
+ output.textContent += `Found ${envs.length} environment(s):\n\n`;
1037
+ envs.forEach((env, index) => {
1038
+ output.textContent += `${index + 1}. ${env.displayName}\n`;
1039
+ output.textContent += ` ID: ${env.id || env.environmentId}\n`;
1040
+ output.textContent += ` Type: ${env.type || env.environmentType || "N/A"}\n\n`;
1041
+ });
1042
+ log(`Listed ${envs.length} environments`, "success");
1043
+ }
1044
+ }
1045
+ catch (error) {
1046
+ if (output)
1047
+ output.textContent = `Error: ${error.message}`;
1048
+ log(`Error listing environments: ${error.message}`, "error");
1049
+ }
1050
+ }
1051
+ async function getGovernanceData() {
1052
+ const output = document.getElementById("governance-output");
1053
+ const envId = document.getElementById("governance-env-id")?.value;
1054
+ if (!envId) {
1055
+ await showNotification("Missing Environment ID", "Please enter an environment ID", "warning");
1056
+ if (output)
1057
+ output.textContent = "Enter an environment ID to get governance data.";
1058
+ return;
1059
+ }
1060
+ try {
1061
+ if (output)
1062
+ output.textContent = "Fetching governance data...\n";
1063
+ const result = await powerplatform.Governance.Get(`ruleBasedPolicies/environments/${envId}/assignments?includeRuleSetCounts=true&api-version=2024-10-01`);
1064
+ if (output) {
1065
+ output.textContent += "Governance Data:\n\n";
1066
+ output.textContent += JSON.stringify(result, null, 2);
1067
+ }
1068
+ log("Governance data retrieved", "success");
1069
+ }
1070
+ catch (error) {
1071
+ if (output)
1072
+ output.textContent = `Error: ${error.message}`;
1073
+ log(`Error getting governance data: ${error.message}`, "error");
1074
+ }
1075
+ }
920
1076
  // Initialize when DOM is ready
921
1077
  if (document.readyState === "loading") {
922
1078
  document.addEventListener("DOMContentLoaded", initialize);
package/dist/index.html CHANGED
@@ -68,10 +68,9 @@
68
68
 
69
69
  <div class="example-group">
70
70
  <h3>Advanced Utilities</h3>
71
- <p style="margin: 4px 0 8px; font-size: 12px; opacity: 0.8">Demonstrates <code>executeParallel</code>, <code>showLoading</code> & <code>hideLoading</code>.</p>
71
+ <p style="margin: 4px 0 8px; font-size: 12px; opacity: 0.8">Demonstrates <code>executeParallel</code>.</p>
72
72
  <div class="button-group">
73
73
  <button id="parallel-demo-btn" class="btn btn-primary">Run Parallel Demo</button>
74
- <button id="loading-demo-btn" class="btn btn-secondary">Run Loading Demo</button>
75
74
  </div>
76
75
  <div id="parallel-output" class="output"></div>
77
76
  </div>
@@ -173,6 +172,86 @@
173
172
  </div>
174
173
  </section>
175
174
 
175
+ <!-- Power Platform API Examples -->
176
+ <section class="card">
177
+ <h2>⚡ Power Platform API Examples</h2>
178
+ <p style="margin: 4px 0 15px; font-size: 12px; opacity: 0.85">Generic HTTP methods for Power Platform Admin APIs (Power Apps, Power Automate, Environment Management, Governance).</p>
179
+
180
+ <div class="example-group">
181
+ <h3>Power Apps API</h3>
182
+ <div class="input-group">
183
+ <label for="ppapps-env-id">Environment ID:</label>
184
+ <input type="text" id="ppapps-env-id" placeholder="Enter environment ID" />
185
+ </div>
186
+ <div class="button-group">
187
+ <button id="list-apps-btn" class="btn">List Admin Apps</button>
188
+ </div>
189
+ <div id="powerapps-output" class="output"></div>
190
+ </div>
191
+
192
+ <div class="example-group">
193
+ <h3>Power Automate API</h3>
194
+ <div class="input-group">
195
+ <label for="ppautomate-env-id">Environment ID:</label>
196
+ <input type="text" id="ppautomate-env-id" placeholder="Enter environment ID" />
197
+ </div>
198
+ <div class="button-group">
199
+ <button id="list-flows-btn" class="btn">List Flows</button>
200
+ </div>
201
+ <div id="powerautomate-output" class="output"></div>
202
+ </div>
203
+
204
+ <div class="example-group">
205
+ <h3>Environment Management API</h3>
206
+ <div class="button-group">
207
+ <button id="list-environments-btn" class="btn btn-primary">List Environments For User</button>
208
+ </div>
209
+ <div id="environments-output" class="output"></div>
210
+ </div>
211
+
212
+ <div class="example-group">
213
+ <h3>Governance API</h3>
214
+ <div class="input-group">
215
+ <label for="governance-env-id">Environment ID:</label>
216
+ <input type="text" id="governance-env-id" placeholder="Enter environment ID" />
217
+ </div>
218
+ <div class="button-group">
219
+ <button id="get-governance-btn" class="btn">List Rule Assignments By Environment Id</button>
220
+ </div>
221
+ <div id="governance-output" class="output"></div>
222
+ </div>
223
+ </section>
224
+
225
+ <!-- Inter-tool Invocation Example -->
226
+ <section class="card">
227
+ <h2>⚡ Inter-tool Invocation Example</h2>
228
+ <p style="margin: 4px 0 15px; font-size: 12px; opacity: 0.85">Demonstrates how to invoke other tools or read invoked values within the Power Platform ToolBox.</p>
229
+
230
+ <div class="example-group">
231
+ <h3>Tool Launched by Another Tool or Agent</h3>
232
+ <div class="input-group">
233
+ <label for="iti-entity-name">Entity Name:</label>
234
+ <input type="text" id="iti-entity-name" readonly />
235
+ </div>
236
+ <div class="button-group">
237
+ <button id="iti-return-value-btn" class="btn">Return Default FetchXml (shown below)</button>
238
+ </div>
239
+ <div id="iti-default-fetch-output" class="output"></div>
240
+ </div>
241
+ <div class="example-group">
242
+ <h3>Launch Fetch XML Studio</h3>
243
+ <div class="input-group">
244
+ <label for="iti-entity-logical-name">Entity Logical Name:</label>
245
+ <input type="text" id="iti-entity-logical-name" placeholder="account" />
246
+ </div>
247
+ <div class="button-group">
248
+ <button id="iti-launch-fetchxml-btn" class="btn">Launch Fetch XML Studio</button>
249
+ </div>
250
+ <h4>Returned FetchXML:</h4>
251
+ <div id="iti-returned-fetch-output" class="output"></div>
252
+ </div>
253
+ </section>
254
+
176
255
  <!-- Event Log -->
177
256
  <section class="card">
178
257
  <h2>📋 Event Log</h2>
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "pptb-standard-sample-tool",
3
- "version": "1.1.12",
3
+ "version": "1.2.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pptb-standard-sample-tool",
9
- "version": "1.1.12",
9
+ "version": "1.2.0",
10
10
  "license": "GPL-3.0",
11
11
  "devDependencies": {
12
- "@pptb/types": "^1.0.19",
12
+ "@pptb/types": "^1.2.4-beta.4",
13
13
  "shx": "^0.4.0",
14
14
  "typescript": "^5.0.0"
15
15
  },
@@ -17,6 +17,19 @@
17
17
  "node": ">=18.0.0"
18
18
  }
19
19
  },
20
+ "node_modules/@isaacs/fs-minipass": {
21
+ "version": "4.0.1",
22
+ "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",
23
+ "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==",
24
+ "dev": true,
25
+ "license": "ISC",
26
+ "dependencies": {
27
+ "minipass": "^7.0.4"
28
+ },
29
+ "engines": {
30
+ "node": ">=18.0.0"
31
+ }
32
+ },
20
33
  "node_modules/@nodelib/fs.scandir": {
21
34
  "version": "2.1.5",
22
35
  "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -56,11 +69,30 @@
56
69
  }
57
70
  },
58
71
  "node_modules/@pptb/types": {
59
- "version": "1.0.19",
60
- "resolved": "https://registry.npmjs.org/@pptb/types/-/types-1.0.19.tgz",
61
- "integrity": "sha512-1nzI65TZEcP5t672G8T3uzheDI5az7Q58HGOq7F2wh0oxcbLKjSfarD13cNKR01slyBIUTNUF5W3pNHJTLYHYA==",
72
+ "version": "1.2.4-beta.4",
73
+ "resolved": "https://registry.npmjs.org/@pptb/types/-/types-1.2.4-beta.4.tgz",
74
+ "integrity": "sha512-ipoQFehrZ6ndWAsIFZF1MBInM5hY0epUOsNf513oURnfie0Orcx2+7alt6B09LR2OG0egLf0BFxxg4iVDwMvNw==",
62
75
  "dev": true,
63
- "license": "GPL-3.0"
76
+ "license": "GPL-3.0",
77
+ "dependencies": {
78
+ "@pptb/validate": "^0.0.2"
79
+ },
80
+ "bin": {
81
+ "pptb-validate": "bin/pptb-validate.js"
82
+ }
83
+ },
84
+ "node_modules/@pptb/validate": {
85
+ "version": "0.0.2",
86
+ "resolved": "https://registry.npmjs.org/@pptb/validate/-/validate-0.0.2.tgz",
87
+ "integrity": "sha512-QsuimcuDgEbblqC4uAeXE+ONm5KJ5twKbGFh9d8e4leF2jsISgVpVzYPgivSLUA9iomDGmMnXcklHPgb4jEf1A==",
88
+ "dev": true,
89
+ "license": "GPL-3.0",
90
+ "dependencies": {
91
+ "tar": "^7.5.16"
92
+ },
93
+ "bin": {
94
+ "pptb-validate": "dist/cli.js"
95
+ }
64
96
  },
65
97
  "node_modules/braces": {
66
98
  "version": "3.0.3",
@@ -75,6 +107,16 @@
75
107
  "node": ">=8"
76
108
  }
77
109
  },
110
+ "node_modules/chownr": {
111
+ "version": "3.0.0",
112
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz",
113
+ "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==",
114
+ "dev": true,
115
+ "license": "BlueOak-1.0.0",
116
+ "engines": {
117
+ "node": ">=18"
118
+ }
119
+ },
78
120
  "node_modules/cross-spawn": {
79
121
  "version": "6.0.6",
80
122
  "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz",
@@ -320,6 +362,29 @@
320
362
  "url": "https://github.com/sponsors/ljharb"
321
363
  }
322
364
  },
365
+ "node_modules/minipass": {
366
+ "version": "7.1.3",
367
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
368
+ "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
369
+ "dev": true,
370
+ "license": "BlueOak-1.0.0",
371
+ "engines": {
372
+ "node": ">=16 || 14 >=14.17"
373
+ }
374
+ },
375
+ "node_modules/minizlib": {
376
+ "version": "3.1.0",
377
+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz",
378
+ "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==",
379
+ "dev": true,
380
+ "license": "MIT",
381
+ "dependencies": {
382
+ "minipass": "^7.1.2"
383
+ },
384
+ "engines": {
385
+ "node": ">= 18"
386
+ }
387
+ },
323
388
  "node_modules/nice-try": {
324
389
  "version": "1.0.5",
325
390
  "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
@@ -589,6 +654,23 @@
589
654
  "url": "https://github.com/sponsors/ljharb"
590
655
  }
591
656
  },
657
+ "node_modules/tar": {
658
+ "version": "7.5.16",
659
+ "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.16.tgz",
660
+ "integrity": "sha512-56adEpPMouktRlBLXiaYFFzZ/3+JXa8P9n7WbR+ibIjtviN55mEaOkiysCnPnWm+7kkui1Dn8J9l+g6zV8731w==",
661
+ "dev": true,
662
+ "license": "BlueOak-1.0.0",
663
+ "dependencies": {
664
+ "@isaacs/fs-minipass": "^4.0.0",
665
+ "chownr": "^3.0.0",
666
+ "minipass": "^7.1.2",
667
+ "minizlib": "^3.1.0",
668
+ "yallist": "^5.0.0"
669
+ },
670
+ "engines": {
671
+ "node": ">=18"
672
+ }
673
+ },
592
674
  "node_modules/to-regex-range": {
593
675
  "version": "5.0.1",
594
676
  "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -635,6 +717,16 @@
635
717
  "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
636
718
  "dev": true,
637
719
  "license": "ISC"
720
+ },
721
+ "node_modules/yallist": {
722
+ "version": "5.0.0",
723
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",
724
+ "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==",
725
+ "dev": true,
726
+ "license": "BlueOak-1.0.0",
727
+ "engines": {
728
+ "node": ">=18"
729
+ }
638
730
  }
639
731
  }
640
732
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pptb-standard-sample-tool",
3
- "version": "1.1.12",
3
+ "version": "1.2.1",
4
4
  "displayName": "HTML Sample Tool",
5
5
  "description": "A sample Power Platform ToolBox tool built with HTML, CSS, and TypeScript",
6
6
  "main": "index.html",
@@ -28,7 +28,8 @@
28
28
  },
29
29
  "features": {
30
30
  "minAPI": "1.2.2",
31
- "multiConnection": "optional"
31
+ "multiConnection": "optional",
32
+ "enabledForPowerPlatformAPI": true
32
33
  },
33
34
  "repository": {
34
35
  "type": "git",
@@ -44,15 +45,16 @@
44
45
  "copy-css": "shx cp src/styles.css dist/",
45
46
  "copy-icon": "shx cp -r icon/ dist/icon/",
46
47
  "finalize-package": "npm shrinkwrap",
47
- "watch": "tsc --watch"
48
+ "validate": "pptb-validate"
48
49
  },
49
50
  "devDependencies": {
50
- "@pptb/types": "^1.0.19",
51
+ "@pptb/types": "^1.2.4-beta.4",
51
52
  "shx": "^0.4.0",
52
53
  "typescript": "^5.0.0"
53
54
  },
54
55
  "files": [
55
56
  "dist",
56
- "npm-shrinkwrap.json"
57
+ "npm-shrinkwrap.json",
58
+ "pptb.config.json"
57
59
  ]
58
- }
60
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "invocation": {
3
+ "version": "1.0.0",
4
+ "agentInvokable": true,
5
+ "capabilities": [
6
+ "fetchxml"
7
+ ],
8
+ "prefill": {
9
+ "properties": {
10
+ "entityName": {
11
+ "type": "string"
12
+ }
13
+ }
14
+ },
15
+ "returnTopic": {
16
+ "properties": {
17
+ "fetchXml": {
18
+ "type": "string"
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }