Skip to content

Commit 7fca260

Browse files
adding an option to disable search api response compatibility to save memory
1 parent 17b1046 commit 7fca260

24 files changed

+800
-243
lines changed

.github/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ Both `dataApi` and `searchApi` can be omitted from a configuration. Their defaul
340340
**SearchApiOptions** properties:
341341
| Property Name | Type | Description |
342342
|--------|--------|--------|
343-
| escapeSpecialCharacters | `boolean` | **Works only with Search API 2.0**. Optional. Escapes special characters in the search string. |
343+
| escapeSpecialCharacters | `boolean` | `v2.3.0+` **Works only with Search API 2.0**. Optional. Escapes special characters in the search string. |
344+
| disableResponseCompatibility | `boolean` | `v2.3.0+`. Disables forced compatibility of the responses between v1 and v2. It's highly recommended to enable this option, because all response properties are duplicated by default for compatibility reasons. |
344345

345346
## Request Examples
346347

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

Lines changed: 63 additions & 37 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: 3 additions & 3 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: 63 additions & 37 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: 3 additions & 3 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: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,8 +983,16 @@ export interface AutocompleteRequest extends BaseRequest {
983983
query: Autocomplete;
984984
}
985985
export type SearchApiOptions = {
986-
/**Escapes the search string. Special characters that require escaping include the following: + - & | ! ( ) { } [ ] ^ " ~ * ? : \ /. */
986+
/**
987+
* Escapes the search string.
988+
* Special characters that require escaping include the following: + - & | ! ( ) { } [ ] ^ " ~ * ? : \ /.
989+
*/
987990
escapeSpecialCharacters?: boolean;
991+
/**
992+
* Disables compatibility of the responses between v1 and v2.
993+
* Enabling this option is highly recommended, because all response properties are duplicated by default for compatibility reasons.
994+
*/
995+
disableResponseCompatibility?: boolean;
988996
};
989997
export interface ApiConfig<TOptions = any> {
990998
/** API Version to use, for example: "9.2" or "1.0". */

0 commit comments

Comments
 (0)