Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moving v2.1.4 to v2 branch #170

Merged
merged 3 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,035 changes: 1,035 additions & 0 deletions .github/CHANGELOG.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .github/NEW_IN_V2.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Control what requests should be included or excluded from the changesets by sett
### CSDL $metadata document
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.

### `v2.1+` Microsoft Power Pages Support
DynamicsWebApi now can be used in Micorosoft Power Pages website.

### 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 4 separate bundles:
- `dist/dynamics-web-api.js` - a Browser ready version (to use as a Dynamics 365 web resource) + it's minified version `.min.js` [IIFE].
Expand Down
11 changes: 7 additions & 4 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ If you want to upgrade from v1 - v2 breaking changes are [here](/.github/BREAKIN

Please check [DynamicsWebApi Wiki](../../../wiki/) where you will find documentation to DynamicsWebApi API and more.

Changelog can be found [here](/.github/CHANGELOG.md).

Browser-compiled script and type definitions can be found in a v2 [dist](https://github.com/AleksandrRogov/DynamicsWebApi/tree/v2/dist) folder.

## Main Features
Expand Down Expand Up @@ -354,7 +356,7 @@ fetchXml | `string` | `fetch`, `fetchAll` | Property that sets FetchXML - a prop
fieldName | `string` | `uploadFile`, `downloadFile`, `deleteRequest` | **D365 Web API v9.1+** Use this option to specify the name of the file attribute in Dynamics 365. [More Info](https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/file-attributes)
fileName | `string` | `uploadFile` | **D365 Web API v9.1+** Specifies the name of the file
filter | String | `retrieve`, `retrieveMultiple`, `retrieveAll`, `callFunction` | Use the $filter system query option to set criteria for which entities will be returned.
functionName | `string` | `callFunction` | Name of a D365 Web Api function.
functionName | `string` | `callFunction` | **Deprecated from v2.1.3** Use `name` instead. Name of a D365 Web Api function.
headers | `Object` | All | `v2.1+` Custom headers to supply with a request. These headers will override configuraiton headers if the identical ones were set. For example: `{ "my-header": "value", "another-header": "another-value" }`.
ifmatch | `string` | `retrieve`, `update`, `upsert`, `deleteRecord` | Sets If-Match header value that enables to use conditional retrieval or optimistic concurrency in applicable requests. [More Info](https://msdn.microsoft.com/en-us/library/mt607711.aspx)
ifnonematch | `string` | `retrieve`, `upsert` | Sets If-None-Match header value that enables to use conditional retrieval in applicable requests. [More Info](https://msdn.microsoft.com/en-us/library/mt607711.aspx).
Expand All @@ -366,6 +368,7 @@ key | `string` | `retrieve`, `create`, `update`, `upsert`, `deleteRecord`, `uplo
maxPageSize | `number` | `retrieveMultiple`, `retrieveAll` | Sets the odata.maxpagesize preference value to request the number of entities returned in the response.
mergeLabels | `boolean` | `update` | **Metadata Update only!** Sets `MSCRM.MergeLabels` header that controls whether to overwrite the existing labels or merge your new label with any existing language labels. Default value is `false`. [More Info](https://msdn.microsoft.com/en-us/library/mt593078.aspx#bkmk_updateEntities)
metadataAttributeType | `string` | `retrieve`, `update` | Casts the Attributes to a specific type. (Used in requests to Attribute Metadata) [More Info](https://msdn.microsoft.com/en-us/library/mt607522.aspx#Anchor_4)
name | `string` | `callFunction` | `v2.1.3+` The name of a D365 Web API function (replaces `functionName`).
navigationProperty | `string` | `retrieve`, `create`, `update` | A string representing the name of a single-valued navigation property. Useful when needed to retrieve information about a related record in a single request.
navigationPropertyKey | `string` | `retrieve`, `create`, `update` | A string representing navigation property's Primary Key (GUID) or Alternate Key(s). (For example, to retrieve Attribute Metadata)
noCache | `boolean` | All | If set to `true`, DynamicsWebApi adds a request header `Cache-Control: no-cache`. Default value is `false`.
Expand Down Expand Up @@ -907,7 +910,7 @@ const teamId = "00000000-0000-0000-0000-000000000001";
const request: DynamicsWebApi.BoundFunctionRequest = {
id: teamId,
collection: "teams",
functionName: "Microsoft.Dynamics.CRM.RetrieveTeamPrivileges"
name: "Microsoft.Dynamics.CRM.RetrieveTeamPrivileges"
}

const result = await dynamicsWebApi.callFunction<RetrieveTeamPrivilegesResponse>(request);
Expand All @@ -929,7 +932,7 @@ const parameters = {

const request: DynamicsWebApi.UnboundFunctionRequest = {
parameters: parameters,
functionName: "GetTimeZoneCodeByLocalizedName"
name: "GetTimeZoneCodeByLocalizedName"
}

const result = await dynamicsWebApi.callFunction<GetTimeZoneCodeByLocalizedNameResponse>(request);
Expand Down Expand Up @@ -2404,7 +2407,7 @@ If you are using Node.Js with TypeScript, declarations will be fetched with an N
At the top of a necessary `.ts` file add the following:

```ts
import { DynamicsWebApi, Config } from "dynamics-web-api";
import { DynamicsWebApi, type Config } from "dynamics-web-api";
//for CommonJS:
//const DynamicsWebApi = require("dynamics-web-api");
```
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ As well as Microsoft Dynamics 365 CE (online), Microsoft Dynamics 365 CE (on-pre

Browser-compiled script and type definitions can be found in a v2 [dist](https://github.com/AleksandrRogov/DynamicsWebApi/tree/v2/dist) folder.

Changelog can be found [here](/.github/CHANGELOG.md).

**Please note!** "Dynamics 365" in this readme refers to Microsoft Dataverse (formerly known as Microsoft Common Data Service) / Microsoft Dynamics 365 Customer Engagement / Micorosft Dynamics CRM. **NOT** Microsoft Dynamics 365 Finance and Operations.

## Usage examples
Expand Down
2 changes: 1 addition & 1 deletion dist/browser/esm/dynamics-web-api.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/browser/esm/dynamics-web-api.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cjs/dynamics-web-api.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cjs/dynamics-web-api.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/dynamics-web-api.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! dynamics-web-api v2.1.3 (c) 2024 Aleksandr Rogov */
/*! dynamics-web-api v2.1.4 (c) 2024 Aleksandr Rogov */
/// <reference types="node" />
/**
* Microsoft Dynamics CRM Web API helper library written in JavaScript.
Expand Down Expand Up @@ -614,7 +614,7 @@ export interface UnboundFunctionRequest extends BaseRequest {
/**
* Name of the function.
*/
name: string;
name?: string;
/**
* Name of the function.
* @deprecated Use "name" parameter.
Expand Down
2 changes: 1 addition & 1 deletion dist/dynamics-web-api.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/dynamics-web-api.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dynamics-web-api.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/dynamics-web-api.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/dynamics-web-api.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! dynamics-web-api v2.1.3 (c) 2024 Aleksandr Rogov */
/*! dynamics-web-api v2.1.4 (c) 2024 Aleksandr Rogov */
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/dynamics-web-api.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dynamics-web-api",
"version": "2.1.3",
"version": "2.1.4",
"description": "DynamicsWebApi is a Microsoft Dynamics CRM Web API helper library",
"keywords": [
"d365",
Expand Down
2 changes: 1 addition & 1 deletion src/dynamics-web-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,7 @@ export interface UnboundFunctionRequest extends BaseRequest {
/**
* Name of the function.
*/
name: string;
name?: string;
/**
* Name of the function.
* @deprecated Use "name" parameter.
Expand Down
Loading