@shko.online/dataverse-odata 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.babelrc.js +160 -160
  2. package/.releaserc.yaml +23 -0
  3. package/CHANGELOG.md +6 -0
  4. package/README.md +3 -0
  5. package/jest.config.ts +12 -12
  6. package/lib/cjs/getExpandFromParser.js +3 -3
  7. package/lib/cjs/getFetchXmlFromParser.js +3 -3
  8. package/lib/cjs/getSelectFromParser.js +3 -3
  9. package/lib/cjs/getTopFromParser.js +3 -3
  10. package/lib/cjs/parseOData.js +5 -0
  11. package/lib/esm/getExpandFromParser.js +3 -3
  12. package/lib/esm/getFetchXmlFromParser.js +3 -3
  13. package/lib/esm/getSelectFromParser.js +3 -3
  14. package/lib/esm/getTopFromParser.js +3 -3
  15. package/lib/esm/parseOData.js +6 -0
  16. package/lib/getExpandFromParser.d.ts +6 -6
  17. package/lib/getExpandFromParser.js +96 -96
  18. package/lib/getFetchXmlFromParser.d.ts +6 -6
  19. package/lib/getFetchXmlFromParser.js +40 -40
  20. package/lib/getSelectFromParser.d.ts +6 -6
  21. package/lib/getSelectFromParser.js +11 -11
  22. package/lib/getTopFromParser.d.ts +6 -6
  23. package/lib/getTopFromParser.js +26 -26
  24. package/lib/index.d.ts +4 -4
  25. package/lib/index.js +3 -3
  26. package/lib/modern/getExpandFromParser.js +3 -3
  27. package/lib/modern/getFetchXmlFromParser.js +3 -3
  28. package/lib/modern/getSelectFromParser.js +3 -3
  29. package/lib/modern/getTopFromParser.js +3 -3
  30. package/lib/modern/parseOData.js +6 -0
  31. package/lib/parseOData.d.ts +2 -2
  32. package/lib/parseOData.js +21 -21
  33. package/lib/ts3.4/getFetchXmlFromParser.d.ts +1 -1
  34. package/lib/ts3.4/parseOData.d.ts +5 -0
  35. package/lib/ts3.9/getExpandFromParser.d.ts +6 -6
  36. package/lib/ts3.9/getExpandFromParser.d.ts.map +1 -1
  37. package/lib/ts3.9/getFetchXmlFromParser.d.ts +6 -6
  38. package/lib/ts3.9/getSelectFromParser.d.ts +6 -6
  39. package/lib/ts3.9/getTopFromParser.d.ts +6 -6
  40. package/lib/ts3.9/index.d.ts +4 -4
  41. package/lib/ts3.9/index.d.ts.map +1 -1
  42. package/lib/ts3.9/parseOData.d.ts +7 -2
  43. package/lib/ts3.9/parseOData.d.ts.map +1 -1
  44. package/package.json +13 -8
  45. package/src/OData.types.d.ts +61 -61
  46. package/src/getExpandFromParser.ts +106 -105
  47. package/src/getFetchXmlFromParser.ts +48 -48
  48. package/src/getSelectFromParser.ts +13 -13
  49. package/src/getTopFromParser.ts +27 -27
  50. package/src/index.ts +17 -16
  51. package/src/parseOData.ts +29 -23
  52. package/tests/OData-Parser.$expand.test.ts +39 -39
  53. package/tests/OData-Parser.$top.test.ts +36 -36
  54. package/tests/OData-Parser.fetchXml.test.ts +62 -62
  55. package/tests/OData-Parser.test.ts +17 -17
  56. package/tsconfig.build.json +8 -8
  57. package/tsconfig.json +35 -35
