Skip to content

Commit 4eb2ccc

Browse files
added a tag property in a base request. closing #186
1 parent 11972b9 commit 4eb2ccc

17 files changed

+79
-34
lines changed

.github/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ returnRepresentation | `boolean` | `create`, `update`, `upsert` | Sets Prefer he
398398
savedQuery | `string` | `retrieve` | A String representing the GUID value of the saved query.
399399
select | `string[]` | `retrieve`, `retrieveMultiple`, `retrieveAll`, `update`, `upsert`, `callFunction` | An array (of Strings) representing the $select OData System Query Option to control which attributes will be returned.
400400
signal | `AbortSignal` | All | Specifies an `AbortSignal` that can be used to abort a request if required via an `AbortController` object. [More Info](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)
401+
tag | `string` | All | `v2.3.0+` Use the tag parameter to include a shared variable value that is accessible within a plug-in.
401402
timeout | `number` | All | Sets a number of milliseconds before a request times out.
402403
token | `string` | All | Authorization Token. If set, onTokenRefresh will not be called.
403404
top | `number` | `retrieveMultiple`, `retrieveAll` | Limit the number of results returned by using the $top system query option. Do not use $top with $count!

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ As well as Microsoft Dynamics 365 CE (online), Microsoft Dynamics 365 CE (on-pre
1414

1515
- **Microsoft Dataverse Search API**. Access the full power of its Search, Suggestion and Autocomplete capabilities.
1616
- **Batch Requests**. Convert all requests into a Batch operation with two lines of code.
17-
- **Simplicity and Automation**. Such as automated paging, big file downloading/uploading in chunks of data, automated conversion of requests with long URLs into a Batch Request in the background and more!
17+
- **Simplicity and Automation**. Automated paging, big file downloading/uploading in chunks of data, automated conversion of requests with long URLs into a Batch Request and more!
1818
- **CRUD operations**. Including Fetch XML, Actions and Functions in Microsoft Dataverse Web API.
1919
- **Table Definitions (Entity Metadata)**. Query and modify Table, Column, Choice (Option Set) and Relationship definitions.
2020
- **File Fields**. Upload, Download and Delete data stored in the File Fields.
2121
- **Abort Signal and Abort Controller** (Browser and Node.js 15+). Abort requests when they are no longer need to be completed.
2222
- **Node.js and a Browser** support.
2323
- **Proxy Configuration** support.
24+
- **Background Operations** support.
2425
- Works with **Microsoft Power Pages** (aka Microsoft Portal). `v2.1.0+`
2526

2627
Browser-compiled script and type definitions can be found in a v2 [dist](https://github.com/AleksandrRogov/DynamicsWebApi/tree/v2/dist) folder.
@@ -61,7 +62,7 @@ Once the web file is uploaded, it can be included in a template, a page or a for
6162

6263
With CDN, it is a bit easier: no need to create and upload a web file - just include the script in your template, page or a form:
6364
```html
64-
<script type="text/javascript" src="https://unpkg.com/dynamics-web-api@2.1.4/dist/dynamics-web-api.min.js"></script>
65+
<script type="text/javascript" src="https://unpkg.com/dynamics-web-api@2.3.0/dist/dynamics-web-api.min.js"></script>
6566
```
6667

6768
And you are good to go! DynamicsWebApi will automatically detect if the library is running on Power Pages and will supply an anti-forgery token with each request.

dist/browser/esm/dynamics-web-api.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/browser/esm/dynamics-web-api.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cjs/dynamics-web-api.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cjs/dynamics-web-api.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dynamics-web-api.d.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -450,15 +450,9 @@ export interface BaseRequest {
450450
* Important! These parameters ARE NOT URI encoded! */
451451
queryParams?: string[];
452452
/**
453-
* A callback URL when the background operation is completed.
454-
* Dataverse uses this URL to send a POST request.
453+
* Use this parameter to include a shared variable value that is accessible within a plug-in.
455454
*/
456-
backgroundOperationCallbackUrl?: string;
457-
/**
458-
* Use background operations to send requests that Dataverse processes asynchronously.
459-
* Background operations are useful when you don't want to maintain a connection while a request runs.
460-
*/
461-
respondAsync?: boolean;
455+
tag?: string;
462456
}
463457
export interface BatchRequest extends BaseRequest {
464458
/** Sets Prefer header to "odata.continue-on-error" that allows more requests be processed when errors occur. The batch request will return '200 OK' and individual response errors will be returned in the batch response body. */
@@ -702,6 +696,16 @@ export interface UnboundActionRequest<TAction = any> extends BaseRequest {
702696
actionName: string;
703697
/**An object that represents a Dynamics 365 action. */
704698
action?: TAction;
699+
/**
700+
* A callback URL when the background operation is completed.
701+
* Dataverse uses this URL to send a POST request.
702+
*/
703+
backgroundOperationCallbackUrl?: string;
704+
/**
705+
* Use background operations to send requests that Dataverse processes asynchronously.
706+
* Background operations are useful when you don't want to maintain a connection while a request runs.
707+
*/
708+
respondAsync?: boolean;
705709
}
706710
export interface BoundActionRequest<TAction = any> extends UnboundActionRequest<TAction>, Request {
707711
/**A String representing the GUID value for the record. */

dist/dynamics-web-api.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dynamics-web-api.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dynamics-web-api.min.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)