@shko.online/dataverse-odata 0.1.4 → 0.1.6

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 (103) hide show
  1. package/.editorconfig +8 -0
  2. package/.github/workflows/publish.yml +44 -0
  3. package/.prettierrc.json +7 -7
  4. package/.releaserc.yaml +23 -23
  5. package/CHANGELOG.md +14 -0
  6. package/LICENSE +21 -0
  7. package/azure-pipelines.yml +32 -0
  8. package/lib/cjs/getAliasedProperty.js +36 -0
  9. package/lib/cjs/getExpandFromParser.js +1 -1
  10. package/lib/cjs/getFilterFromParser.js +31 -0
  11. package/lib/cjs/getOrderByFromParser.js +41 -10
  12. package/lib/cjs/index.js +1 -2
  13. package/lib/cjs/parseOData.js +2 -1
  14. package/lib/cjs/validators/atMostOnce.js +6 -6
  15. package/lib/cjs/validators/differentFromEmptyString.js +5 -5
  16. package/lib/cjs/validators/hasContent.js +6 -6
  17. package/lib/cjs/validators/isGuid.js +5 -5
  18. package/lib/cjs/validators/recognizedGuid.js +5 -5
  19. package/lib/esm/getAliasedProperty.js +29 -0
  20. package/lib/esm/getExpandFromParser.js +1 -1
  21. package/lib/esm/getFilterFromParser.js +24 -0
  22. package/lib/esm/getOrderByFromParser.js +41 -10
  23. package/lib/esm/parseOData.js +2 -1
  24. package/lib/esm/validators/atMostOnce.js +6 -6
  25. package/lib/esm/validators/differentFromEmptyString.js +5 -5
  26. package/lib/esm/validators/hasContent.js +6 -6
  27. package/lib/esm/validators/isGuid.js +5 -5
  28. package/lib/esm/validators/recognizedGuid.js +5 -5
  29. package/lib/modern/getAliasedProperty.js +29 -0
  30. package/lib/modern/getExpandFromParser.js +1 -1
  31. package/lib/modern/getFilterFromParser.js +24 -0
  32. package/lib/modern/getOrderByFromParser.js +42 -11
  33. package/lib/modern/parseOData.js +2 -1
  34. package/lib/modern/validators/atMostOnce.js +6 -6
  35. package/lib/modern/validators/differentFromEmptyString.js +5 -5
  36. package/lib/modern/validators/hasContent.js +6 -6
  37. package/lib/modern/validators/isGuid.js +5 -5
  38. package/lib/modern/validators/recognizedGuid.js +5 -5
  39. package/lib/ts3.4/OData.types.d.ts +29 -6
  40. package/lib/ts3.4/getAliasedProperty.d.ts +10 -0
  41. package/lib/ts3.4/getFilterFromParser.d.ts +7 -0
  42. package/lib/ts3.4/getXQueryFromParser.d.ts +1 -1
  43. package/lib/ts3.4/validators/atMostOnce.d.ts +1 -1
  44. package/lib/ts3.9/OData.types.d.ts +141 -154
  45. package/lib/ts3.9/getAliasedProperty.d.ts +10 -0
  46. package/lib/ts3.9/getExpandFromParser.d.ts +7 -7
  47. package/lib/ts3.9/getFetchXmlFromParser.d.ts +7 -7
  48. package/lib/ts3.9/getFilterFromParser.d.ts +7 -0
  49. package/lib/ts3.9/getOrderByFromParser.d.ts +7 -7
  50. package/lib/ts3.9/getSelectFromParser.d.ts +7 -7
  51. package/lib/ts3.9/getTopFromParser.d.ts +7 -7
  52. package/lib/ts3.9/getXQueryFromParser.d.ts +8 -8
  53. package/lib/ts3.9/index.d.ts +11 -11
  54. package/lib/ts3.9/parseOData.d.ts +8 -8
  55. package/lib/ts3.9/validators/atMostOnce.d.ts +10 -10
  56. package/lib/ts3.9/validators/differentFromEmptyString.d.ts +9 -9
  57. package/lib/ts3.9/validators/hasContent.d.ts +10 -10
  58. package/lib/ts3.9/validators/isGuid.d.ts +9 -9
  59. package/lib/ts3.9/validators/recognizedGuid.d.ts +9 -9
  60. package/lib/ts4.2/OData.types.d.ts +183 -0
  61. package/lib/ts4.2/getAliasedProperty.d.ts +10 -0
  62. package/lib/ts4.2/getAliasedProperty.d.ts.map +1 -0
  63. package/lib/ts4.2/getExpandFromParser.d.ts +7 -0
  64. package/lib/{ts3.9 → ts4.2}/getExpandFromParser.d.ts.map +1 -1
  65. package/lib/ts4.2/getFetchXmlFromParser.d.ts +7 -0
  66. package/lib/{ts3.9 → ts4.2}/getFetchXmlFromParser.d.ts.map +1 -1
  67. package/lib/ts4.2/getFilterFromParser.d.ts +7 -0
  68. package/lib/ts4.2/getFilterFromParser.d.ts.map +1 -0
  69. package/lib/ts4.2/getOrderByFromParser.d.ts +7 -0
  70. package/lib/ts4.2/getOrderByFromParser.d.ts.map +1 -0
  71. package/lib/ts4.2/getSelectFromParser.d.ts +7 -0
  72. package/lib/{ts3.9 → ts4.2}/getSelectFromParser.d.ts.map +1 -1
  73. package/lib/ts4.2/getTopFromParser.d.ts +7 -0
  74. package/lib/{ts3.9 → ts4.2}/getTopFromParser.d.ts.map +1 -1
  75. package/lib/ts4.2/getXQueryFromParser.d.ts +8 -0
  76. package/lib/{ts3.9 → ts4.2}/getXQueryFromParser.d.ts.map +1 -1
  77. package/lib/ts4.2/index.d.ts +11 -0
  78. package/lib/ts4.2/parseOData.d.ts +8 -0
  79. package/lib/{ts3.9 → ts4.2}/parseOData.d.ts.map +1 -1
  80. package/lib/ts4.2/validators/atMostOnce.d.ts +10 -0
  81. package/lib/{ts3.9 → ts4.2}/validators/atMostOnce.d.ts.map +1 -1
  82. package/lib/ts4.2/validators/differentFromEmptyString.d.ts +9 -0
  83. package/lib/{ts3.9 → ts4.2}/validators/differentFromEmptyString.d.ts.map +1 -1
  84. package/lib/ts4.2/validators/hasContent.d.ts +10 -0
  85. package/lib/{ts3.9 → ts4.2}/validators/hasContent.d.ts.map +1 -1
  86. package/lib/ts4.2/validators/isGuid.d.ts +9 -0
  87. package/lib/{ts3.9 → ts4.2}/validators/isGuid.d.ts.map +1 -1
  88. package/lib/ts4.2/validators/recognizedGuid.d.ts +9 -0
  89. package/lib/{ts3.9 → ts4.2}/validators/recognizedGuid.d.ts.map +1 -1
  90. package/package.json +20 -11
  91. package/src/OData.types.d.ts +35 -6
  92. package/src/getAliasedProperty.ts +34 -0
  93. package/src/getExpandFromParser.ts +1 -1
  94. package/src/getFilterFromParser.ts +23 -0
  95. package/src/getOrderByFromParser.ts +46 -10
  96. package/src/parseOData.ts +3 -1
  97. package/src/validators/atMostOnce.ts +19 -19
  98. package/src/validators/differentFromEmptyString.ts +18 -18
  99. package/src/validators/hasContent.ts +19 -19
  100. package/src/validators/isGuid.ts +20 -20
  101. package/src/validators/recognizedGuid.ts +18 -18
  102. package/lib/ts3.9/getOrderByFromParser.d.ts.map +0 -1
  103. /package/lib/{ts3.9 → ts4.2}/index.d.ts.map +0 -0