@@ -1,97 +1,97 @@
1
- import { getSelectFromParser } from './getSelectFromParser';
2
- /**
3
- * Parses the $expand query
4
- * @returns Returns true when the parse has an error
5
- */
6
- export var getExpandFromParser = function (parser, result) {
7
- var $expand = parser.get('$expand');
8
- if ($expand !== null) {
9
- result.$expand = {};
10
- if (extractExpand($expand, result)) {
11
- return true;
12
- }
13
- }
14
- return false;
15
- };
16
- var extractExpand = function (value, $expand) {
17
- var match = value.match(/^\s*(\w(\w|\d|_)*)\s*(,|\()?\s*/);
18
- if (match === null ||
19
- (match[0].length < value.length && match[3] === null) ||
20
- (match[0].length === value.length && match[3] !== undefined)) {
21
- $expand.error = {
22
- code: '0x0',
23
- message: 'invalid expand expression',
24
- };
25
- return true;
26
- }
27
- var matchSeparator = match[3];
28
- var matchLength = match[0].length;
29
- if (matchSeparator !== '(') {
30
- if ($expand.$expand !== undefined) {
31
- $expand.$expand[match[1]] = { $select: [] };
32
- }
33
- }
34
- else {
35
- var _a = getClosingBracket(value.substring(matchLength)), index = _a.index, error = _a.error;
36
- if (error) {
37
- $expand.error = {
38
- code: '0x0',
39
- message: error,
40
- };
41
- return true;
42
- }
43
- if ($expand.$expand !== undefined) {
44
- var innerExpand = {};
45
- var parser = new URLSearchParams('?' + value.substring(matchLength, matchLength + index));
46
- if (getSelectFromParser(parser, innerExpand)) {
47
- $expand.error = innerExpand.error;
48
- return true;
49
- }
50
- if (getExpandFromParser(parser, innerExpand)) {
51
- $expand.error = innerExpand.error;
52
- return true;
53
- }
54
- if (innerExpand.$expand === undefined && innerExpand.$select === undefined) {
55
- $expand.error = { code: '0x0', message: 'Empty expand' };
56
- return true;
57
- }
58
- $expand.$expand[match[1]] = innerExpand;
59
- }
60
- matchLength = matchLength + index;
61
- var secondMatch = value.substring(matchLength + 1).match(/\s*(,?)\s*d/);
62
- if (secondMatch !== null) {
63
- matchLength = matchLength + secondMatch[0].length;
64
- if (secondMatch[1] !== null) {
65
- matchSeparator = ',';
66
- }
67
- }
68
- }
69
- if (matchSeparator === ',') {
70
- if (extractExpand(value.substring(matchLength), $expand)) {
71
- return true;
72
- }
73
- }
74
- return false;
75
- };
76
- var getClosingBracket = function (value) {
77
- var depth = 1;
78
- var startAt = 0;
79
- while (depth > 0) {
80
- var match = value.substring(startAt).match(/\(|\)/);
81
- if (match === null) {
82
- return { error: 'no closing bracket found', index: -1 };
83
- }
84
- if (match[0] === ')') {
85
- depth -= 1;
86
- if (depth === 0) {
87
- return { index: match.index || 0 };
88
- }
89
- }
90
- else {
91
- depth += 1;
92
- }
93
- startAt = (match.index || 0) + 1;
94
- }
95
- return { error: 'no closing bracket found', index: -1 };
96
- };
1
+ import { getSelectFromParser } from './getSelectFromParser';
2
+ /**
3
+ * Parses the $expand query
4
+ * @returns Returns true when the parse has an error
5
+ */
6
+ export var getExpandFromParser = function (parser, result) {
7
+ var $expand = parser.get('$expand');
8
+ if ($expand !== null) {
9
+ result.$expand = {};
10
+ if (extractExpand($expand, result)) {
11
+ return true;
12
+ }
13
+ }
14
+ return false;
15
+ };
16
+ var extractExpand = function (value, $expand) {
17
+ var match = value.match(/^\s*(\w(\w|\d|_)*)\s*(,|\()?\s*/);
18
+ if (match === null ||
19
+ (match[0].length < value.length && match[3] === null) ||
20
+ (match[0].length === value.length && match[3] !== undefined)) {
21
+ $expand.error = {
22
+ code: '0x0',
23
+ message: 'invalid expand expression',
24
+ };
25
+ return true;
26
+ }
27
+ var matchSeparator = match[3];
28
+ var matchLength = match[0].length;
29
+ if (matchSeparator !== '(') {
30
+ if ($expand.$expand !== undefined) {
31
+ $expand.$expand[match[1]] = { $select: [] };
32
+ }
33
+ }
34
+ else {
35
+ var _a = getClosingBracket(value.substring(matchLength)), index = _a.index, error = _a.error;
36
+ if (error) {
37
+ $expand.error = {
38
+ code: '0x0',
39
+ message: error,
40
+ };
41
+ return true;
42
+ }
43
+ if ($expand.$expand !== undefined) {
44
+ var innerExpand = {};
45
+ var parser = new URLSearchParams('?' + value.substring(matchLength, matchLength + index));
46
+ if (getSelectFromParser(parser, innerExpand)) {
47
+ $expand.error = innerExpand.error;
48
+ return true;
49
+ }
50
+ if (getExpandFromParser(parser, innerExpand)) {
51
+ $expand.error = innerExpand.error;
52
+ return true;
53
+ }
54
+ if (innerExpand.$expand === undefined && innerExpand.$select === undefined) {
55
+ $expand.error = { code: '0x0', message: 'Empty expand' };
56
+ return true;
57
+ }
58
+ $expand.$expand[match[1]] = innerExpand;
59
+ }
60
+ matchLength = matchLength + index;
61
+ var secondMatch = value.substring(matchLength + 1).match(/\s*(,?)\s*d/);
62
+ if (secondMatch !== null) {
63
+ matchLength = matchLength + secondMatch[0].length;
64
+ if (secondMatch[1] !== null) {
65
+ matchSeparator = ',';
66
+ }
67
+ }
68
+ }
69
+ if (matchSeparator === ',') {
70
+ if (extractExpand(value.substring(matchLength), $expand)) {
71
+ return true;
72
+ }
73
+ }
74
+ return false;
75
+ };
76
+ var getClosingBracket = function (value) {
77
+ var depth = 1;
78
+ var startAt = 0;
79
+ while (depth > 0) {
80
+ var match = value.substring(startAt).match(/\(|\)/);
81
+ if (match === null) {
82
+ return { error: 'no closing bracket found', index: -1 };
83
+ }
84
+ if (match[0] === ')') {
85
+ depth -= 1;
86
+ if (depth === 0) {
87
+ return { index: match.index || 0 };
88
+ }
89
+ }
90
+ else {
91
+ depth += 1;
92
+ }
93
+ startAt = (match.index || 0) + 1;
94
+ }
95
+ return { error: 'no closing bracket found', index: -1 };
96
+ };
97
97
  //# sourceMappingURL=getExpandFromParser.js.map
@@ -1,7 +1,7 @@
1
- import type { ODataQuery } from './OData.types';
2
- /**
3
- * Parses the $fetchXml query
4
- * @returns Returns true when the parse has an error
5
- */
6
- export declare const getFetchXmlFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the $fetchXml query
4
+ * @returns Returns true when the parse has an error
5
+ */
6
+ export declare const getFetchXmlFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
7
  //# sourceMappingURL=getFetchXmlFromParser.d.ts.map
@@ -1,41 +1,41 @@
1
- /**
2
- * Parses the $fetchXml query
3
- * @returns Returns true when the parse has an error
4
- */
5
- export var getFetchXmlFromParser = function (parser, result) {
6
- var fetchXml = parser.get('fetchXml');
7
- if (fetchXml !== null) {
8
- var serializer = new DOMParser();
9
- var fetchXmlDocument = serializer.parseFromString(fetchXml, 'text/xml');
10
- if (fetchXmlDocument.documentElement.tagName === 'parsererror') {
11
- result.error = {
12
- code: '0x80040201',
13
- message: 'Invalid XML.',
14
- };
15
- return true;
16
- }
17
- var entity = fetchXmlDocument
18
- .evaluate('fetch/entity', fetchXmlDocument, null, XPathResult.ANY_TYPE, null)
19
- .iterateNext();
20
- if (fetchXmlDocument.documentElement.children.length != 1 || !entity || !entity.getAttribute('name')) {
21
- result.error = {
22
- code: '0x80041102',
23
- message: 'Entity Name was not specified in FetchXml String.',
24
- };
25
- return true;
26
- }
27
- var invalidAttribute = fetchXmlDocument
28
- .evaluate('fetch/entity/*[not(self::filter or self::order or self::link-entity or self::attribute or self::all-attributes or self::no-attrs)]', fetchXmlDocument, null, XPathResult.ANY_TYPE, null)
29
- .iterateNext();
30
- if (invalidAttribute) {
31
- result.error = {
32
- code: '0x8004111c',
33
- message: "Invalid Child Node, valid nodes are filter, order, link-entity, attribute, all-attributes, no-attrs. NodeName = ".concat(invalidAttribute.tagName, " NodeXml = ").concat(invalidAttribute.outerHTML),
34
- };
35
- return true;
36
- }
37
- result.fetchXml = fetchXmlDocument;
38
- }
39
- return false;
40
- };
1
+ /**
2
+ * Parses the $fetchXml query
3
+ * @returns Returns true when the parse has an error
4
+ */
5
+ export var getFetchXmlFromParser = function (parser, result) {
6
+ var fetchXml = parser.get('fetchXml');
7
+ if (fetchXml !== null) {
8
+ var serializer = new DOMParser();
9
+ var fetchXmlDocument = serializer.parseFromString(fetchXml, 'text/xml');
10
+ if (fetchXmlDocument.documentElement.tagName === 'parsererror') {
11
+ result.error = {
12
+ code: '0x80040201',
13
+ message: 'Invalid XML.',
14
+ };
15
+ return true;
16
+ }
17
+ var entity = fetchXmlDocument
18
+ .evaluate('fetch/entity', fetchXmlDocument, null, XPathResult.ANY_TYPE, null)
19
+ .iterateNext();
20
+ if (fetchXmlDocument.documentElement.children.length != 1 || !entity || !entity.getAttribute('name')) {
21
+ result.error = {
22
+ code: '0x80041102',
23
+ message: 'Entity Name was not specified in FetchXml String.',
24
+ };
25
+ return true;
26
+ }
27
+ var invalidAttribute = fetchXmlDocument
28
+ .evaluate('fetch/entity/*[not(self::filter or self::order or self::link-entity or self::attribute or self::all-attributes or self::no-attrs)]', fetchXmlDocument, null, XPathResult.ANY_TYPE, null)
29
+ .iterateNext();
30
+ if (invalidAttribute) {
31
+ result.error = {
32
+ code: '0x8004111c',
33
+ message: "Invalid Child Node, valid nodes are filter, order, link-entity, attribute, all-attributes, no-attrs. NodeName = ".concat(invalidAttribute.tagName, " NodeXml = ").concat(invalidAttribute.outerHTML),
34
+ };
35
+ return true;
36
+ }
37
+ result.fetchXml = fetchXmlDocument;
38
+ }
39
+ return false;
40
+ };
41
41
  //# sourceMappingURL=getFetchXmlFromParser.js.map
@@ -1,7 +1,7 @@
1
- import type { ODataQuery } from './OData.types';
2
- /**
3
- * Parses the $select query
4
- * @returns Returns true when the parse has an error
5
- */
6
- export declare const getSelectFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the $select query
4
+ * @returns Returns true when the parse has an error
5
+ */
6
+ export declare const getSelectFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
7
  //# sourceMappingURL=getSelectFromParser.d.ts.map
@@ -1,12 +1,12 @@
1
- /**
2
- * Parses the $select query
3
- * @returns Returns true when the parse has an error
4
- */
5
- export var getSelectFromParser = function (parser, result) {
6
- var $select = parser.get('$select');
7
- if ($select !== null) {
8
- result.$select = $select.split(',');
9
- }
10
- return false;
11
- };
1
+ /**
2
+ * Parses the $select query
3
+ * @returns Returns true when the parse has an error
4
+ */
5
+ export var getSelectFromParser = function (parser, result) {
6
+ var $select = parser.get('$select');
7
+ if ($select !== null) {
8
+ result.$select = $select.split(',');
9
+ }
10
+ return false;
11
+ };
12
12
  //# sourceMappingURL=getSelectFromParser.js.map
@@ -1,7 +1,7 @@
1
- import type { ODataQuery } from './OData.types';
2
- /**
3
- * Parses the $top query
4
- * @returns Returns true when the parse has an error
5
- */
6
- export declare const getTopFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the $top query
4
+ * @returns Returns true when the parse has an error
5
+ */
6
+ export declare const getTopFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
7
  //# sourceMappingURL=getTopFromParser.d.ts.map
@@ -1,27 +1,27 @@
1
- /**
2
- * Parses the $top query
3
- * @returns Returns true when the parse has an error
4
- */
5
- export var getTopFromParser = function (parser, result) {
6
- var $topValue = parser.get('$top');
7
- if ($topValue !== null) {
8
- var $top = void 0;
9
- if (!$topValue.match(/^\d+$/) || ($top = parseInt($topValue)) < 0) {
10
- result.error = {
11
- code: '0x0',
12
- message: "Invalid value '".concat($topValue, "' for $top query option found. The $top query option requires a non-negative integer value."),
13
- };
14
- return true;
15
- }
16
- else if ($top === 0) {
17
- result.error = {
18
- code: '0x0',
19
- message: "Invalid value for $top query option.",
20
- };
21
- return true;
22
- }
23
- result.$top = $top;
24
- }
25
- return false;
26
- };
1
+ /**
2
+ * Parses the $top query
3
+ * @returns Returns true when the parse has an error
4
+ */
5
+ export var getTopFromParser = function (parser, result) {
6
+ var $topValue = parser.get('$top');
7
+ if ($topValue !== null) {
8
+ var $top = void 0;
9
+ if (!$topValue.match(/^\d+$/) || ($top = parseInt($topValue)) < 0) {
10
+ result.error = {
11
+ code: '0x0',
12
+ message: "Invalid value '".concat($topValue, "' for $top query option found. The $top query option requires a non-negative integer value."),
13
+ };
14
+ return true;
15
+ }
16
+ else if ($top === 0) {
17
+ result.error = {
18
+ code: '0x0',
19
+ message: "Invalid value for $top query option.",
20
+ };
21
+ return true;
22
+ }
23
+ result.$top = $top;
24
+ }
25
+ return false;
26
+ };
27
27
  //# sourceMappingURL=getTopFromParser.js.map
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export type { BinaryOperator, ODataError, ODataExpand, ODataExpandQuery, ODataFetch, ODataFilter, ODataQuery, ODataSelect, ODataTop, StandardOperator, StandardOperators, } from './OData.types';
2
- export { parseOData } from './parseOData';
3
- import { parseOData } from './parseOData';
4
- export default parseOData;
1
+ export type { BinaryOperator, ODataError, ODataExpand, ODataExpandQuery, ODataFetch, ODataFilter, ODataQuery, ODataSelect, ODataTop, StandardOperator, StandardOperators, } from './OData.types';
2
+ export { parseOData } from './parseOData';
3
+ import { parseOData } from './parseOData';
4
+ export default parseOData;
5
5
  //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { parseOData } from './parseOData';
2
- import { parseOData } from './parseOData';
3
- export default parseOData;
1
+ export { parseOData } from './parseOData';
2
+ import { parseOData } from './parseOData';
3
+ export default parseOData;
4
4
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,8 @@
1
1
  import { getSelectFromParser } from './getSelectFromParser';
2
2
 
3
- /**
4
- * Parses the $expand query
5
- * @returns Returns true when the parse has an error
3
+ /**
4
+ * Parses the $expand query
5
+ * @returns Returns true when the parse has an error
6
6
  */
7
7
  export const getExpandFromParser = (parser, result) => {
8
8
  const $expand = parser.get('$expand');
@@ -1,6 +1,6 @@
1
- /**
2
- * Parses the $fetchXml query
3
- * @returns Returns true when the parse has an error
1
+ /**
2
+ * Parses the fetchXml query
3
+ * @returns Returns true when the parse has an error
4
4
  */
5
5
  export const getFetchXmlFromParser = (parser, result) => {
6
6
  const fetchXml = parser.get('fetchXml');
@@ -1,6 +1,6 @@
1
- /**
2
- * Parses the $select query
3
- * @returns Returns true when the parse has an error
1
+ /**
2
+ * Parses the $select query
3
+ * @returns Returns true when the parse has an error
4
4
  */
5
5
  export const getSelectFromParser = (parser, result) => {
6
6
  const $select = parser.get('$select');
@@ -1,6 +1,6 @@
1
- /**
2
- * Parses the $top query
3
- * @returns Returns true when the parse has an error
1
+ /**
2
+ * Parses the $top query
3
+ * @returns Returns true when the parse has an error
4
4
  */
5
5
  export const getTopFromParser = (parser, result) => {
6
6
  const $topValue = parser.get('$top');
@@ -2,6 +2,12 @@ import { getTopFromParser } from './getTopFromParser';
2
2
  import { getSelectFromParser } from './getSelectFromParser';
3
3
  import { getExpandFromParser } from './getExpandFromParser';
4
4
  import { getFetchXmlFromParser } from './getFetchXmlFromParser';
5
+
6
+ /**
7
+ * parses the OData query and applies some Dataverse validations
8
+ * @param query The OData query
9
+ * @returns The parsed OData query
10
+ */
5
11
  export const parseOData = query => {
6
12
  const parser = new URLSearchParams(query);
7
13
  const result = {};
@@ -1,3 +1,3 @@
1
- import type { ODataQuery } from './OData.types';
2
- export declare const parseOData: (query: string) => ODataQuery;
1
+ import type { ODataQuery } from './OData.types';
2
+ export declare const parseOData: (query: string) => ODataQuery;
3
3
  //# sourceMappingURL=parseOData.d.ts.map
package/lib/parseOData.js CHANGED
@@ -1,22 +1,22 @@
1
- import { getTopFromParser } from './getTopFromParser';
2
- import { getSelectFromParser } from './getSelectFromParser';
3
- import { getExpandFromParser } from './getExpandFromParser';
4
- import { getFetchXmlFromParser } from './getFetchXmlFromParser';
5
- export var parseOData = function (query) {
6
- var parser = new URLSearchParams(query);
7
- var result = {};
8
- if (getExpandFromParser(parser, result)) {
9
- return result;
10
- }
11
- if (getSelectFromParser(parser, result)) {
12
- return result;
13
- }
14
- if (getTopFromParser(parser, result)) {
15
- return result;
16
- }
17
- if (getFetchXmlFromParser(parser, result)) {
18
- return result;
19
- }
20
- return result;
21
- };
1
+ import { getTopFromParser } from './getTopFromParser';
2
+ import { getSelectFromParser } from './getSelectFromParser';
3
+ import { getExpandFromParser } from './getExpandFromParser';
4
+ import { getFetchXmlFromParser } from './getFetchXmlFromParser';
5
+ export var parseOData = function (query) {
6
+ var parser = new URLSearchParams(query);
7
+ var result = {};
8
+ if (getExpandFromParser(parser, result)) {
9
+ return result;
10
+ }
11
+ if (getSelectFromParser(parser, result)) {
12
+ return result;
13
+ }
14
+ if (getTopFromParser(parser, result)) {
15
+ return result;
16
+ }
17
+ if (getFetchXmlFromParser(parser, result)) {
18
+ return result;
19
+ }
20
+ return result;
21
+ };
22
22
  //# sourceMappingURL=parseOData.js.map
@@ -1,6 +1,6 @@
1
1
  import { ODataQuery } from './OData.types';
2
2
  /**
3
- * Parses the $fetchXml query
3
+ * Parses the fetchXml query
4
4
  * @returns Returns true when the parse has an error
5
5
  */
6
6
  export declare const getFetchXmlFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
@@ -1,3 +1,8 @@
1
1
  import { ODataQuery } from './OData.types';
2
+ /**
3
+ * parses the OData query and applies some Dataverse validations
4
+ * @param query The OData query
5
+ * @returns The parsed OData query
6
+ */
2
7
  export declare const parseOData: (query: string) => ODataQuery;
3
8
  //# sourceMappingURL=parseOData.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { ODataQuery } from './OData.types';
2
- /**
3
- * Parses the $expand query
4
- * @returns Returns true when the parse has an error
5
- */
6
- export declare const getExpandFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the $expand query
4
+ * @returns Returns true when the parse has an error
5
+ */
6
+ export declare const getExpandFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
7
  //# sourceMappingURL=getExpandFromParser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getExpandFromParser.d.ts","sourceRoot":"","sources":["../../src/getExpandFromParser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA6C,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3F;;;GAGG;AACH,eAAO,MAAM,mBAAmB,WAAY,eAAe,UAAU,UAAU,KAAG,OAUjF,CAAC"}
1
+ {"version":3,"file":"getExpandFromParser.d.ts","sourceRoot":"","sources":["../../src/getExpandFromParser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA6C,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3F;;;GAGG;AACH,eAAO,MAAM,mBAAmB,WAAY,eAAe,UAAU,UAAU,KAAG,OAUjF,CAAC"}
@@ -1,7 +1,7 @@
1
- import type { ODataQuery } from './OData.types';
2
- /**
3
- * Parses the $fetchXml query
4
- * @returns Returns true when the parse has an error
5
- */
6
- export declare const getFetchXmlFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the fetchXml query
4
+ * @returns Returns true when the parse has an error
5
+ */
6
+ export declare const getFetchXmlFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
7
  //# sourceMappingURL=getFetchXmlFromParser.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { ODataQuery } from './OData.types';
2
- /**
3
- * Parses the $select query
4
- * @returns Returns true when the parse has an error
5
- */
6
- export declare const getSelectFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the $select query
4
+ * @returns Returns true when the parse has an error
5
+ */
6
+ export declare const getSelectFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
7
  //# sourceMappingURL=getSelectFromParser.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { ODataQuery } from './OData.types';
2
- /**
3
- * Parses the $top query
4
- * @returns Returns true when the parse has an error
5
- */
6
- export declare const getTopFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the $top query
4
+ * @returns Returns true when the parse has an error
5
+ */
6
+ export declare const getTopFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
7
  //# sourceMappingURL=getTopFromParser.d.ts.map
@@ -1,5 +1,5 @@
1
- export type { BinaryOperator, ODataError, ODataExpand, ODataExpandQuery, ODataFetch, ODataFilter, ODataQuery, ODataSelect, ODataTop, StandardOperator, StandardOperators, } from './OData.types';
2
- export { parseOData } from './parseOData';
3
- import { parseOData } from './parseOData';
4
- export default parseOData;
1
+ export type { BinaryOperator, ODataError, ODataExpand, ODataExpandQuery, ODataFetch, ODataFilter, ODataQuery, ODataSelect, ODataTop, StandardOperator, StandardOperators, } from './OData.types';
2
+ export { parseOData } from './parseOData';
3
+ import { parseOData } from './parseOData';
4
+ export default parseOData;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,cAAc,EACd,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,GACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,cAAc,EACd,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,GACpB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,eAAe,UAAU,CAAC"}
@@ -1,3 +1,8 @@
1
- import type { ODataQuery } from './OData.types';
2
- export declare const parseOData: (query: string) => ODataQuery;
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * parses the OData query and applies some Dataverse validations
4
+ * @param query The OData query
5
+ * @returns The parsed OData query
6
+ */
7
+ export declare const parseOData: (query: string) => ODataQuery;
3
8
  //# sourceMappingURL=parseOData.d.ts.map