AleksandrRogov / DynamicsWebApi

DynamicsWebApi is a Microsoft Dataverse Web API helper library for JavaScript & TypeScript
MIT License
268 stars 58 forks source link

What's New in v2 #146

Closed AleksandrRogov closed 1 year ago

AleksandrRogov commented 1 year ago

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:

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.

AleksandrRogov commented 1 year ago

Moved the description to a separate .md file here.