@mohsinonxrm/pptb-dataverse-request-studio 1.1.3 → 1.4.0-beta.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/CHANGELOG.md +383 -0
- package/LICENSE +661 -661
- package/README.md +479 -390
- package/SECURITY.md +54 -51
- package/dist/assets/AssociateMode-BVHaHiUu.js +1 -0
- package/dist/assets/AssociateTargetsEditor-C-QKaWaJ.js +1 -0
- package/dist/assets/BatchMode-D1J8HcNO.js +11 -0
- package/dist/assets/BinaryColumnPickers-DLIbx4hp.js +1 -0
- package/dist/assets/BulkDeleteMode-CFcjcWta.js +1 -0
- package/dist/assets/BulkWriteMode-C3ZGwTjw.js +6 -0
- package/dist/assets/DisassociateMode-BwMK4UvP.js +2 -0
- package/dist/assets/ExecuteWorkflowMode-CkZdayJ4.js +1 -0
- package/dist/assets/ManageFileMode-DP3KXgFw.js +1 -0
- package/dist/assets/ManageImageMode-F0Dki5VQ.js +1 -0
- package/dist/assets/MergeMode-PeKTZ75X.js +1 -0
- package/dist/assets/PredefinedQueryMode-CDuc-WrN.js +1 -0
- package/dist/assets/RetrieveNextLinkMode-DenFlpEh.js +1 -0
- package/dist/assets/cssMode-DXyl4xBX.js +4 -0
- package/dist/assets/{freemarker2-CY0Qd_yj.js → freemarker2-CR_qGQP2.js} +2 -2
- package/dist/assets/handlebars-Buz2RscQ.js +1 -0
- package/dist/assets/html-B66Hfdqd.js +1 -0
- package/dist/assets/htmlMode-3ft3GC0g.js +4 -0
- package/dist/assets/index-C4fO68cu.js +704 -0
- package/dist/assets/javascript-Cy8u5Pbx.js +1 -0
- package/dist/assets/jsonMode-CvLp-1ik.js +10 -0
- package/dist/assets/liquid-BxIE_8lr.js +1 -0
- package/dist/assets/mdx-Bbo0ENZs.js +1 -0
- package/dist/assets/{monaco-editor-ErGqj9vD.js → monacoSetup-C4aSY1Tw.js} +193 -183
- package/dist/assets/monacoSetup-DvqauXKu.css +1 -0
- package/dist/assets/python-B6K3FYWG.js +1 -0
- package/dist/assets/razor-7sN2ZaJq.js +1 -0
- package/dist/assets/{tsMode-B1b3lx86.js → tsMode-CIH2Hja3.js} +2 -2
- package/dist/assets/typescript-rqW7IEk7.js +1 -0
- package/dist/assets/xml-Bm2nJGx3.js +1 -0
- package/dist/assets/yaml-Z6ahf7o7.js +1 -0
- package/{icons/icon-insider.svg → dist/icons/icon.svg} +22 -22
- package/dist/index.html +61 -4
- package/index.html +60 -1
- package/package.json +14 -8
- package/dist/assets/cssMode-DHcTSP5p.js +0 -4
- package/dist/assets/handlebars-BQEEw1Ke.js +0 -1
- package/dist/assets/html-BXibA6yW.js +0 -1
- package/dist/assets/htmlMode-BIOKXbRP.js +0 -4
- package/dist/assets/index-CCZE1KQi.js +0 -672
- package/dist/assets/javascript-BY4qn0pJ.js +0 -1
- package/dist/assets/jsonMode-BzZNqTrE.js +0 -10
- package/dist/assets/liquid-noPAIv1T.js +0 -1
- package/dist/assets/mdx-Ccyf8KqT.js +0 -1
- package/dist/assets/monaco-editor-I3pIE735.css +0 -1
- package/dist/assets/python-CTl0fa86.js +0 -1
- package/dist/assets/razor-DoNzFhT2.js +0 -1
- package/dist/assets/typescript-ONTfb8eq.js +0 -1
- package/dist/assets/xml-6DyixHd0.js +0 -1
- package/dist/assets/yaml-B9La2-TQ.js +0 -1
- package/icons/icon.svg +0 -25
- package/npm-shrinkwrap.json +0 -3832
package/README.md
CHANGED
|
@@ -1,390 +1,479 @@
|
|
|
1
|
-
# Dataverse Request Studio for Power Platform ToolBox
|
|
2
|
-
|
|
3
|
-
A metadata-driven studio for composing, previewing, and executing Microsoft
|
|
4
|
-
Dataverse Web API requests — covering OData reads, record writes,
|
|
5
|
-
associations, bound and unbound action/function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
 with
