This issue is to add the description of new features that v2 will have. It will be incorporated either into a README file or Wiki.
DynamicsWebApi v2 has been fully rewritten in TypeScript. The process of rewriting the code made it possible to refactor and improve many modules of the library and organize them in a more logical way as well as to remove redundant features that were no longer needed. As a result, DynamicsWebApi now has many new features such as:
Microsoft Dataverse Search API
v2 brings the power of Search, Suggest and Autocomplete capabilities of Microsoft Dataverse Search API.
AbortController and AbortSignal support (for Node.js 15+ and Browser)
Each request can now be aborted when it's no longer need to be completed via the AbortController.
All requests support Impersonation, NoCache and other common properties
v1 did not have full support of mentioned properties in some requests. v2 fixes that by making all request parameters implement a single BaseRequest interface.
On demand Changesets in Batch Operations
You can now control what requests should be included or excluded from the changesets. By default, all requests (except for GET) are included in a changeset, thus, it does not break the core logic introduced in v1.
CSDL $metadata document
You can now retrieve the org's CSDL $metadata document with a single call of retrieveCsdlMetadata function. The library returns the raw text and does not parse or process it in any way.
NPM Package contents
NPM package now includes a pre-bundled code of DynamicsWebApi to simplify a compilation process of the projects that depend on it. There are 2 different bundles:
dist/dynamics-web-api.js - a Browser ready version (to use as a Dynamics 365 web resource) [IIFE] + it's minified version .min.js.
dist/cjs/dynamics-web-api.js - a Node.js module [CommonJS].
dist/esm/dynamics-web-api.mjs - a Node.js module [ESM].
dist/browser/esm/dynamics-web-api.js - a ESM module for a Browser (to use as a Dynamics 365 web resource).
Type definition for the library also moved into the dist folder.
Migration
If you are currently using v1 and planning on migrating to v2 please consult with a list of [breaking changes] #135.
This issue is to add the description of new features that v2 will have. It will be incorporated either into a README file or Wiki.
DynamicsWebApi v2 has been fully rewritten in TypeScript. The process of rewriting the code made it possible to refactor and improve many modules of the library and organize them in a more logical way as well as to remove redundant features that were no longer needed. As a result, DynamicsWebApi now has many new features such as:
Microsoft Dataverse Search API
v2 brings the power of Search, Suggest and Autocomplete capabilities of Microsoft Dataverse Search API.
AbortController
andAbortSignal
support (for Node.js 15+ and Browser)Each request can now be aborted when it's no longer need to be completed via the
AbortController
.All requests support Impersonation, NoCache and other common properties
v1 did not have full support of mentioned properties in some requests. v2 fixes that by making all request parameters implement a single
BaseRequest
interface.On demand Changesets in Batch Operations
You can now control what requests should be included or excluded from the changesets. By default, all requests (except for GET) are included in a changeset, thus, it does not break the core logic introduced in v1.
CSDL $metadata document
You can now retrieve the org's CSDL $metadata document with a single call of
retrieveCsdlMetadata
function. The library returns the raw text and does not parse or process it in any way.NPM Package contents
NPM package now includes a pre-bundled code of DynamicsWebApi to simplify a compilation process of the projects that depend on it. There are 2 different bundles:
dist/dynamics-web-api.js
- a Browser ready version (to use as a Dynamics 365 web resource) [IIFE] + it's minified version.min.js
.dist/cjs/dynamics-web-api.js
- a Node.js module [CommonJS].dist/esm/dynamics-web-api.mjs
- a Node.js module [ESM].dist/browser/esm/dynamics-web-api.js
- a ESM module for a Browser (to use as a Dynamics 365 web resource).Type definition for the library also moved into the
dist
folder.Migration
If you are currently using v1 and planning on migrating to v2 please consult with a list of [breaking changes] #135.