@@ -1,154 +1,141 @@
1
- interface ODataError {
2
- error?: {
3
- code: string;
4
- message: string;
5
- };
6
- }
7
-
8
- interface ODataExpand {
9
- /**
10
- * Use the {@link ODataExpand.$expand $expand} system query option in the navigation properties
11
- * to control what data from related entities is returned.
12
- * There are two types of navigation properties:
13
- * * Single-valued navigation properties correspond to Lookup attributes that support many-to-one
14
- * relationships and allow setting a reference to another entity.
15
- * * Collection-valued navigation properties correspond to one-to-many or many-to-many relationships.
16
- *
17
- * If you include only the name of the navigation property, you'll receive all the properties for
18
- * related records. You can limit the properties returned for related records using the
19
- * {@link ODataSelect.$select $select} system query option in parentheses after the navigation
20
- * property name. Use this for both single-valued and collection-valued navigation properties.
21
- *
22
- * * Microsoft Docs: {@link https://learn.microsoft.com/power-apps/developer/data-platform/webapi/retrieve-related-entities-query?WT.mc_id=DX-MVP-5004767 Retrieve related table records with a query }
23
- */
24
- $expand?: {
25
- [relationship: string]: ODataExpandQuery;
26
- };
27
- }
28
-
29
- type ODataExpandQuery = ODataSelect & ODataExpand;
30
-
31
- interface ODataFilter {
32
- /**
33
- * Use the {@link ODataFilter.$filter $filter} system query option to set criteria for which rows will be returned.
34
- *
35
- * * Microsoft Docs: {@link https://learn.microsoft.com/power-apps/developer/data-platform/webapi/query-data-web-api?WT.mc_id=DX-MVP-5004767#filter-results Filter results }
36
- */
37
- $filter?: StandardOperator;
38
- }
39
-
40
- interface ODataFetch {
41
- /**
42
- * You can compose a FetchXML query for a specific table.
43
- * Then, URL-encode the XML and pass it to the entity set
44
- * using the {@link ODataFetch.fetchXml fetchXml} query string parameter.
45
- *
46
- * * Microsoft Docs: {@link https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/use-fetchxml-web-api?WT.mc_id=DX-MVP-5004767 Use FetchXml with Web API }
47
- */
48
- fetchXml?: XMLDocument;
49
- }
50
-
51
- interface ODataOrderBy {
52
- /**
53
- * Specify the order in which items are returned using the {@link ODataOrderBy.$orderby $orderby}
54
- * system query option. Use the asc or desc suffix to specify ascending or descending order
55
- * respectively. The default is ascending if the suffix isn't applied.
56
- *
57
- * * Microsoft Docs: {@link https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/query-data-web-api?WT.mc_id=DX-MVP-5004767#order-results Order results }
58
- */
59
- $orderby?: { column: string; asc: boolean }[];
60
- }
61
-
62
- interface ODataSavedQuery {
63
- /**
64
- * You can use the `savedqueryid` value and pass it as the value to the {@link ODataSavedQuery.savedQuery savedQuery}
65
- * parameter to the entity set that matches the corresponding `returnedtypecode` of the saved query.
66
- *
67
- * * Microsoft Docs: {@link https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/retrieve-and-execute-predefined-queries?WT.mc_id=DX-MVP-5004767#predefined-queries Retrieve and execute predefined queries }
68
- */
69
- savedQuery?: string;
70
- }
71
-
72
- interface ODataSelect {
73
- /**
74
- * Use the {@link ODataSelect.$select $select} system query option to limit the properties returned.
75
- *
76
- * This is a performance best practice. If properties aren't specified using
77
- * {@link ODataSelect.$select $select}, all properties will be returned.
78
- *
79
- * * Microsoft Docs: {@link https://learn.microsoft.com/power-apps/developer/data-platform/webapi/query-data-web-api?WT.mc_id=DX-MVP-5004767#request-specific-properties Request specific properties }
80
- */
81
- $select?: string[];
82
- }
83
-
84
- interface ODataTop {
85
- /**
86
- * You can limit the number of results returned by using the {@link ODataTop.$top $top} system query option.
87
- *
88
- * * Microsoft Docs: {@link https://learn.microsoft.com/power-apps/developer/data-platform/webapi/query-data-web-api?WT.mc_id=DX-MVP-5004767#use-top-query-option Use $top query option }
89
- */
90
- $top?: number;
91
- }
92
-
93
- interface ODataUserQuery {
94
- /**
95
- * You can use the `userqueryid` value and pass it as the value to the {@link OdataUserQuery.userQuery userQuery}
96
- * parameter to the entity set that matches the corresponding `returnedtypecode` of the user query.
97
- *
98
- * * Microsoft Docs: {@link https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/retrieve-and-execute-predefined-queries?WT.mc_id=DX-MVP-5004767#predefined-queries Retrieve and execute predefined queries }
99
- */
100
- userQuery?: string;
101
- }
102
-
103
- type StandardOperators = 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
104
-
105
- interface StandardOperator {
106
- operator: StandardOperators;
107
- /**
108
- * The left side of the 'X' operator must be a property of the entity.
109
- */
110
- left: string;
111
- /**
112
- * The right side of the 'X' operator must be a constant value.
113
- */
114
- right: string | number;
115
- }
116
-
117
- interface UnaryOperator {
118
- operator: 'not';
119
- right: StandardOperator;
120
- }
121
-
122
- interface BinaryOperator {
123
- operator: 'and' | 'or';
124
- left: StandardOperator;
125
- right: StandardOperator;
126
- }
127
-
128
- type ODataQuery = ODataError &
129
- ODataExpand &
130
- ODataFetch &
131
- ODataFilter &
132
- ODataOrderBy &
133
- ODataSavedQuery &
134
- ODataSelect &
135
- ODataTop &
136
- ODataUserQuery;
137
-
138
- export type {
139
- BinaryOperator,
140
- ODataError,
141
- ODataExpand,
142
- ODataExpandQuery,
143
- ODataFetch,
144
- ODataFilter,
145
- ODataOrderBy,
146
- ODataQuery,
147
- ODataSavedQuery,
148
- ODataSelect,
149
- ODataTop,
150
- ODataUserQuery,
151
- StandardOperator,
152
- StandardOperators,
153
- UnaryOperator,
154
- };
1
+ interface ODataError {
2
+ error?: {
3
+ code: string;
4
+ message: string;
5
+ };
6
+ }
7
+ interface ODataExpand {
8
+ /**
9
+ * Use the {@link ODataExpand.$expand $expand} system query option in the navigation properties
10
+ * to control what data from related entities is returned.
11
+ * There are two types of navigation properties:
12
+ * * Single-valued navigation properties correspond to Lookup attributes that support many-to-one
13
+ * relationships and allow setting a reference to another entity.
14
+ * * Collection-valued navigation properties correspond to one-to-many or many-to-many relationships.
15
+ *
16
+ * If you include only the name of the navigation property, you'll receive all the properties for
17
+ * related records. You can limit the properties returned for related records using the
18
+ * {@link ODataSelect.$select $select} system query option in parentheses after the navigation
19
+ * property name. Use this for both single-valued and collection-valued navigation properties.
20
+ *
21
+ * * Microsoft Docs: {@link https://learn.microsoft.com/power-apps/developer/data-platform/webapi/retrieve-related-entities-query?WT.mc_id=DX-MVP-5004767 Retrieve related table records with a query }
22
+ */
23
+ $expand?: {
24
+ [relationship: string]: ODataExpandQuery;
25
+ };
26
+ }
27
+ type ODataExpandQuery = ODataSelect & ODataExpand;
28
+ interface ODataFilter {
29
+ /**
30
+ * Use the {@link $filter $filter} system query option to set criteria for which rows will be returned.
31
+ *
32
+ * * Microsoft Docs: {@link https://learn.microsoft.com/power-apps/developer/data-platform/webapi/query-data-web-api?WT.mc_id=DX-MVP-5004767#filter-results Filter results }
33
+ */
34
+ $filter?: FilterOperator;
35
+ }
36
+ type FilterOperator = StandardOperator | ColumnOperator | UnaryOperator | BinaryOperator | QueryFunctionOperator;
37
+ interface ODataFetch {
38
+ /**
39
+ * You can compose a FetchXML query for a specific table.
40
+ * Then, URL-encode the XML and pass it to the entity set
41
+ * using the {@link ODataFetch.fetchXml fetchXml} query string parameter.
42
+ *
43
+ * * Microsoft Docs: {@link https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/use-fetchxml-web-api?WT.mc_id=DX-MVP-5004767 Use FetchXml with Web API }
44
+ */
45
+ fetchXml?: XMLDocument;
46
+ }
47
+ interface ODataOrderBy {
48
+ /**
49
+ * Specify the order in which items are returned using the {@link ODataOrderBy.$orderby $orderby}
50
+ * system query option. Use the asc or desc suffix to specify ascending or descending order
51
+ * respectively. The default is ascending if the suffix isn't applied.
52
+ *
53
+ * * Microsoft Docs: {@link https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/query-data-web-api?WT.mc_id=DX-MVP-5004767#order-results Order results }
54
+ */
55
+ $orderby?: {
56
+ column: string;
57
+ asc: boolean;
58
+ }[];
59
+ }
60
+ interface ODataSavedQuery {
61
+ /**
62
+ * You can use the `savedqueryid` value and pass it as the value to the {@link ODataSavedQuery.savedQuery savedQuery}
63
+ * parameter to the entity set that matches the corresponding `returnedtypecode` of the saved query.
64
+ *
65
+ * * Microsoft Docs: {@link https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/retrieve-and-execute-predefined-queries?WT.mc_id=DX-MVP-5004767#predefined-queries Retrieve and execute predefined queries }
66
+ */
67
+ savedQuery?: string;
68
+ }
69
+ interface ODataSelect {
70
+ /**
71
+ * Use the {@link ODataSelect.$select $select} system query option to limit the properties returned.
72
+ *
73
+ * This is a performance best practice. If properties aren't specified using
74
+ * {@link ODataSelect.$select $select}, all properties will be returned.
75
+ *
76
+ * * Microsoft Docs: {@link https://learn.microsoft.com/power-apps/developer/data-platform/webapi/query-data-web-api?WT.mc_id=DX-MVP-5004767#request-specific-properties Request specific properties }
77
+ */
78
+ $select?: string[];
79
+ }
80
+ interface ODataTop {
81
+ /**
82
+ * You can limit the number of results returned by using the {@link ODataTop.$top $top} system query option.
83
+ *
84
+ * * Microsoft Docs: {@link https://learn.microsoft.com/power-apps/developer/data-platform/webapi/query-data-web-api?WT.mc_id=DX-MVP-5004767#use-top-query-option Use $top query option }
85
+ */
86
+ $top?: number;
87
+ }
88
+ interface ODataUserQuery {
89
+ /**
90
+ * You can use the `userqueryid` value and pass it as the value to the {@link OdataUserQuery.userQuery userQuery}
91
+ * parameter to the entity set that matches the corresponding `returnedtypecode` of the user query.
92
+ *
93
+ * * Microsoft Docs: {@link https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/retrieve-and-execute-predefined-queries?WT.mc_id=DX-MVP-5004767#predefined-queries Retrieve and execute predefined queries }
94
+ */
95
+ userQuery?: string;
96
+ }
97
+ type StandardEqualityOperators = 'eq' | 'ne';
98
+ type StandardOperators = StandardEqualityOperators | 'gt' | 'ge' | 'lt' | 'le';
99
+ /**
100
+ *
101
+ * * Microsoft Docs: {@link https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/query/filter-rows#column-comparison Column comparison }
102
+ */
103
+ interface ColumnOperator {
104
+ column: string;
105
+ operator: StandardOperators;
106
+ otherColumn: string;
107
+ }
108
+ interface StandardOperator {
109
+ operator: StandardOperators;
110
+ /**
111
+ * The left side of the 'X' operator must be a property of the entity.
112
+ */
113
+ left: string;
114
+ /**
115
+ * The right side of the 'X' operator must be a constant value.
116
+ */
117
+ right: string | number;
118
+ }
119
+ type QueryFunctionOperators = 'contains' | 'endswith' | 'startswith';
120
+ interface QueryFunctionOperator {
121
+ operator: QueryFunctionOperators;
122
+ /**
123
+ * The left side of the 'X' operator must be a property of the entity.
124
+ */
125
+ left: string;
126
+ /**
127
+ * The right side of the 'X' operator must be a constant value.
128
+ */
129
+ right: string;
130
+ }
131
+ interface UnaryOperator {
132
+ operator: 'not';
133
+ right: FilterOperator;
134
+ }
135
+ interface BinaryOperator {
136
+ operator: 'and' | 'or';
137
+ left: FilterOperator;
138
+ right: FilterOperator;
139
+ }
140
+ type ODataQuery = ODataError & ODataExpand & ODataFetch & ODataFilter & ODataOrderBy & ODataSavedQuery & ODataSelect & ODataTop & ODataUserQuery;
141
+ export type { BinaryOperator, ODataError, ODataExpand, ODataExpandQuery, ODataFetch, ODataFilter, ODataOrderBy, ODataQuery, ODataSavedQuery, ODataSelect, ODataTop, ODataUserQuery, StandardOperator, StandardOperators, UnaryOperator, };
@@ -0,0 +1,10 @@
1
+ import { ODataQuery } from "./OData.types";
2
+ /**
3
+ * Recursively gets the value of an aliased property. For example, if the query is `$orderby=@p1` and `@p1=name`, this function will return `name`
4
+ * @param parser The URLSearchParams object containing the query parameters
5
+ * @param result Will contain the error details in case there is any
6
+ * @param property The property to expand
7
+ * @returns The expanded property or null when there is an error
8
+ */
9
+ export declare const getAliasedProperty: (parser: URLSearchParams, result: ODataQuery, property: string) => string;
10
+ //# sourceMappingURL=getAliasedProperty.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { ODataQuery } from './OData.types';
2
- /**
3
- * Parses the {@link ODataExpand.$expand $expand} query
4
- * @returns Returns `false` when the parse has an error
5
- */
6
- export declare const getExpandFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
- //# sourceMappingURL=getExpandFromParser.d.ts.map
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the {@link ODataExpand.$expand $expand} query
4
+ * @returns Returns `false` when the parse has an error
5
+ */
6
+ export declare const getExpandFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
+ //# sourceMappingURL=getExpandFromParser.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { ODataQuery } from './OData.types';
2
- /**
3
- * Parses the {@link ODataFetch.fetchXml fetchXml} query
4
- * @returns Returns `false` when the parse has an error
5
- */
6
- export declare const getFetchXmlFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
- //# sourceMappingURL=getFetchXmlFromParser.d.ts.map
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the {@link ODataFetch.fetchXml fetchXml} query
4
+ * @returns Returns `false` when the parse has an error
5
+ */
6
+ export declare const getFetchXmlFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
+ //# sourceMappingURL=getFetchXmlFromParser.d.ts.map
@@ -0,0 +1,7 @@
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the {@link ODataFilter.$filter $filter} query
4
+ * @returns {boolean} Returns `false` when the parse has an error
5
+ */
6
+ export declare const getFilterFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
+ //# sourceMappingURL=getFilterFromParser.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { ODataQuery } from './OData.types';
2
- /**
3
- * Parses the {@link ODataOrderBy.$orderby $orderby} query
4
- * @returns Returns `false` when the parse has an error
5
- */
6
- export declare const getOrderByFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
- //# sourceMappingURL=getOrderByFromParser.d.ts.map
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the {@link ODataOrderBy.$orderby $orderby} query
4
+ * @returns Returns `false` when the parse has an error
5
+ */
6
+ export declare const getOrderByFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
+ //# sourceMappingURL=getOrderByFromParser.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { ODataQuery } from './OData.types';
2
- /**
3
- * Parses the {@link ODataSelect.$select $select} query
4
- * @returns {boolean} Returns `false` when the parse has an error
5
- */
6
- export declare const getSelectFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
- //# sourceMappingURL=getSelectFromParser.d.ts.map
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the {@link ODataSelect.$select $select} query
4
+ * @returns {boolean} Returns `false` when the parse has an error
5
+ */
6
+ export declare const getSelectFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
+ //# sourceMappingURL=getSelectFromParser.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { ODataQuery } from './OData.types';
2
- /**
3
- * Parses the {@link ODataTop.$top $top} query
4
- * @returns Returns `false` when the parse has an error
5
- */
6
- export declare const getTopFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
- //# sourceMappingURL=getTopFromParser.d.ts.map
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the {@link ODataTop.$top $top} query
4
+ * @returns Returns `false` when the parse has an error
5
+ */
6
+ export declare const getTopFromParser: (parser: URLSearchParams, result: ODataQuery) => boolean;
7
+ //# sourceMappingURL=getTopFromParser.d.ts.map
@@ -1,8 +1,8 @@
1
- import type { ODataQuery } from './OData.types';
2
- /**
3
- * Parses the {@link ODataSavedQuery.savedQuery savedQuery} or
4
- * {@link ODataUserQuery.userQuery userQuery} query
5
- * @returns Returns `false` when the parse has an error
6
- */
7
- export declare const getXQueryFromParser: (X: 'savedQuery' | 'userQuery', parser: URLSearchParams, result: ODataQuery) => boolean;
8
- //# sourceMappingURL=getXQueryFromParser.d.ts.map
1
+ import type { ODataQuery } from './OData.types';
2
+ /**
3
+ * Parses the {@link ODataSavedQuery.savedQuery savedQuery} or
4
+ * {@link ODataUserQuery.userQuery userQuery} query
5
+ * @returns Returns `false` when the parse has an error
6
+ */
7
+ export declare const getXQueryFromParser: (X: "savedQuery" | "userQuery", parser: URLSearchParams, result: ODataQuery) => boolean;
8
+ //# sourceMappingURL=getXQueryFromParser.d.ts.map
@@ -1,11 +1,11 @@
1
- export type { BinaryOperator, ODataError, ODataExpand, ODataExpandQuery, ODataFetch, ODataFilter, ODataQuery, ODataSelect, ODataTop, StandardOperator, StandardOperators, } from './OData.types';
2
- export { getExpandFromParser } from './getExpandFromParser';
3
- export { getFetchXmlFromParser } from './getFetchXmlFromParser';
4
- export { getOrderByFromParser } from './getOrderByFromParser';
5
- export { getSelectFromParser } from './getSelectFromParser';
6
- export { getTopFromParser } from './getTopFromParser';
7
- export { getXQueryFromParser } from './getXQueryFromParser';
8
- export { parseOData } from './parseOData';
9
- import { parseOData } from './parseOData';
10
- export default parseOData;
11
- //# sourceMappingURL=index.d.ts.map
1
+ export type { BinaryOperator, ODataError, ODataExpand, ODataExpandQuery, ODataFetch, ODataFilter, ODataQuery, ODataSelect, ODataTop, StandardOperator, StandardOperators, } from './OData.types';
2
+ export { getExpandFromParser } from './getExpandFromParser';
3
+ export { getFetchXmlFromParser } from './getFetchXmlFromParser';
4
+ export { getOrderByFromParser } from './getOrderByFromParser';
5
+ export { getSelectFromParser } from './getSelectFromParser';
6
+ export { getTopFromParser } from './getTopFromParser';
7
+ export { getXQueryFromParser } from './getXQueryFromParser';
8
+ export { parseOData } from './parseOData';
9
+ import { parseOData } from './parseOData';
10
+ export default parseOData;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,8 @@
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;
8
- //# sourceMappingURL=parseOData.d.ts.map
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;
8
+ //# sourceMappingURL=parseOData.d.ts.map
@@ -1,10 +1,10 @@
1
- import type { ODataQuery } from '../OData.types';
2
- /**
3
- * Options of this type must be specified at most once.
4
- * @param option The option being validated (ex. $top)
5
- * @param value The result of {@link URLSearchParams.getAll getAll}
6
- * @param result The {@link ODataQuery} to append the error to
7
- * @returns {boolean} Returns `false` when the parse has an error
8
- */
9
- export declare const atMostOnce: (option: string, value: string[], result: ODataQuery) => boolean;
10
- //# sourceMappingURL=atMostOnce.d.ts.map
1
+ import type { ODataQuery } from '../OData.types';
2
+ /**
3
+ * Options of this type must be specified at most once.
4
+ * @param option The option being validated (ex. $top)
5
+ * @param value The result of {@link URLSearchParams.prototype.getAll URLSearchParams.getAll}
6
+ * @param result The {@link ODataQuery} to append the error to
7
+ * @returns {boolean} Returns `false` when the parse has an error
8
+ */
9
+ export declare const atMostOnce: (option: string, value: string[], result: ODataQuery) => boolean;
10
+ //# sourceMappingURL=atMostOnce.d.ts.map
@@ -1,9 +1,9 @@
1
- import type { ODataQuery } from '../OData.types';
2
- /**
3
- *
4
- * @param value The result of {@link URLSearchParams.getAll getAll}
5
- * @param result The {@link ODataQuery} to append the error to
6
- * @returns {boolean} Returns `false` when the parse has an error
7
- */
8
- export declare const differentFromEmptyString: (value: string[], result: ODataQuery) => boolean;
9
- //# sourceMappingURL=differentFromEmptyString.d.ts.map
1
+ import type { ODataQuery } from '../OData.types';
2
+ /**
3
+ *
4
+ * @param value The result of {@link URLSearchParams.getAll getAll}
5
+ * @param result The {@link ODataQuery} to append the error to
6
+ * @returns {boolean} Returns `false` when the parse has an error
7
+ */
8
+ export declare const differentFromEmptyString: (value: string[], result: ODataQuery) => boolean;
9
+ //# sourceMappingURL=differentFromEmptyString.d.ts.map
@@ -1,10 +1,10 @@
1
- import type { ODataQuery } from '../OData.types';
2
- /**
3
- * Options of this type must be specified at most once.
4
- * @param option The option being validated (ex. $top)
5
- * @param value The result of {@link URLSearchParams.getAll getAll}
6
- * @param result The {@link ODataQuery} to append the error to
7
- * @returns {boolean} Returns `false` when the parse has an error
8
- */
9
- export declare const hasContent: (query: string, value: string[], result: ODataQuery) => boolean;
10
- //# sourceMappingURL=hasContent.d.ts.map
1
+ import type { ODataQuery } from '../OData.types';
2
+ /**
3
+ * Options of this type must be specified at most once.
4
+ * @param option The option being validated (ex. $top)
5
+ * @param value The result of {@link URLSearchParams.getAll getAll}
6
+ * @param result The {@link ODataQuery} to append the error to
7
+ * @returns {boolean} Returns `false` when the parse has an error
8
+ */
9
+ export declare const hasContent: (query: string, value: string[], result: ODataQuery) => boolean;
10
+ //# sourceMappingURL=hasContent.d.ts.map
@@ -1,9 +1,9 @@
1
- import type { ODataQuery } from '../OData.types';
2
- /**
3
- *
4
- * @param value The result of {@link URLSearchParams.getAll getAll}
5
- * @param result The {@link ODataQuery} to append the error to
6
- * @returns {boolean} Returns `false` when the parse has an error
7
- */
8
- export declare const isGuid: (value: string[], result: ODataQuery) => boolean;
9
- //# sourceMappingURL=isGuid.d.ts.map
1
+ import type { ODataQuery } from '../OData.types';
2
+ /**
3
+ *
4
+ * @param value The result of {@link URLSearchParams.getAll getAll}
5
+ * @param result The {@link ODataQuery} to append the error to
6
+ * @returns {boolean} Returns `false` when the parse has an error
7
+ */
8
+ export declare const isGuid: (value: string[], result: ODataQuery) => boolean;
9
+ //# sourceMappingURL=isGuid.d.ts.map
@@ -1,9 +1,9 @@
1
- import type { ODataQuery } from '../OData.types';
2
- /**
3
- *
4
- * @param value The result of {@link URLSearchParams.getAll getAll}
5
- * @param result The {@link ODataQuery} to append the error to
6
- * @returns {boolean} Returns `false` when the parse has an error
7
- */
8
- export declare const recognizedGuid: (value: string[], result: ODataQuery) => boolean;
9
- //# sourceMappingURL=recognizedGuid.d.ts.map
1
+ import type { ODataQuery } from '../OData.types';
2
+ /**
3
+ *
4
+ * @param value The result of {@link URLSearchParams.getAll getAll}
5
+ * @param result The {@link ODataQuery} to append the error to
6
+ * @returns {boolean} Returns `false` when the parse has an error
7
+ */
8
+ export declare const recognizedGuid: (value: string[], result: ODataQuery) => boolean;
9
+ //# sourceMappingURL=recognizedGuid.d.ts.map