|
|
10
|
+
React 18, Fluent UI v9, TypeScript, and live Dataverse metadata integration.
|
|
11
|
+
|
|
12
|
+
[](https://www.npmjs.com/package/@mohsinonxrm/pptb-dataverse-request-studio)
|
|
13
|
+
[](https://www.npmjs.com/package/@mohsinonxrm/pptb-dataverse-request-studio?activeTab=versions)
|
|
14
|
+

|
|
15
|
+

|
|
16
|
+

|
|
17
|
+

|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## ✨ Features
|
|
23
|
+
|
|
24
|
+
DRS ships with **23 request modes** in 7 groups. Every mode is
|
|
25
|
+
metadata-driven and generates the correct OData / Web API shape. The
|
|
26
|
+
single-request modes emit ready-to-copy code in ten formats: `fetch`, `Xrm.WebApi`,
|
|
27
|
+
`Xrm.WebApi.executeMultiple`, `XMLHttpRequest`, Power Automate, C#, PowerShell,
|
|
28
|
+
cURL, JSON, and an OpenAPI 3 document; the `$batch` and ExecuteMultiple
|
|
29
|
+
modes have their own HTTP / fetch / C# / PPTB outputs.
|
|
30
|
+
|
|
31
|
+
### 📖 Read group
|
|
32
|
+
|
|
33
|
+
- **Retrieve Multiple** — full OData query composer with `$select`, `$filter`,
|
|
34
|
+
`$orderby`, `$expand` (nested, with inner `$filter` / `$orderby` / `$top`),
|
|
35
|
+
`$top`, `$count`, `$apply` (groupby / aggregate), and a virtualized results
|
|
36
|
+
grid with infinite scroll via `@odata.nextLink`, **Retrieve all**, CSV / JSON
|
|
37
|
+
export, per-column filters, row search, density and persisted column widths.
|
|
38
|
+
Address shortcut chips in the `$filter` builder; paste any OData URL to load
|
|
39
|
+
it into the builder.
|
|
40
|
+
- **Retrieve Single** — one record by primary key (GUID), with `$select` /
|
|
41
|
+
`$expand`.
|
|
42
|
+
- **Retrieve NextLink** — paste a `@odata.nextLink` URL to continue paging
|
|
43
|
+
any query.
|
|
44
|
+
- **Predefined Query** — execute saved-query (`?savedQuery=<id>`) and
|
|
45
|
+
user-query (`?userQuery=<id>`) URLs against an entity set, or over a row's
|
|
46
|
+
related records; layout-aware results grid that matches the source view's
|
|
47
|
+
column order.
|
|
48
|
+
|
|
49
|
+
### ✏️ Write group
|
|
50
|
+
|
|
51
|
+
- **Create Record** — `POST /<set>` with a metadata-driven field-set editor or
|
|
52
|
+
a raw JSON body. Required-field guard, `Prefer: return=representation`,
|
|
53
|
+
optional `$select` return list, duplicate detection and the `MSCRM.*`
|
|
54
|
+
bypass-header family. **Retrieve this record** from the result card.
|
|
55
|
+
- **Update Record** — `PATCH /<set>(<id>)` multi-field OR
|
|
56
|
+
`PUT /<set>(<id>)/<col>` single-column (Code tab only), with a before →
|
|
57
|
+
after diff.
|
|
58
|
+
**Require existing record** (`If-Match: *`) is the default, so a wrong GUID
|
|
59
|
+
returns 404 instead of creating a record.
|
|
60
|
+
- **Upsert Record** — full upsert / create-only / update-only / ETag-guarded
|
|
61
|
+
variants, by GUID or alternate key (alternate key: Code tab only).
|
|
62
|
+
- **Delete Record** — `DELETE /<set>(<id>)` with a typed-confirmation safety
|
|
63
|
+
affordance + cascade-impact preview. Single-property delete via
|
|
64
|
+
`DELETE /<set>(<id>)/<col>` is composed for the Code tab.
|
|
65
|
+
- **Merge Records** — `POST /Merge` for `account` / `contact` / `lead` /
|
|
66
|
+
`incident` with target + subordinate record cards, field-override matrix,
|
|
67
|
+
and PerformParentingChecks / SuppressDuplicateDetection settings.
|
|
68
|
+
|
|
69
|
+
### 📦 Bulk group
|
|
70
|
+
|
|
71
|
+
- **Bulk Write** — `CreateMultiple` / `UpdateMultiple` / `UpsertMultiple` /
|
|
72
|
+
`DeleteMultiple` over a grid of rows, with a per-table support check.
|
|
73
|
+
- **Bulk Delete Job** — a `BulkDelete` system job built from a query, with a
|
|
74
|
+
scheduled or immediate start and live job-status polling.
|
|
75
|
+
|
|
76
|
+
### 🔗 Relate group
|
|
77
|
+
|
|
78
|
+
- **Associate** — links related records via `POST /<set>(<id>)/<nav>/$ref`
|
|
79
|
+
for collection-valued navs (one request per target, already-linked targets
|
|
80
|
+
skipped), or `PATCH @odata.bind` for single-valued. Cardinality detected
|
|
81
|
+
from metadata; verb auto-flips with the picker. Polymorphic lookups
|
|
82
|
+
(Customer / Owner / `regardingobjectid`) fully supported.
|
|
83
|
+
- **Disassociate** — `DELETE /$ref` for collection-valued, `PATCH @odata.bind: null`
|
|
84
|
+
for single-valued. Same polymorphism story.
|
|
85
|
+
- Single-valued PATCHes carry `If-Match: *`, so a wrong source id can't create
|
|
86
|
+
a record. Multi-target results are reported per target.
|
|
87
|
+
|
|
88
|
+
### ⚡ Execute group
|
|
89
|
+
|
|
90
|
+
- **Execute Action** — OOB action invocation via bound
|
|
91
|
+
`POST /<set>(<id>)/Microsoft.Dynamics.CRM.<Action>`, collection-bound, OR
|
|
92
|
+
unbound `POST /<Action>`. CSDL-driven parameter form with type-aware
|
|
93
|
+
controls: required-first UX, Form ↔ JSON toggle, EntityReference (existing
|
|
94
|
+
record) or EntitySpecific (existing record or new instance) /
|
|
95
|
+
EntityCollection / Edm primitives / collections / Enum / OptionSet
|
|
96
|
+
enrichment.
|
|
97
|
+
- **Execute Custom API** / **Execute Custom Action** — the same composer,
|
|
98
|
+
listing every Custom API and every custom process action, Microsoft's own
|
|
99
|
+
included. Classification comes from Dataverse data (`customapi`,
|
|
100
|
+
`workflow` + `sdkmessage`); the name is only a fallback when those lookups
|
|
101
|
+
fail.
|
|
102
|
+
- **Execute Function** — OData function calls with parameter aliasing
|
|
103
|
+
(`?@p1=...`) vs inline literals, valid OData literals and escaping, run from
|
|
104
|
+
the built URL.
|
|
105
|
+
- **Execute Workflow** — runs on-demand workflows via
|
|
106
|
+
`POST /workflows(<id>)/Microsoft.Dynamics.CRM.ExecuteWorkflow` with the
|
|
107
|
+
bound record id, showing the workflow's declared input arguments.
|
|
108
|
+
|
|
109
|
+
### 🧺 Batch group
|
|
110
|
+
|
|
111
|
+
- **`$batch` Request** — compose a `$batch` from groups of requests: change
|
|
112
|
+
sets (atomic, with `$n` Content-ID references) or independent requests, with
|
|
113
|
+
continue-on-error. Add the last request of a read, write, relate or execute
|
|
114
|
+
mode; per-part results with
|
|
115
|
+
status and body. A batch that mixes change sets and independent requests
|
|
116
|
+
is sent as consecutive ToolBox calls. Needs PPTB 1.2.7+.
|
|
117
|
+
- **ExecuteMultiple** — the ExecuteMultiple pattern (independent requests,
|
|
118
|
+
continue-on-error, return responses) on the `$batch` engine, with SDK
|
|
119
|
+
`ExecuteMultipleRequest` (C#), raw `$batch` and PPTB code. Needs PPTB
|
|
120
|
+
1.2.7+.
|
|
121
|
+
|
|
122
|
+
### 💾 Binary group
|
|
123
|
+
|
|
124
|
+
- **Manage File Data** — File-column upload / download / delete with three
|
|
125
|
+
upload paths (single-request PATCH, chunked PATCH with session token,
|
|
126
|
+
`InitializeFileBlocksUpload` / `UploadBlock` / `CommitFileBlocksUpload`
|
|
127
|
+
messages), four download paths (single GET `/$value`, ranged GET with
|
|
128
|
+
`Range`, message-based block download, `GetFileSasUrl` function), and the
|
|
129
|
+
`DeleteFile` message + DELETE-on-property alternatives.
|
|
130
|
+
- **Manage Image Data** — Image columns with thumbnail vs full-size
|
|
131
|
+
download (`?size=full`), `CanStoreFullImage` awareness, and pointers to
|
|
132
|
+
the file-column path for full-size uploads.
|
|
133
|
+
- **Manage Attachment / Note** — `activitymimeattachment.body` and
|
|
134
|
+
`annotation.documentbody`. Inline base 64 OR
|
|
135
|
+
`Initialize{Attachment|Annotation}BlocksUpload` /
|
|
136
|
+
`Commit{Attachment|Annotation}BlocksUpload` messages. Single-request
|
|
137
|
+
GET `/$value` OR `Initialize{...}BlocksDownload` / `DownloadBlock` for
|
|
138
|
+
download.
|
|
139
|
+
|
|
140
|
+
> The binary modes compose the request pipeline and its code, but the PPTB
|
|
141
|
+
> Dataverse API doesn't expose these chunked operations, so **Execute returns
|
|
142
|
+
> `501 Not Implemented`** in this group. Run the generated code from the Code
|
|
143
|
+
> tab instead.
|
|
144
|
+
|
|
145
|
+
### 🔍 Cross-cutting capabilities
|
|
146
|
+
|
|
147
|
+
- **Live metadata** — Tables, columns, relationships, alternate keys, action
|
|
148
|
+
/ function CSDL all fetched lazily from the host's `dataverseAPI`, cached per
|
|
149
|
+
org with in-flight promise dedup. Switching the PPTB connection resets the
|
|
150
|
+
prepared request and reloads metadata for the new environment.
|
|
151
|
+
- **Request headers through PPTB 1.2.7+** — Create / Update / Upsert /
|
|
152
|
+
Delete / Merge / Bulk Write headers (preconditions, `MSCRM.*` bypass, duplicate detection, impersonation) are
|
|
153
|
+
sent as additional headers after you approve them once in ToolBox. On older
|
|
154
|
+
hosts, requests that depend on a header are blocked with an explanation.
|
|
155
|
+
`Authorization` / `Cookie` headers are never sent, saved or exported.
|
|
156
|
+
- **Antipattern advisories** — Surfaces real-time guidance per the
|
|
157
|
+
[Microsoft query-antipatterns doc](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/query-antipatterns):
|
|
158
|
+
`FilteringOnCalculatedColumns`, `LargeAmountOfLogicalAttributes`, large-text
|
|
159
|
+
`contains`, leading-wildcard rewrites — all flagged inline AND aggregated
|
|
160
|
+
into an Advisory drawer in the URL bar.
|
|
161
|
+
- **Polymorphic lookup support** — Customer, Owner, and multi-target lookups
|
|
162
|
+
(`regardingobjectid`) emit the correct target-disambiguated
|
|
163
|
+
`<navName>@odata.bind` binding shape automatically.
|
|
164
|
+
- **Code generators** — Every single-request mode emits the same request as `fetch`,
|
|
165
|
+
`Xrm.WebApi` (CRUD helpers or `Xrm.WebApi.online.execute`),
|
|
166
|
+
`Xrm.WebApi.online.executeMultiple`, `XMLHttpRequest`, C# `HttpClient`,
|
|
167
|
+
PowerShell `Invoke-RestMethod`, cURL, a JSON description and an OpenAPI 3
|
|
168
|
+
document, plus a field-by-field Power Automate (Dataverse connector) sheet.
|
|
169
|
+
Multi-request pipelines render as full ordered sequences.
|
|
170
|
+
- **Saved-request library** — per-connection, versioned, up to 200 requests
|
|
171
|
+
across all modes, with auto-suggested names, rename / delete / overwrite and
|
|
172
|
+
dirty-state detection. Export / import as JSON, export as a Postman /
|
|
173
|
+
Insomnia / Bruno collection, and copy or move requests from other
|
|
174
|
+
connections. A library that can't be read is never overwritten.
|
|
175
|
+
- **Recent runs** — click a run to restore it into its mode. Each mode keeps
|
|
176
|
+
its unsaved request when you switch modes.
|
|
177
|
+
- **Results** — CSV export (formulas neutralised for spreadsheets), JSON
|
|
178
|
+
export, Copy as TSV, and response-size hints.
|
|
179
|
+
- **Accessibility** — labelled inputs, readable badges and live-region
|
|
180
|
+
announcements; render errors are contained per pane.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 🖼️ Interface overview
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
188
|
+
│ [Request Type ▼] [Group · Method] [⚙ Settings] [Theme] │
|
|
189
|
+
├──────────────────────────┬──────────────────────────────────────────────┤
|
|
190
|
+
│ │ [Builder] [Code] [Results] │
|
|
191
|
+
│ Sidebar ├──────────────────────────────────────────────┤
|
|
192
|
+
│ │ │
|
|
193
|
+
│ 📋 Target │ Active editor pane │
|
|
194
|
+
│ account │ │
|
|
195
|
+
│ 📊 $select 3 sel │ ┌────────────────────────────────────────┐ │
|
|
196
|
+
│ 🔍 $filter 2 flt │ │ (clause editor — varies per mode) │ │
|
|
197
|
+
│ 🔁 $orderby 1 sort│ │ │ │
|
|
198
|
+
│ 🔗 $expand 1 exp │ │ • Field-set editor (writes) │ │
|
|
199
|
+
│ 📃 $top │ │ • Filter tree (reads) │ │
|
|
200
|
+
│ ⚙ Prefer │ │ • Action param form (executes) │ │
|
|
201
|
+
│ 📥 Headers 1 act │ │ • Binary pipeline (file/image) │ │
|
|
202
|
+
│ │ └────────────────────────────────────────┘ │
|
|
203
|
+
│ ⏱ Recent runs │ │
|
|
204
|
+
│ 200 · 142ms · 32B │ │
|
|
205
|
+
│ 200 · 89ms │ │
|
|
206
|
+
│ │ │
|
|
207
|
+
├──────────────────────────┴──────────────────────────────────────────────┤
|
|
208
|
+
│ GET /accounts?$select=name,… 0.4 KB ⚠ 2 advisories │
|
|
209
|
+
│ [▶ Execute] │
|
|
210
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## 🚀 Getting started
|
|
216
|
+
|
|
217
|
+
### Prerequisites
|
|
218
|
+
|
|
219
|
+
- [Power Platform ToolBox](https://www.powerplatformtoolbox.com/) **1.2.0 or
|
|
220
|
+
later** (the tool declares `minAPI: 1.2.0`). **1.2.7 or later** is
|
|
221
|
+
recommended: it sends the write modes' request headers and is required for
|
|
222
|
+
the `$batch` and ExecuteMultiple modes.
|
|
223
|
+
- A connection to a Dataverse environment
|
|
224
|
+
- For local development: **Node.js 22.22.2+, 24.15+ or 26+** and **npm** (see
|
|
225
|
+
`engines` in `package.json`)
|
|
226
|
+
|
|
227
|
+
### Installation
|
|
228
|
+
|
|
229
|
+
Dataverse Request Studio is available as a tool in Power Platform ToolBox.
|
|
230
|
+
Install it from the tool gallery or load it as a custom tool. Prereleases are
|
|
231
|
+
published to npm under the `beta` tag (for example `1.4.0-beta.1`) and use the
|
|
232
|
+
gold Insider icon.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## 🛠️ Development
|
|
237
|
+
|
|
238
|
+
### Setup
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
git clone https://github.com/mohsinonxrm/pptb-mxrm-dataverse-request-studio.git
|
|
242
|
+
cd pptb-mxrm-dataverse-request-studio
|
|
243
|
+
npm install
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Common scripts
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
# Vite dev server (standalone, no PPTB host)
|
|
250
|
+
npm run dev
|
|
251
|
+
|
|
252
|
+
# TypeScript-only check (fast)
|
|
253
|
+
npm run typecheck
|
|
254
|
+
|
|
255
|
+
# Unit tests (Vitest)
|
|
256
|
+
npm test
|
|
257
|
+
|
|
258
|
+
# Production build
|
|
259
|
+
npm run build
|
|
260
|
+
|
|
261
|
+
# Bundle size report
|
|
262
|
+
npm run build:analyze
|
|
263
|
+
|
|
264
|
+
# Preview the production build locally
|
|
265
|
+
npm run preview
|
|
266
|
+
|
|
267
|
+
# Validate manifest against PPTB registry rules
|
|
268
|
+
npm run validate
|
|
269
|
+
|
|
270
|
+
# Pre-publish: validate → build
|
|
271
|
+
npm run finalize-package
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Standalone vs PPTB-embedded
|
|
275
|
+
|
|
276
|
+
DRS runs in two modes:
|
|
277
|
+
|
|
278
|
+
- **Standalone** (`npm run dev`) — opens in a regular browser tab. Useful
|
|
279
|
+
for UI iteration only: without the host bridge no live metadata loads, and
|
|
280
|
+
Execute returns `501 Not Implemented` ("Running standalone: Execute needs
|
|
281
|
+
the PPTB host"); the Bulk modes report it as an error result.
|
|
282
|
+
- **Embedded in PPTB** — loads inside the PPTB iframe. The host injects
|
|
283
|
+
`window.dataverseAPI` (typed) and `window.toolboxAPI`. Execute runs
|
|
284
|
+
against the active Dataverse connection.
|
|
285
|
+
|
|
286
|
+
See [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for branch conventions,
|
|
287
|
+
commit style, code style, and PR guidance.
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## 📦 Tech stack
|
|
292
|
+
|
|
293
|
+
| Technology | Version | Purpose |
|
|
294
|
+
|---|---|---|
|
|
295
|
+
| **React** | 18.3 | UI framework |
|
|
296
|
+
| **TypeScript** | 5.9 | Strict mode, discriminated unions |
|
|
297
|
+
| **Vite** | 7 | Build tooling + HMR |
|
|
298
|
+
| **Fluent UI v9** | 9.73 | Microsoft design system (Combobox, DataGrid, Tree, Drawer, Tabs, etc.) |
|
|
299
|
+
| **Monaco Editor** | 0.54 | JSON / code editor for body authoring and Code tab |
|
|
300
|
+
| **@fluentui-contrib/react-data-grid-react-window** | 1.4 | Virtualized results grid |
|
|
301
|
+
| **@dnd-kit** | 6.3 | Drag-reordering for filter / orderby / select clauses |
|
|
302
|
+
| **@pptb/types** | 1.2.7 | Power Platform ToolBox host API types |
|
|
303
|
+
| **Vitest** | 5 | Unit tests (request engine, code generators, storage) |
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## 📁 Project layout
|
|
308
|
+
|
|
309
|
+
```
|
|
310
|
+
src/
|
|
311
|
+
App.tsx — root, ThemedApp, Frame, mode router
|
|
312
|
+
main.tsx — Vite entry point
|
|
313
|
+
|
|
314
|
+
modes/ — request-mode components (23 modes)
|
|
315
|
+
RetrieveMultipleMode.tsx
|
|
316
|
+
RetrieveSingleMode.tsx
|
|
317
|
+
RetrieveNextLinkMode.tsx
|
|
318
|
+
PredefinedQueryMode.tsx
|
|
319
|
+
CreateMode.tsx / UpdateMode.tsx / UpsertMode.tsx / DeleteMode.tsx
|
|
320
|
+
MergeMode.tsx
|
|
321
|
+
AssociateMode.tsx / DisassociateMode.tsx
|
|
322
|
+
ExecuteActionMode.tsx — Execute Action / Custom API / Custom Action
|
|
323
|
+
ExecuteFunctionMode.tsx / ExecuteWorkflowMode.tsx
|
|
324
|
+
ManageFileMode.tsx / ManageImageMode.tsx / ManageAttachmentMode.tsx
|
|
325
|
+
BulkWriteMode.tsx / BulkDeleteMode.tsx
|
|
326
|
+
BatchMode.tsx + batch/ — $batch Request and ExecuteMultiple
|
|
327
|
+
StubMode.tsx — fallback for an unknown mode id
|
|
328
|
+
|
|
329
|
+
editors/ — clause editors shared across modes
|
|
330
|
+
filter/ — FilterEditor + value inputs + operator catalog
|
|
331
|
+
expand/ — $expand tree navigation
|
|
332
|
+
FieldSetEditor.tsx — metadata-driven write-side form
|
|
333
|
+
SelectEditor.tsx, OrderbyEditor.tsx, ExpandEditor.tsx, ApplyEditor.tsx
|
|
334
|
+
ActionParamForm.tsx — CSDL-driven action / function params
|
|
335
|
+
BinarySourceCard.tsx, BinaryPipelineCard.tsx, BinaryColumnPickers.tsx
|
|
336
|
+
HeadersEditor.tsx, BypassEditor.tsx, PreconditionEditor.tsx
|
|
337
|
+
ActionPicker.tsx, NavPropertyPicker.tsx, PasteODataDialog.tsx
|
|
338
|
+
...
|
|
339
|
+
|
|
340
|
+
engine/ — URL / body construction + code generation
|
|
341
|
+
urlBuilder.ts — central URL builder for every mode
|
|
342
|
+
executeBuilders.ts — action / function / workflow body builders
|
|
343
|
+
binaryBuilders.ts — file / image / attachment pipelines
|
|
344
|
+
codeGenerators.ts — fetch, Xrm.WebApi (+ executeMultiple), XHR,
|
|
345
|
+
Power Automate, C#, PowerShell, cURL, JSON
|
|
346
|
+
openApiGenerator.ts — OpenAPI 3 document for the current request
|
|
347
|
+
collectionFormats.ts, savedToCollection.ts
|
|
348
|
+
— Postman / Insomnia / Bruno collection export
|
|
349
|
+
bulkWrite*.ts, bulkDelete*.ts, batch/
|
|
350
|
+
— Bulk Write, Bulk Delete Job, $batch engine
|
|
351
|
+
sensitiveHeaders.ts — credential / impersonation header policy
|
|
352
|
+
runtime.ts — single dispatch point for execute
|
|
353
|
+
dataverseExecutor.ts — live executor over the host's dataverseAPI
|
|
354
|
+
odataParser.ts — round-trips OData URL strings ↔ state
|
|
355
|
+
antipatterns.tsx, bypassAdvisories.tsx, hostHeaderAdvisories.tsx
|
|
356
|
+
— advisory detectors
|
|
357
|
+
|
|
358
|
+
host/ — PPTB bridge + metadata loaders
|
|
359
|
+
pptbBridge.ts — typed wrapper over window.dataverseAPI
|
|
360
|
+
metadataProvider.ts — entity / attribute / relationship loaders
|
|
361
|
+
csdlProvider.ts — $metadata XML parsing + action / function index
|
|
362
|
+
cache.ts — singleton TTL cache with in-flight dedup
|
|
363
|
+
useLiveMetadata.ts, useColumnDetail.ts, useScopedEntities.ts, …
|
|
364
|
+
|
|
365
|
+
primitives/ — small reusable UI bits
|
|
366
|
+
ClauseTreeItem.tsx, SectionHeader.tsx, ModeCard.tsx, RequestTypePicker.tsx
|
|
367
|
+
StatusPill.tsx, MethodPill.tsx, AdvisoryDrawer.tsx, advisories.ts
|
|
368
|
+
NavPathColumnPicker.tsx — N:1 drill-down column picker for filter / apply
|
|
369
|
+
RecordPicker.tsx, KvGrid.tsx, Sortable.tsx, SegmentedToggle.tsx, …
|
|
370
|
+
|
|
371
|
+
shell/ — header / sidebar / URL bar / tabs / drawers
|
|
372
|
+
FrameHeader.tsx, ModeShell.tsx, Sidebar.tsx
|
|
373
|
+
UrlBar.tsx, UrlTokens.tsx, MainTabs.tsx, SettingsDrawer.tsx
|
|
374
|
+
|
|
375
|
+
state/ — per-mode state shapes + persistence
|
|
376
|
+
readState.ts, writeState.ts, relateState.ts, executeState.ts, binaryState.ts
|
|
377
|
+
savedRequests.ts — localStorage persistence (per-org scope)
|
|
378
|
+
useSavedRequests.tsx — shared saved-request store
|
|
379
|
+
modeDrafts.ts — unsaved request per mode (this session)
|
|
380
|
+
SaveContext.tsx — cross-mode save/load context
|
|
381
|
+
validateRequest.tsx — pre-execute request validation
|
|
382
|
+
displaySettings.ts — display preferences
|
|
383
|
+
|
|
384
|
+
registry/ — request-type catalogue
|
|
385
|
+
requestTypes.ts — 23 request types grouped into 7 groups
|
|
386
|
+
|
|
387
|
+
views/ — output panes
|
|
388
|
+
CodeView.tsx — Code tab: one sub-tab per code format
|
|
389
|
+
PowerAutomatePane.tsx — Power Automate field-by-field sheet
|
|
390
|
+
ResultsView.tsx — tabs (Detail/Grid/JSON/Headers) + error state
|
|
391
|
+
results/ — grid + cell renderers + flattening
|
|
392
|
+
detail/ — record detail card
|
|
393
|
+
|
|
394
|
+
theme/ — Fluent theme + studio-owned brand vars
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
## 📋 Web API coverage
|
|
400
|
+
|
|
401
|
+
✅ = compose + Execute in PPTB · ✅ 1.2.7+ = Execute needs PPTB 1.2.7 or
|
|
402
|
+
later · 📝 = compose + Code tab only (not available through the PPTB
|
|
403
|
+
Dataverse API)
|
|
404
|
+
|
|
405
|
+
| Operation | Status |
|
|
406
|
+
|---|---|
|
|
407
|
+
| Retrieve Multiple (full OData) | ✅ |
|
|
408
|
+
| Retrieve Single (by GUID) | ✅ |
|
|
409
|
+
| `@odata.nextLink` paging, Retrieve all | ✅ |
|
|
410
|
+
| Predefined / user queries (incl. over related records) | ✅ |
|
|
411
|
+
| `$apply` (groupby / aggregate) | ✅ |
|
|
412
|
+
| Lambda filter (`any` / `all`) | ✅ |
|
|
413
|
+
| `$expand` (single + collection, nested) | ✅ |
|
|
414
|
+
| Polymorphic lookups (Customer, Owner, regardingobjectid) | ✅ |
|
|
415
|
+
| Create / Update / Upsert / Delete | ✅ |
|
|
416
|
+
| `Prefer: return=representation` | ✅ (ToolBox always sends it on writes) |
|
|
417
|
+
| Optimistic concurrency (`If-Match` / `If-None-Match`) | ✅ 1.2.7+ |
|
|
418
|
+
| `MSCRM.*` bypass family (custom plug-ins, flows, async) | ✅ 1.2.7+ |
|
|
419
|
+
| Single-property PUT / DELETE | 📝 |
|
|
420
|
+
| Alternate-key upsert | 📝 |
|
|
421
|
+
| Associate / Disassociate (collection + single-valued) | ✅ |
|
|
422
|
+
| Merge (account / contact / lead / incident) | ✅ |
|
|
423
|
+
| Execute Action (OOB / Custom API / Custom Action) | ✅ |
|
|
424
|
+
| Execute Function | ✅ |
|
|
425
|
+
| Execute Workflow | ✅ |
|
|
426
|
+
| `CreateMultiple` / `UpdateMultiple` / `UpsertMultiple` / `DeleteMultiple` | ✅ |
|
|
427
|
+
| `BulkDelete` async job | ✅ |
|
|
428
|
+
| `$batch` (change sets + independent requests) | ✅ 1.2.7+ |
|
|
429
|
+
| `ExecuteMultiple` pattern | ✅ 1.2.7+ |
|
|
430
|
+
| File column (upload / download / delete) | 📝 |
|
|
431
|
+
| Image column (thumbnail / full-size) | 📝 |
|
|
432
|
+
| Attachment / Note (inline + message-based) | 📝 |
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## 🤝 Contributing
|
|
437
|
+
|
|
438
|
+
See [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for branch conventions,
|
|
439
|
+
commit style, code style, repo layout, and PR guidance.
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
## 📋 Roadmap
|
|
444
|
+
|
|
445
|
+
Planned work is tracked in the repository's
|
|
446
|
+
[milestones](https://github.com/mohsinonxrm/pptb-mxrm-dataverse-request-studio/milestones)
|
|
447
|
+
and [issues](https://github.com/mohsinonxrm/pptb-mxrm-dataverse-request-studio/issues).
|
|
448
|
+
Ideas under consideration include:
|
|
449
|
+
|
|
450
|
+
- Request variables (`{{var}}`) and persistent request history
|
|
451
|
+
- FetchXML and Dataverse Search API modes
|
|
452
|
+
- A metadata browser mode
|
|
453
|
+
- Comparing responses across runs or environments
|
|
454
|
+
- Importing Postman / Insomnia collections and cURL commands
|
|
455
|
+
- More code-generation targets (C# ServiceClient / IOrganizationService,
|
|
456
|
+
Python, the PowerShell Dataverse module)
|
|
457
|
+
|
|
458
|
+
---
|
|
459
|
+
|
|
460
|
+
## 📄 License
|
|
461
|
+
|
|
462
|
+
Licensed under the **GNU Affero General Public License v3.0** (AGPL-3.0-only).
|
|
463
|
+
See [LICENSE](LICENSE) for details.
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
## 🙏 Acknowledgments
|
|
468
|
+
|
|
469
|
+
- [Dataverse REST Builder](https://github.com/GuidoPreite/DRB) - Original inspiration.
|
|
470
|
+
- [Power Platform ToolBox](https://www.powerplatformtoolbox.com/) — host
|
|
471
|
+
platform for the desktop / web app where DRS runs.
|
|
472
|
+
- [FetchXML Studio](https://github.com/mohsinonxrm/pptb-mxrm-fetchxml-studio) — sibling tool that pioneered many of the patterns
|
|
473
|
+
reused here (metadata cache, scope settings, results grid).
|
|
474
|
+
- [Fluent UI](https://react.fluentui.dev/) — UI component library.
|
|
475
|
+
- [Monaco Editor](https://microsoft.github.io/monaco-editor/) — VS Code's editor core.
|
|
476
|
+
|
|
477
|
+
---
|
|
478
|
+
|
|
479
|
+
Built with ❤️ for the Power Platform community.
|