@pptb/types 1.0.12 → 1.0.13

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 CHANGED
@@ -109,14 +109,14 @@ console.log("Current theme:", theme); // "light" or "dark"
109
109
 
110
110
  // Execute multiple operations in parallel
111
111
  const [account, contact, opportunities] = await toolboxAPI.utils.executeParallel(
112
- dataverseAPI.retrieve('account', accountId, ['name']),
113
- dataverseAPI.retrieve('contact', contactId, ['fullname']),
114
- dataverseAPI.fetchXmlQuery(opportunityFetchXml)
112
+ dataverseAPI.retrieve("account", accountId, ["name"]),
113
+ dataverseAPI.retrieve("contact", contactId, ["fullname"]),
114
+ dataverseAPI.fetchXmlQuery(opportunityFetchXml),
115
115
  );
116
- console.log('All data fetched:', account, contact, opportunities);
116
+ console.log("All data fetched:", account, contact, opportunities);
117
117
 
118
118
  // Show loading screen during operations
119
- await toolboxAPI.utils.showLoading('Processing data...');
119
+ await toolboxAPI.utils.showLoading("Processing data...");
120
120
  try {
121
121
  // Perform operations
122
122
  await processData();
@@ -253,6 +253,12 @@ const result = await dataverseAPI.execute({
253
253
  FieldName: "total_revenue",
254
254
  },
255
255
  });
256
+
257
+ // Publish customizations for the active environment
258
+ await dataverseAPI.publishCustomizations();
259
+
260
+ // Publish only a specific table (in this case, the account table)
261
+ await dataverseAPI.publishCustomizations("account");
256
262
  ```
257
263
 
258
264
  ## API Reference
@@ -294,9 +300,9 @@ Core platform features organized into namespaces:
294
300
  - Example:
295
301
  ```typescript
296
302
  const [account, contact, opportunities] = await toolboxAPI.utils.executeParallel(
297
- dataverseAPI.retrieve('account', id1),
298
- dataverseAPI.retrieve('contact', id2),
299
- dataverseAPI.fetchXmlQuery(fetchXml)
303
+ dataverseAPI.retrieve("account", id1),
304
+ dataverseAPI.retrieve("contact", id2),
305
+ dataverseAPI.fetchXmlQuery(fetchXml),
300
306
  );
301
307
  ```
302
308
 
@@ -407,6 +413,8 @@ Complete HTTP client for interacting with Microsoft Dataverse:
407
413
  - **execute(request: ExecuteRequest)**: Promise<Record<string, unknown>>
408
414
  - Executes a Dataverse Web API action or function
409
415
  - Supports both bound and unbound operations
416
+ - **publishCustomizations(tableLogicalName?: string)**: Promise<void>
417
+ - Publishes pending customizations. When `tableLogicalName` is omitted it runs PublishAllXml; otherwise it publishes only the specified table.
410
418
 
411
419
  ### Security Notes
412
420
 
package/dataverseAPI.d.ts CHANGED
@@ -381,6 +381,25 @@ declare namespace DataverseAPI {
381
381
  */
382
382
  queryData: (odataQuery: string, connectionTarget?: "primary" | "secondary") => Promise<{ value: Record<string, unknown>[] }>;
383
383
 
384
+ /**
385
+ * Publish customizations for the current environment.
386
+ *
387
+ * When `tableLogicalName` is provided, this method publishes only that table by executing the PublishXml action with a generated payload.
388
+ * When no table name is provided, it runs PublishAllXml (equivalent to "Publish All Customizations").
389
+ *
390
+ * @param tableLogicalName - Optional table (entity) logical name to publish. If omitted, all pending customizations are published.
391
+ * @param connectionTarget - Optional connection target for multi-connection tools ('primary' or 'secondary'). Defaults to 'primary'.
392
+ *
393
+ * @example
394
+ * // Publish all customizations
395
+ * await dataverseAPI.publishCustomizations();
396
+ *
397
+ * @example
398
+ * // Publish only the account table
399
+ * await dataverseAPI.publishCustomizations('account');
400
+ */
401
+ publishCustomizations: (tableLogicalName?: string, connectionTarget?: "primary" | "secondary") => Promise<void>;
402
+
384
403
  /**
385
404
  * Create multiple records in Dataverse
386
405
  *
@@ -410,6 +429,8 @@ declare namespace DataverseAPI {
410
429
  * ]);
411
430
  */
412
431
  updateMultiple: (entityLogicalName: string, records: Record<string, unknown>[], connectionTarget?: "primary" | "secondary") => Promise<void>;
432
+
433
+ /**
413
434
  * Gets the Dataverse entity set (collection) name for the specified table.
414
435
  *
415
436
  * This is typically used when building OData queries where the collection name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pptb/types",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "TypeScript type definitions for Power Platform Tool Box API",
5
5
  "main": "index.d.ts",
6
6
  "types": "index.d.ts",
@@ -19,4 +19,4 @@
19
19
  "url": "https://github.com/PowerPlatformToolBox/desktop-app.git",
20
20
  "directory": "packages"
21
21
  }
22
- }
22
+ }