angular-odata 0.90.0 → 0.99.2

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 (223) hide show
  1. package/README.md +31 -25
  2. package/{esm2015/angular-odata.js → esm2020/angular-odata.mjs} +0 -0
  3. package/esm2020/lib/api.mjs +303 -0
  4. package/{esm2015/lib/cache/cache.js → esm2020/lib/cache/cache.mjs} +3 -3
  5. package/{esm2015/lib/cache/index.js → esm2020/lib/cache/index.mjs} +0 -0
  6. package/{esm2015/lib/cache/memory.js → esm2020/lib/cache/memory.mjs} +1 -1
  7. package/{esm2015/lib/cache/storage.js → esm2020/lib/cache/storage.mjs} +2 -2
  8. package/esm2020/lib/client.mjs +271 -0
  9. package/{esm2015/lib/constants.js → esm2020/lib/constants.mjs} +8 -3
  10. package/esm2020/lib/helper.mjs +268 -0
  11. package/esm2020/lib/index.mjs +19 -0
  12. package/esm2020/lib/models/collection.mjs +757 -0
  13. package/{esm2015/lib/models/index.js → esm2020/lib/models/index.mjs} +0 -0
  14. package/esm2020/lib/models/model.mjs +453 -0
  15. package/esm2020/lib/models/options.mjs +956 -0
  16. package/{esm2015/lib/module.js → esm2020/lib/module.mjs} +7 -7
  17. package/esm2020/lib/options.mjs +32 -0
  18. package/{esm2015/lib/resources/index.js → esm2020/lib/resources/index.mjs} +0 -0
  19. package/{esm2015/lib/resources/path/handlers.js → esm2020/lib/resources/path/handlers.mjs} +1 -1
  20. package/{esm2015/lib/resources/path/index.js → esm2020/lib/resources/path/index.mjs} +0 -0
  21. package/esm2020/lib/resources/path/segments.mjs +124 -0
  22. package/esm2020/lib/resources/query/builder.mjs +590 -0
  23. package/esm2020/lib/resources/query/expressions/base.mjs +20 -0
  24. package/esm2020/lib/resources/query/expressions/compute.mjs +38 -0
  25. package/esm2020/lib/resources/query/expressions/expand.mjs +57 -0
  26. package/esm2020/lib/resources/query/expressions/filter.mjs +154 -0
  27. package/esm2020/lib/resources/query/expressions/index.mjs +7 -0
  28. package/esm2020/lib/resources/query/expressions/orderby.mjs +54 -0
  29. package/esm2020/lib/resources/query/expressions/search.mjs +113 -0
  30. package/esm2020/lib/resources/query/expressions/select.mjs +32 -0
  31. package/esm2020/lib/resources/query/expressions/syntax.mjs +371 -0
  32. package/esm2020/lib/resources/query/handlers.mjs +188 -0
  33. package/{esm2015/lib/resources/query/index.js → esm2020/lib/resources/query/index.mjs} +0 -0
  34. package/esm2020/lib/resources/query/options.mjs +103 -0
  35. package/esm2020/lib/resources/request.mjs +167 -0
  36. package/esm2020/lib/resources/resource.mjs +318 -0
  37. package/esm2020/lib/resources/responses/annotations.mjs +119 -0
  38. package/{esm2015/lib/resources/responses/csdl/csdl-annotation.js → esm2020/lib/resources/responses/csdl/csdl-annotation.mjs} +0 -0
  39. package/{esm2015/lib/resources/responses/csdl/csdl-entity-container.js → esm2020/lib/resources/responses/csdl/csdl-entity-container.mjs} +0 -0
  40. package/{esm2015/lib/resources/responses/csdl/csdl-entity-set.js → esm2020/lib/resources/responses/csdl/csdl-entity-set.mjs} +0 -0
  41. package/{esm2015/lib/resources/responses/csdl/csdl-enum-type.js → esm2020/lib/resources/responses/csdl/csdl-enum-type.mjs} +0 -0
  42. package/{esm2015/lib/resources/responses/csdl/csdl-function-action.js → esm2020/lib/resources/responses/csdl/csdl-function-action.mjs} +0 -0
  43. package/{esm2015/lib/resources/responses/csdl/csdl-navigation-property-binding.js → esm2020/lib/resources/responses/csdl/csdl-navigation-property-binding.mjs} +0 -0
  44. package/{esm2015/lib/resources/responses/csdl/csdl-reference.js → esm2020/lib/resources/responses/csdl/csdl-reference.mjs} +0 -0
  45. package/{esm2015/lib/resources/responses/csdl/csdl-schema.js → esm2020/lib/resources/responses/csdl/csdl-schema.mjs} +0 -0
  46. package/{esm2015/lib/resources/responses/csdl/csdl-singleton.js → esm2020/lib/resources/responses/csdl/csdl-singleton.mjs} +0 -0
  47. package/{esm2015/lib/resources/responses/csdl/csdl-structural-property.js → esm2020/lib/resources/responses/csdl/csdl-structural-property.mjs} +0 -0
  48. package/{esm2015/lib/resources/responses/csdl/csdl-structured-type.js → esm2020/lib/resources/responses/csdl/csdl-structured-type.mjs} +0 -0
  49. package/{esm2015/lib/resources/responses/csdl/csdl-type-definition.js → esm2020/lib/resources/responses/csdl/csdl-type-definition.mjs} +0 -0
  50. package/{esm2015/lib/resources/responses/index.js → esm2020/lib/resources/responses/index.mjs} +0 -0
  51. package/esm2020/lib/resources/responses/metadata.mjs +547 -0
  52. package/{esm2015/lib/resources/responses/options.js → esm2020/lib/resources/responses/options.mjs} +0 -0
  53. package/{esm2015/lib/resources/responses/response.js → esm2020/lib/resources/responses/response.mjs} +0 -0
  54. package/{esm2015/lib/resources/responses/types.js → esm2020/lib/resources/responses/types.mjs} +0 -0
  55. package/esm2020/lib/resources/types/action.mjs +104 -0
  56. package/esm2020/lib/resources/types/batch.mjs +314 -0
  57. package/esm2020/lib/resources/types/count.mjs +30 -0
  58. package/esm2020/lib/resources/types/entity-set.mjs +97 -0
  59. package/esm2020/lib/resources/types/entity.mjs +109 -0
  60. package/esm2020/lib/resources/types/function.mjs +140 -0
  61. package/{esm2015/lib/resources/types/index.js → esm2020/lib/resources/types/index.mjs} +0 -0
  62. package/esm2020/lib/resources/types/media.mjs +44 -0
  63. package/esm2020/lib/resources/types/metadata.mjs +33 -0
  64. package/esm2020/lib/resources/types/navigation-property.mjs +229 -0
  65. package/esm2020/lib/resources/types/options.mjs +2 -0
  66. package/esm2020/lib/resources/types/property.mjs +186 -0
  67. package/esm2020/lib/resources/types/reference.mjs +88 -0
  68. package/esm2020/lib/resources/types/singleton.mjs +129 -0
  69. package/esm2020/lib/resources/types/value.mjs +44 -0
  70. package/esm2020/lib/schema/annotation.mjs +37 -0
  71. package/esm2020/lib/schema/callable.mjs +62 -0
  72. package/esm2020/lib/schema/element.mjs +61 -0
  73. package/esm2020/lib/schema/entity-container.mjs +9 -0
  74. package/esm2020/lib/schema/entity-set.mjs +9 -0
  75. package/esm2020/lib/schema/enum-type.mjs +71 -0
  76. package/{esm2015/lib/schema/index.js → esm2020/lib/schema/index.mjs} +2 -1
  77. package/esm2020/lib/schema/parsers/callable.mjs +113 -0
  78. package/esm2020/lib/schema/parsers/edm.mjs +95 -0
  79. package/esm2020/lib/schema/parsers/enum-type.mjs +107 -0
  80. package/esm2020/lib/schema/parsers/index.mjs +5 -0
  81. package/esm2020/lib/schema/parsers/structured-type.mjs +412 -0
  82. package/esm2020/lib/schema/schema.mjs +61 -0
  83. package/esm2020/lib/schema/structured-type.mjs +207 -0
  84. package/esm2020/lib/services/base.mjs +29 -0
  85. package/esm2020/lib/services/entity-set.mjs +143 -0
  86. package/esm2020/lib/services/entity.mjs +12 -0
  87. package/{esm2015/lib/services/factory.js → esm2020/lib/services/factory.mjs} +3 -3
  88. package/{esm2015/lib/services/index.js → esm2020/lib/services/index.mjs} +0 -0
  89. package/{esm2015/lib/services/singleton.js → esm2020/lib/services/singleton.mjs} +1 -1
  90. package/{esm2015/lib/settings.js → esm2020/lib/settings.mjs} +1 -1
  91. package/{esm2015/lib/tokens.js → esm2020/lib/tokens.mjs} +0 -0
  92. package/esm2020/lib/types.mjs +37 -0
  93. package/{esm2015/lib/utils/arraybuffers.js → esm2020/lib/utils/arraybuffers.mjs} +0 -0
  94. package/{esm2015/lib/utils/dates.js → esm2020/lib/utils/dates.mjs} +0 -0
  95. package/{esm2015/lib/utils/durations.js → esm2020/lib/utils/durations.mjs} +0 -0
  96. package/{esm2015/lib/utils/enums.js → esm2020/lib/utils/enums.mjs} +0 -0
  97. package/{esm2015/lib/utils/http.js → esm2020/lib/utils/http.mjs} +0 -0
  98. package/{esm2015/lib/utils/index.js → esm2020/lib/utils/index.mjs} +0 -0
  99. package/{esm2015/lib/utils/objects.js → esm2020/lib/utils/objects.mjs} +13 -13
  100. package/esm2020/lib/utils/odata.mjs +22 -0
  101. package/esm2020/lib/utils/strings.mjs +20 -0
  102. package/{esm2015/lib/utils/types.js → esm2020/lib/utils/types.mjs} +0 -0
  103. package/{esm2015/lib/utils/urls.js → esm2020/lib/utils/urls.mjs} +0 -0
  104. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  105. package/fesm2015/{angular-odata.js → angular-odata.mjs} +3427 -2872
  106. package/fesm2015/angular-odata.mjs.map +1 -0
  107. package/fesm2020/angular-odata.mjs +10589 -0
  108. package/fesm2020/angular-odata.mjs.map +1 -0
  109. package/lib/api.d.ts +14 -14
  110. package/lib/cache/cache.d.ts +2 -2
  111. package/lib/cache/storage.d.ts +1 -1
  112. package/lib/client.d.ts +3 -3
  113. package/lib/constants.d.ts +5 -2
  114. package/lib/index.d.ts +0 -1
  115. package/lib/models/collection.d.ts +21 -21
  116. package/lib/models/model.d.ts +34 -22
  117. package/lib/models/options.d.ts +26 -29
  118. package/lib/module.d.ts +1 -1
  119. package/lib/options.d.ts +1 -0
  120. package/lib/resources/path/segments.d.ts +2 -2
  121. package/lib/resources/query/builder.d.ts +7 -3
  122. package/lib/resources/query/expressions/base.d.ts +19 -0
  123. package/lib/resources/query/expressions/compute.d.ts +26 -0
  124. package/lib/resources/query/expressions/expand.d.ts +40 -0
  125. package/lib/resources/query/expressions/filter.d.ts +58 -0
  126. package/lib/resources/query/expressions/index.d.ts +6 -0
  127. package/lib/resources/query/expressions/orderby.d.ts +37 -0
  128. package/lib/resources/query/expressions/search.d.ts +47 -0
  129. package/lib/resources/query/expressions/select.d.ts +21 -0
  130. package/lib/resources/query/{syntax.d.ts → expressions/syntax.d.ts} +74 -55
  131. package/lib/resources/query/handlers.d.ts +30 -19
  132. package/lib/resources/query/options.d.ts +3 -3
  133. package/lib/resources/request.d.ts +1 -1
  134. package/lib/resources/resource.d.ts +30 -12
  135. package/lib/resources/types/action.d.ts +12 -18
  136. package/lib/resources/types/batch.d.ts +10 -2
  137. package/lib/resources/types/count.d.ts +6 -4
  138. package/lib/resources/types/entity-set.d.ts +11 -14
  139. package/lib/resources/types/entity.d.ts +13 -15
  140. package/lib/resources/types/function.d.ts +11 -17
  141. package/lib/resources/types/media.d.ts +8 -6
  142. package/lib/resources/types/metadata.d.ts +3 -4
  143. package/lib/resources/types/navigation-property.d.ts +17 -22
  144. package/lib/resources/types/property.d.ts +13 -18
  145. package/lib/resources/types/reference.d.ts +41 -7
  146. package/lib/resources/types/singleton.d.ts +12 -15
  147. package/lib/resources/types/value.d.ts +9 -4
  148. package/lib/schema/annotation.d.ts +18 -0
  149. package/lib/schema/callable.d.ts +4 -20
  150. package/lib/schema/element.d.ts +45 -0
  151. package/lib/schema/entity-container.d.ts +2 -12
  152. package/lib/schema/entity-set.d.ts +2 -18
  153. package/lib/schema/enum-type.d.ts +3 -34
  154. package/lib/schema/index.d.ts +1 -0
  155. package/lib/{parsers → schema/parsers}/callable.d.ts +1 -1
  156. package/lib/{parsers → schema/parsers}/edm.d.ts +1 -1
  157. package/lib/{parsers → schema/parsers}/enum-type.d.ts +12 -11
  158. package/lib/{parsers → schema/parsers}/index.d.ts +0 -0
  159. package/lib/{parsers → schema/parsers}/structured-type.d.ts +12 -12
  160. package/lib/schema/schema.d.ts +3 -10
  161. package/lib/schema/structured-type.d.ts +12 -24
  162. package/lib/services/base.d.ts +2 -2
  163. package/lib/services/entity-set.d.ts +2 -2
  164. package/lib/services/entity.d.ts +1 -1
  165. package/lib/services/singleton.d.ts +2 -2
  166. package/lib/settings.d.ts +5 -5
  167. package/lib/types.d.ts +1 -0
  168. package/lib/utils/strings.d.ts +1 -0
  169. package/package.json +21 -8
  170. package/bundles/angular-odata.umd.js +0 -11694
  171. package/bundles/angular-odata.umd.js.map +0 -1
  172. package/esm2015/lib/api.js +0 -297
  173. package/esm2015/lib/client.js +0 -272
  174. package/esm2015/lib/helper.js +0 -271
  175. package/esm2015/lib/index.js +0 -21
  176. package/esm2015/lib/models/collection.js +0 -717
  177. package/esm2015/lib/models/model.js +0 -419
  178. package/esm2015/lib/models/options.js +0 -924
  179. package/esm2015/lib/options.js +0 -31
  180. package/esm2015/lib/parsers/callable.js +0 -107
  181. package/esm2015/lib/parsers/edm.js +0 -95
  182. package/esm2015/lib/parsers/enum-type.js +0 -102
  183. package/esm2015/lib/parsers/index.js +0 -5
  184. package/esm2015/lib/parsers/structured-type.js +0 -388
  185. package/esm2015/lib/resources/path/segments.js +0 -121
  186. package/esm2015/lib/resources/query/builder.js +0 -544
  187. package/esm2015/lib/resources/query/expressions.js +0 -194
  188. package/esm2015/lib/resources/query/handlers.js +0 -192
  189. package/esm2015/lib/resources/query/options.js +0 -103
  190. package/esm2015/lib/resources/query/syntax.js +0 -349
  191. package/esm2015/lib/resources/request.js +0 -168
  192. package/esm2015/lib/resources/resource.js +0 -243
  193. package/esm2015/lib/resources/responses/annotations.js +0 -121
  194. package/esm2015/lib/resources/responses/metadata.js +0 -548
  195. package/esm2015/lib/resources/types/action.js +0 -105
  196. package/esm2015/lib/resources/types/batch.js +0 -294
  197. package/esm2015/lib/resources/types/count.js +0 -33
  198. package/esm2015/lib/resources/types/entity-set.js +0 -101
  199. package/esm2015/lib/resources/types/entity.js +0 -137
  200. package/esm2015/lib/resources/types/function.js +0 -130
  201. package/esm2015/lib/resources/types/media.js +0 -47
  202. package/esm2015/lib/resources/types/metadata.js +0 -36
  203. package/esm2015/lib/resources/types/navigation-property.js +0 -205
  204. package/esm2015/lib/resources/types/options.js +0 -2
  205. package/esm2015/lib/resources/types/property.js +0 -151
  206. package/esm2015/lib/resources/types/reference.js +0 -73
  207. package/esm2015/lib/resources/types/singleton.js +0 -167
  208. package/esm2015/lib/resources/types/value.js +0 -35
  209. package/esm2015/lib/schema/annotation.js +0 -7
  210. package/esm2015/lib/schema/callable.js +0 -82
  211. package/esm2015/lib/schema/entity-container.js +0 -22
  212. package/esm2015/lib/schema/entity-set.js +0 -33
  213. package/esm2015/lib/schema/enum-type.js +0 -126
  214. package/esm2015/lib/schema/schema.js +0 -60
  215. package/esm2015/lib/schema/structured-type.js +0 -217
  216. package/esm2015/lib/services/base.js +0 -23
  217. package/esm2015/lib/services/entity-set.js +0 -146
  218. package/esm2015/lib/services/entity.js +0 -12
  219. package/esm2015/lib/types.js +0 -37
  220. package/esm2015/lib/utils/odata.js +0 -21
  221. package/esm2015/lib/utils/strings.js +0 -13
  222. package/fesm2015/angular-odata.js.map +0 -1
  223. package/lib/resources/query/expressions.d.ts +0 -50
@@ -0,0 +1,58 @@
1
+ import type { QueryCustomType } from '../builder';
2
+ import { Expression } from './base';
3
+ import { ODataFunctions, ODataOperators, Renderable } from './syntax';
4
+ export declare type FilterConnector = 'and' | 'or';
5
+ export declare class FilterExpression<T> extends Expression<T> {
6
+ private _connector;
7
+ private _negated;
8
+ constructor({ children, connector, negated, }?: {
9
+ children?: Renderable[];
10
+ connector?: FilterConnector;
11
+ negated?: boolean;
12
+ });
13
+ static s<T extends object>(): T;
14
+ static e<T>(connector?: FilterConnector): FilterExpression<T>;
15
+ static filter<T extends object>(opts: (e: {
16
+ s: T;
17
+ e: (connector?: FilterConnector) => FilterExpression<T>;
18
+ o: ODataOperators<T>;
19
+ f: ODataFunctions<T>;
20
+ }) => FilterExpression<T>): FilterExpression<T>;
21
+ toJSON(): {
22
+ children: any[];
23
+ connector: FilterConnector;
24
+ negated: boolean;
25
+ };
26
+ connector(): FilterConnector;
27
+ negated(): boolean;
28
+ render({ aliases, escape, prefix, }?: {
29
+ aliases?: QueryCustomType[];
30
+ escape?: boolean;
31
+ prefix?: string;
32
+ }): string;
33
+ private _add;
34
+ or(exp: FilterExpression<T>): FilterExpression<T>;
35
+ and(exp: FilterExpression<T>): FilterExpression<T>;
36
+ not(exp: FilterExpression<T>): FilterExpression<T>;
37
+ eq(left: any, right: any, normalize?: boolean): FilterExpression<T>;
38
+ ne(left: any, right: any, normalize?: boolean): FilterExpression<T>;
39
+ gt(left: any, right: any, normalize?: boolean): FilterExpression<T>;
40
+ ge(left: any, right: any, normalize?: boolean): FilterExpression<T>;
41
+ lt(left: any, right: any, normalize?: boolean): FilterExpression<T>;
42
+ le(left: any, right: any, normalize?: boolean): FilterExpression<T>;
43
+ has(left: any, right: any, normalize?: boolean): FilterExpression<T>;
44
+ in(left: any, right: any, normalize?: boolean): FilterExpression<T>;
45
+ contains(left: any, right: any, normalize?: boolean): FilterExpression<T>;
46
+ startsWith(left: any, right: any, normalize?: boolean): FilterExpression<T>;
47
+ endsWith(left: any, right: any, normalize?: boolean): FilterExpression<T>;
48
+ any<N extends object>(left: N[], opts: (e: {
49
+ s: N;
50
+ e: (connector?: FilterConnector) => FilterExpression<N>;
51
+ }) => FilterExpression<N>, alias?: string): FilterExpression<T>;
52
+ all<N extends object>(left: N[], opts: (e: {
53
+ s: N;
54
+ e: (connector?: FilterConnector) => FilterExpression<N>;
55
+ }) => FilterExpression<N>, alias?: string): FilterExpression<T>;
56
+ isof(type: string): FilterExpression<T>;
57
+ isof(left: T, type: string): FilterExpression<T>;
58
+ }
@@ -0,0 +1,6 @@
1
+ export * from './base';
2
+ export * from './compute';
3
+ export * from './filter';
4
+ export * from './orderby';
5
+ export * from './search';
6
+ export * from './syntax';
@@ -0,0 +1,37 @@
1
+ import type { QueryCustomType } from '../builder';
2
+ import { Expression } from './base';
3
+ import { Renderable } from './syntax';
4
+ export declare class OrderByField implements Renderable {
5
+ protected field: Renderable;
6
+ protected order: 'asc' | 'desc';
7
+ constructor(field: Renderable, order: 'asc' | 'desc');
8
+ get [Symbol.toStringTag](): string;
9
+ toJSON(): {
10
+ field: any;
11
+ order: "desc" | "asc";
12
+ };
13
+ render({ aliases, escape, prefix, }: {
14
+ aliases?: QueryCustomType[];
15
+ escape?: boolean;
16
+ prefix?: string;
17
+ }): string;
18
+ }
19
+ export declare class OrderByExpression<T> extends Expression<T> {
20
+ constructor({ children, }?: {
21
+ children?: Renderable[];
22
+ });
23
+ static e<T>(): OrderByExpression<T>;
24
+ static s<T extends object>(): T;
25
+ static orderBy<T extends object>(opts: (e: {
26
+ s: T;
27
+ e: () => OrderByExpression<T>;
28
+ }) => OrderByExpression<T>): OrderByExpression<T>;
29
+ private _add;
30
+ render({ aliases, escape, prefix, }?: {
31
+ aliases?: QueryCustomType[] | undefined;
32
+ escape?: boolean | undefined;
33
+ prefix?: string | undefined;
34
+ }): string;
35
+ ascending(field: any): OrderByExpression<T>;
36
+ descending(field: any): OrderByExpression<T>;
37
+ }
@@ -0,0 +1,47 @@
1
+ import type { QueryCustomType } from '../builder';
2
+ import { Expression } from './base';
3
+ import { Renderable } from './syntax';
4
+ export declare type SearchConnector = 'AND' | 'OR';
5
+ export declare class SearchTerm implements Renderable {
6
+ protected value: string;
7
+ constructor(value: string);
8
+ get [Symbol.toStringTag](): string;
9
+ toJSON(): {
10
+ value: string;
11
+ };
12
+ render({ aliases, escape, prefix, }: {
13
+ aliases?: QueryCustomType[];
14
+ escape?: boolean;
15
+ prefix?: string;
16
+ }): string;
17
+ }
18
+ export declare class SearchExpression<T> extends Expression<T> {
19
+ private _connector;
20
+ private _negated;
21
+ constructor({ children, connector, negated, }?: {
22
+ children?: Renderable[];
23
+ connector?: SearchConnector;
24
+ negated?: boolean;
25
+ });
26
+ static e<T>(connector?: SearchConnector): SearchExpression<T>;
27
+ static search<T extends object>(opts: (e: {
28
+ e: (connector?: SearchConnector) => SearchExpression<T>;
29
+ }) => SearchExpression<T>): SearchExpression<T>;
30
+ private _add;
31
+ render({ aliases, escape, prefix, }?: {
32
+ aliases?: QueryCustomType[] | undefined;
33
+ escape?: boolean | undefined;
34
+ prefix?: string | undefined;
35
+ }): string;
36
+ toJSON(): {
37
+ children: any[];
38
+ connector: SearchConnector;
39
+ negated: boolean;
40
+ };
41
+ connector(): SearchConnector;
42
+ negated(): boolean;
43
+ or(exp: SearchExpression<T>): SearchExpression<T>;
44
+ and(exp: SearchExpression<T>): SearchExpression<T>;
45
+ not(exp: SearchExpression<T>): SearchExpression<T>;
46
+ term(value: any): SearchExpression<T>;
47
+ }
@@ -0,0 +1,21 @@
1
+ import type { QueryCustomType } from '../builder';
2
+ import { Expression } from './base';
3
+ import { Renderable } from './syntax';
4
+ export declare class SelectExpression<T> extends Expression<T> {
5
+ constructor({ children, }?: {
6
+ children?: Renderable[];
7
+ });
8
+ static e<T>(): SelectExpression<T>;
9
+ static s<T extends object>(): T;
10
+ static select<T extends object>(opts: (e: {
11
+ s: T;
12
+ e: () => SelectExpression<T>;
13
+ }) => SelectExpression<T>): SelectExpression<T>;
14
+ render({ aliases, escape, prefix, }?: {
15
+ aliases?: QueryCustomType[] | undefined;
16
+ escape?: boolean | undefined;
17
+ prefix?: string | undefined;
18
+ }): string;
19
+ private _add;
20
+ field(field: any): SelectExpression<T>;
21
+ }
@@ -1,32 +1,51 @@
1
- import type { QueryCustomType } from './builder';
1
+ import type { QueryCustomType } from '../builder';
2
2
  export interface Renderable {
3
- render(aliases?: QueryCustomType[]): string;
3
+ render({ aliases, escape, prefix, }: {
4
+ aliases?: QueryCustomType[];
5
+ escape?: boolean;
6
+ prefix?: string;
7
+ }): string;
4
8
  toString(): string;
5
9
  toJSON(): any;
6
10
  }
7
- export declare type Funcs<T> = (x: ODataSyntax<T>) => Function<T> | Operator<T> | Grouping<T> | Navigation<T, any>;
8
- export declare type Field<T> = keyof T | Funcs<keyof T>;
11
+ export declare class Field<T extends object> implements ProxyHandler<T> {
12
+ name: string;
13
+ constructor(name?: string);
14
+ static factory<T extends object>(): T;
15
+ get(target: T, p: string | symbol): any;
16
+ }
17
+ export declare function render(value: any, { aliases, normalize, escape, prefix, }?: {
18
+ aliases?: QueryCustomType[];
19
+ normalize?: boolean;
20
+ escape?: boolean;
21
+ prefix?: string;
22
+ }): string | number | boolean | null;
9
23
  export declare class Function<T> implements Renderable {
10
24
  protected name: string;
11
25
  protected values: any[];
12
26
  protected normalize: boolean;
13
- constructor(name: string, values: any[], normalize?: boolean);
27
+ protected escape: boolean;
28
+ constructor(name: string, values: any[], normalize?: boolean, escape?: boolean);
14
29
  get [Symbol.toStringTag](): string;
15
30
  toJSON(): {
16
31
  name: string;
17
32
  values: any[];
18
33
  normalize: boolean;
19
34
  };
20
- render(aliases?: QueryCustomType[]): string;
35
+ render({ aliases, escape, prefix, }: {
36
+ aliases?: QueryCustomType[];
37
+ escape?: boolean;
38
+ prefix?: string;
39
+ }): string;
21
40
  }
22
41
  export declare class StringAndCollectionFunctions<T> {
23
- concat(field: T, value: any, normalize?: boolean): Function<T>;
24
- contains(field: T, value: any, normalize?: boolean): Function<T>;
25
- endsWith(field: T, value: any, normalize?: boolean): Function<T>;
26
- indexOf(field: T, value: any, normalize?: boolean): Function<T>;
27
- length(value: T, normalize?: boolean): Function<T>;
28
- startsWith(field: T, value: any, normalize?: boolean): Function<T>;
29
- subString(field: T, start: any, length?: any, normalize?: boolean): Function<T>;
42
+ concat(field: any, value: any, normalize?: boolean): Function<T>;
43
+ contains(field: any, value: any, normalize?: boolean): Function<T>;
44
+ endsWith(field: any, value: any, normalize?: boolean): Function<T>;
45
+ indexOf(field: any, value: any, normalize?: boolean): Function<T>;
46
+ length(value: any, normalize?: boolean): Function<T>;
47
+ startsWith(field: any, value: any, normalize?: boolean): Function<T>;
48
+ subString(field: any, start: number, length?: number): Function<T>;
30
49
  }
31
50
  export declare class CollectionFunctions<T> {
32
51
  hasSubset(s1: T, s2: any): Function<T>;
@@ -39,20 +58,20 @@ export declare class StringFunctions<T> {
39
58
  trim(value: T): Function<T>;
40
59
  }
41
60
  export declare class DateAndTimeFunctions<T> {
42
- date(value: T): Function<T>;
43
- day(value: T): Function<T>;
44
- fractionalseconds(value: T): Function<T>;
45
- hour(value: T): Function<T>;
46
- maxdatetime(value: T): Function<T>;
47
- mindatetime(value: T): Function<T>;
48
- minute(value: T): Function<T>;
49
- month(value: T): Function<T>;
61
+ date(value: any): Function<T>;
62
+ day(value: any): Function<T>;
63
+ fractionalseconds(value: any): Function<T>;
64
+ hour(value: any): Function<T>;
65
+ maxdatetime(value: any): Function<T>;
66
+ mindatetime(value: any): Function<T>;
67
+ minute(value: any): Function<T>;
68
+ month(value: any): Function<T>;
50
69
  now(): Function<T>;
51
- second(value: T): Function<T>;
52
- time(value: T): Function<T>;
53
- totaloffsetminutes(value: T): Function<T>;
54
- totalseconds(value: T): Function<T>;
55
- year(value: T): Function<T>;
70
+ second(value: any): Function<T>;
71
+ time(value: any): Function<T>;
72
+ totaloffsetminutes(value: any): Function<T>;
73
+ totalseconds(value: any): Function<T>;
74
+ year(value: any): Function<T>;
56
75
  }
57
76
  export declare class ArithmeticFunctions<T> {
58
77
  ceiling(value: T | string): Function<T>;
@@ -64,9 +83,9 @@ export declare class TypeFunctions<T> {
64
83
  isof(value: T | string, type?: string): Function<T>;
65
84
  }
66
85
  export declare class GeoFunctions<T> {
67
- distance(value: T, point: string, normalize?: boolean): Function<T>;
68
- intersects(value: T, polygon: string, normalize?: boolean): Function<T>;
69
- length(value: T, normalize?: boolean): Function<T>;
86
+ geoDistance(value: T, point: string, normalize?: boolean): Function<T>;
87
+ geoIntersects(value: T, polygon: string, normalize?: boolean): Function<T>;
88
+ geoLength(line: T, normalize?: boolean): Function<T>;
70
89
  }
71
90
  export declare class ConditionalFunctions<T> {
72
91
  case(condition: T | string, value: any): Function<T>;
@@ -82,7 +101,11 @@ export declare class Operator<T> implements Renderable {
82
101
  values: any[];
83
102
  normalize: boolean;
84
103
  };
85
- render(aliases?: QueryCustomType[]): string;
104
+ render({ aliases, escape, prefix, }: {
105
+ aliases?: QueryCustomType[];
106
+ escape?: boolean;
107
+ prefix?: string;
108
+ }): string;
86
109
  }
87
110
  export declare class LogicalOperators<T> {
88
111
  eq(left: any, right: any, normalize?: boolean): Operator<unknown>;
@@ -91,8 +114,6 @@ export declare class LogicalOperators<T> {
91
114
  ge(left: any, right: any, normalize?: boolean): Operator<unknown>;
92
115
  lt(left: any, right: any, normalize?: boolean): Operator<unknown>;
93
116
  le(left: any, right: any, normalize?: boolean): Operator<unknown>;
94
- and(left: any, right: any, normalize?: boolean): Operator<unknown>;
95
- or(left: any, right: any, normalize?: boolean): Operator<unknown>;
96
117
  not(value: any, normalize?: boolean): Operator<T>;
97
118
  has(left: any, right: any, normalize?: boolean): Operator<unknown>;
98
119
  in(left: any, right: any, normalize?: boolean): Operator<unknown>;
@@ -112,38 +133,36 @@ export declare class Grouping<T> implements Renderable {
112
133
  toJSON(): {
113
134
  group: any;
114
135
  };
115
- render(aliases?: QueryCustomType[]): string;
136
+ render({ aliases, escape, prefix, }: {
137
+ aliases?: QueryCustomType[];
138
+ escape?: boolean;
139
+ prefix?: string;
140
+ }): string;
116
141
  }
117
- export declare class Navigation<T, N> implements Renderable {
118
- protected field: T;
119
- protected value: Field<N>;
120
- constructor(field: T, value: Field<N>);
121
- get [Symbol.toStringTag](): string;
122
- toJSON(): {
123
- field: T;
124
- value: Field<N>;
125
- };
126
- render(aliases?: QueryCustomType[]): string;
127
- }
128
- export declare class GroupingAndNavigationOperators<T> {
129
- grouping(value: any): Grouping<unknown>;
130
- navigation<N>(field: T, value: Field<N>): Navigation<T, N>;
131
- }
132
- export declare class Lambda<T> extends Operator<T> {
142
+ export declare class Lambda<T> implements Renderable {
133
143
  protected op: string;
134
144
  protected values: any[];
135
- protected normalize: boolean;
136
- constructor(op: string, values: any[], normalize?: boolean);
145
+ protected alias?: string | undefined;
146
+ constructor(op: string, values: any[], alias?: string | undefined);
137
147
  get [Symbol.toStringTag](): string;
138
- render(aliases?: QueryCustomType[]): string;
148
+ toJSON(): {
149
+ op: string;
150
+ values: any[];
151
+ alias: string | undefined;
152
+ };
153
+ render({ aliases, escape, prefix, }: {
154
+ aliases?: QueryCustomType[];
155
+ escape?: boolean;
156
+ prefix?: string;
157
+ }): string;
139
158
  }
140
159
  export declare class LambdaOperators<T> {
141
- any(field: T, value: any): Lambda<unknown>;
142
- all(field: T, value: any): Lambda<unknown>;
160
+ any(field: T, value: any, alias?: string): Lambda<unknown>;
161
+ all(field: T, value: any, alias?: string): Lambda<unknown>;
143
162
  }
144
163
  export declare class ODataOperators<T> {
145
164
  }
146
- export interface ODataOperators<T> extends LogicalOperators<T>, ArithmeticOperators<T>, GroupingAndNavigationOperators<T>, LambdaOperators<T> {
165
+ export interface ODataOperators<T> extends LogicalOperators<T>, ArithmeticOperators<T>, LambdaOperators<T> {
147
166
  }
148
167
  export declare const operators: ODataOperators<any>;
149
168
  export declare class ODataFunctions<T> {
@@ -1,6 +1,8 @@
1
- import { Expand, Filter, OrderBy, Select, Transform } from './builder';
2
1
  import { QueryOptionNames } from '../../types';
3
- import { Expression } from './expressions';
2
+ import { Expand, Filter, OrderBy, Select, Transform } from './builder';
3
+ import { ComputeExpression, FilterConnector, FilterExpression, OrderByExpression, SearchConnector, SearchExpression, ODataFunctions, ODataOperators } from './expressions';
4
+ import { ExpandExpression } from './expressions/expand';
5
+ import { SelectExpression } from './expressions/select';
4
6
  import type { ODataQueryArguments, ODataQueryOptions } from './options';
5
7
  export declare class ODataQueryOptionHandler<T> {
6
8
  private o;
@@ -37,44 +39,53 @@ export declare class ODataQueryOptionsHandler<T> {
37
39
  * @returns The alias
38
40
  */
39
41
  alias(value: any, name?: string): import("./builder").QueryCustomType;
42
+ select(opts: (e: {
43
+ s: T;
44
+ e: () => SelectExpression<T>;
45
+ }) => SelectExpression<T>): SelectExpression<T>;
40
46
  select(opts: Select<T>): ODataQueryOptionHandler<T>;
41
47
  select(): ODataQueryOptionHandler<T>;
48
+ expand(opts: (e: {
49
+ s: T;
50
+ e: () => ExpandExpression<T>;
51
+ }) => ExpandExpression<T>): ExpandExpression<T>;
42
52
  expand(opts: Expand<T>): ODataQueryOptionHandler<T>;
43
53
  expand(): ODataQueryOptionHandler<T>;
44
54
  /**
45
- * Url: https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptioncompute
55
+ * @link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptioncompute
46
56
  */
47
57
  compute(opts: (e: {
48
- e: Expression<T>;
49
- and: Expression<T>;
50
- or: Expression<T>;
51
- not: typeof Expression.not;
52
- }) => Expression<T>): Expression<T>;
58
+ s: T;
59
+ e: () => ComputeExpression<T>;
60
+ o: ODataOperators<T>;
61
+ f: ODataFunctions<T>;
62
+ }) => ComputeExpression<T>): ComputeExpression<T>;
53
63
  compute(opts: string): ODataQueryOptionHandler<T>;
54
64
  compute(): ODataQueryOptionHandler<T>;
55
65
  /**
56
- * Url: https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptionformat
66
+ * @link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptionformat
57
67
  */
58
68
  format(opts: string): ODataQueryOptionHandler<T>;
59
69
  format(): ODataQueryOptionHandler<T>;
60
70
  transform(opts: Transform<T>): ODataQueryOptionHandler<T>;
61
71
  transform(): ODataQueryOptionHandler<T>;
72
+ search(opts: (e: {
73
+ e: (connector: SearchConnector) => SearchExpression<T>;
74
+ }) => SearchExpression<T>): SearchExpression<T>;
62
75
  search(opts: string): ODataQueryOptionHandler<T>;
63
76
  search(): ODataQueryOptionHandler<T>;
64
77
  filter(opts: (e: {
65
- e: () => Expression<T>;
66
- and: () => Expression<T>;
67
- or: () => Expression<T>;
68
- not: (e: Expression<T>) => Expression<T>;
69
- }) => Expression<T>): Expression<T>;
78
+ s: T;
79
+ e: (connector?: FilterConnector) => FilterExpression<T>;
80
+ o: ODataOperators<T>;
81
+ f: ODataFunctions<T>;
82
+ }) => FilterExpression<T>): FilterExpression<T>;
70
83
  filter(opts: Filter<T>): ODataQueryOptionHandler<T>;
71
84
  filter(): ODataQueryOptionHandler<T>;
72
85
  orderBy(opts: (e: {
73
- e: () => Expression<T>;
74
- and: () => Expression<T>;
75
- or: () => Expression<T>;
76
- not: (e: Expression<T>) => Expression<T>;
77
- }) => Expression<T>): Expression<T>;
86
+ s: T;
87
+ e: () => OrderByExpression<T>;
88
+ }) => OrderByExpression<T>): OrderByExpression<T>;
78
89
  orderBy(opts: OrderBy<T>): ODataQueryOptionHandler<T>;
79
90
  orderBy(): ODataQueryOptionHandler<T>;
80
91
  top(opts: number): ODataQueryOptionHandler<T>;
@@ -1,7 +1,7 @@
1
- import { Expand, Filter, OrderBy, Select, Transform } from './builder';
2
1
  import { QueryOptionNames } from '../../types';
3
- import { ODataQueryOptionHandler } from './handlers';
2
+ import { Expand, Filter, OrderBy, Select, Transform } from './builder';
4
3
  import { Expression } from './expressions';
4
+ import { ODataQueryOptionHandler } from './handlers';
5
5
  export declare type ODataQueryArguments<T> = {
6
6
  [QueryOptionNames.select]?: Select<T>;
7
7
  [QueryOptionNames.filter]?: Filter<T>;
@@ -22,7 +22,7 @@ export declare class ODataQueryOptions<T> {
22
22
  constructor(options?: {
23
23
  [name: string]: any;
24
24
  });
25
- pathAndParams(): [string, {
25
+ pathAndParams(escape?: boolean): [string, {
26
26
  [name: string]: any;
27
27
  }];
28
28
  toString(): string;
@@ -1,7 +1,7 @@
1
1
  import { HttpHeaders, HttpParams } from '@angular/common/http';
2
2
  import { ODataApi } from '../api';
3
- import { ODataResource } from './resource';
4
3
  import { QueryOptionNames } from '../types';
4
+ import { ODataResource } from './resource';
5
5
  export declare class ODataRequest<T> {
6
6
  readonly api: ODataApi;
7
7
  readonly observe: 'events' | 'response';
@@ -1,18 +1,26 @@
1
1
  import { Observable } from 'rxjs';
2
- import { ODataPathSegments, ODataPathSegmentsHandler } from './path';
3
- import { ODataOptions } from './types';
4
2
  import { ODataApi } from '../api';
3
+ import { ODataCollection, ODataModel } from '../models';
4
+ import { ODataStructuredType } from '../schema';
5
+ import { ODataSchemaElement } from '../schema/element';
5
6
  import { OptionsHelper, QueryOptionNames } from '../types';
6
- import { QueryCustomType, ODataQueryOptions, ODataQueryOptionsHandler } from './query';
7
- import { ODataStructuredType, ODataCallable } from '../schema/index';
7
+ import { ODataPathSegments, ODataPathSegmentsHandler } from './path';
8
+ import { ODataQueryOptions, ODataQueryOptionsHandler, QueryCustomType } from './query';
9
+ import { ODataEntitiesAnnotations, ODataEntityAnnotations } from './responses/index';
10
+ import { ODataOptions } from './types';
8
11
  export declare type EntityKey<T> = {
9
12
  readonly [P in keyof T]?: T[P];
10
13
  } | QueryCustomType | string | number;
11
- export declare abstract class ODataResource<T> {
14
+ export declare class ODataResource<T> {
12
15
  api: ODataApi;
16
+ schema?: ODataSchemaElement;
13
17
  protected pathSegments: ODataPathSegments;
14
18
  protected queryOptions: ODataQueryOptions<T>;
15
- constructor(api: ODataApi, segments?: ODataPathSegments, query?: ODataQueryOptions<T>);
19
+ constructor(api: ODataApi, { segments, query, schema, }?: {
20
+ segments?: ODataPathSegments;
21
+ query?: ODataQueryOptions<T>;
22
+ schema?: ODataSchemaElement;
23
+ });
16
24
  /**
17
25
  * @returns string The type of the resource
18
26
  */
@@ -30,17 +38,27 @@ export declare abstract class ODataResource<T> {
30
38
  */
31
39
  hasKey(): boolean;
32
40
  clearKey(): void | undefined;
41
+ asModel<M extends ODataModel<T>>(entity?: Partial<T> | {
42
+ [name: string]: any;
43
+ }, { annots, reset }?: {
44
+ annots?: ODataEntityAnnotations;
45
+ reset?: boolean;
46
+ }): M;
47
+ asCollection<M extends ODataModel<T>, C extends ODataCollection<T, M>>(entities?: Partial<T>[] | {
48
+ [name: string]: any;
49
+ }[], { annots, reset, }?: {
50
+ annots?: ODataEntitiesAnnotations;
51
+ reset?: boolean;
52
+ }): C;
33
53
  isSubtypeOf(other: ODataResource<any>): boolean;
34
- isParentOf(other: ODataResource<any>): boolean;
35
- isChildOf(other: ODataResource<any>): boolean;
54
+ isSupertypeOf(other: ODataResource<any>): boolean;
36
55
  isEqualTo(other: ODataResource<any>, test?: 'path' | 'params'): boolean;
37
- pathAndParams(): [string, {
56
+ pathAndParams(escape?: boolean): [string, {
38
57
  [name: string]: any;
39
58
  }];
40
59
  endpointUrl(params?: boolean): string;
41
60
  toString(): string;
42
- abstract clone(): ODataResource<T>;
43
- abstract schema(): ODataStructuredType<T> | ODataCallable<T> | undefined;
61
+ clone(): ODataResource<T>;
44
62
  deserialize(value: any, options?: OptionsHelper): any;
45
63
  serialize(value: any, options?: OptionsHelper): any;
46
64
  encode(value: any, options?: OptionsHelper): any;
@@ -64,7 +82,7 @@ export declare abstract class ODataResource<T> {
64
82
  * @param f Function context for handle the query options
65
83
  */
66
84
  query(f: (q: ODataQueryOptionsHandler<T>) => void): this;
67
- static resolveKey<T>(value: any, schema?: ODataStructuredType<T> | ODataCallable<T>): EntityKey<T> | undefined;
85
+ static resolveKey<T>(value: any, schema?: ODataStructuredType<T>): EntityKey<T> | undefined;
68
86
  protected resolveKey(value: any): EntityKey<T> | undefined;
69
87
  protected request(method: string, options: ODataOptions & {
70
88
  body?: any;
@@ -1,28 +1,22 @@
1
- import { ODataCollection, ODataModel } from '../../models';
2
- import { ODataEntities, ODataEntitiesAnnotations, ODataEntity, ODataEntityAnnotations, ODataProperty } from '../responses';
3
- import { ODataEntitiesOptions, ODataEntityOptions, ODataNoneOptions, ODataOptions, ODataPropertyOptions } from './options';
1
+ import { Observable } from 'rxjs';
4
2
  import { ODataApi } from '../../api';
3
+ import { ODataCollection, ODataModel } from '../../models';
4
+ import { ODataCallable } from '../../schema/callable';
5
5
  import { ODataPathSegments } from '../path';
6
6
  import { ODataQueryOptions } from '../query';
7
7
  import { ODataResource } from '../resource';
8
- import { Observable } from 'rxjs';
8
+ import { ODataEntities, ODataEntity, ODataProperty } from '../responses';
9
+ import { ODataEntitiesOptions, ODataEntityOptions, ODataNoneOptions, ODataOptions, ODataPropertyOptions } from './options';
9
10
  export declare class ODataActionResource<P, R> extends ODataResource<R> {
10
- static factory<P, R>(api: ODataApi, path: string, type: string | undefined, segments: ODataPathSegments, query: ODataQueryOptions<R>): ODataActionResource<P, R>;
11
+ static factory<P, R>(api: ODataApi, { path, schema, segments, query, }: {
12
+ path?: string;
13
+ schema?: ODataCallable<R>;
14
+ segments?: ODataPathSegments;
15
+ query?: ODataQueryOptions<R>;
16
+ }): ODataActionResource<P, R>;
17
+ static fromResource<P, R>(resource: ODataResource<any>, path: string): ODataActionResource<P, R>;
11
18
  clone(): ODataActionResource<P, R>;
12
- schema(): import("angular-odata").ODataCallable<R> | undefined;
13
19
  returnType(): string | undefined;
14
- asModel<M extends ODataModel<R>>(entity: Partial<R> | {
15
- [name: string]: any;
16
- }, { annots, reset }?: {
17
- annots?: ODataEntityAnnotations;
18
- reset?: boolean;
19
- }): M;
20
- asCollection<M extends ODataModel<R>, C extends ODataCollection<R, M>>(entities: Partial<R>[] | {
21
- [name: string]: any;
22
- }[], { annots, reset, }?: {
23
- annots?: ODataEntitiesAnnotations;
24
- reset?: boolean;
25
- }): C;
26
20
  protected post(params: P | null, options?: ODataEntityOptions & ODataEntitiesOptions & ODataPropertyOptions): Observable<any>;
27
21
  /**
28
22
  * Execute the action
@@ -1,9 +1,9 @@
1
1
  import { Observable, Subject } from 'rxjs';
2
2
  import { ODataApi } from '../../api';
3
- import { ODataOptions } from './options';
4
3
  import { ODataRequest } from '../request';
5
4
  import { ODataResource } from '../resource';
6
5
  import { ODataResponse } from '../responses';
6
+ import { ODataOptions } from './options';
7
7
  export declare class ODataBatchRequest<T> extends Subject<ODataResponse<T>> {
8
8
  request: ODataRequest<any>;
9
9
  constructor(request: ODataRequest<any>);
@@ -26,7 +26,15 @@ export declare class ODataBatchResource extends ODataResource<any> {
26
26
  requests(): ODataRequest<any>[];
27
27
  static factory(api: ODataApi): ODataBatchResource;
28
28
  clone(): ODataBatchResource;
29
- schema(): undefined;
29
+ private storeRequester;
30
+ private restoreRequester;
31
+ /**
32
+ * Add to batch request
33
+ * @param ctx The context for the request
34
+ * @returns The result of execute the context
35
+ */
36
+ add<R>(ctx: (batch: this) => Observable<R>): Observable<R>;
37
+ send(options?: ODataOptions): void;
30
38
  /**
31
39
  * Execute the batch request
32
40
  * @param ctx The context for the request
@@ -1,13 +1,15 @@
1
+ import { Observable } from 'rxjs';
1
2
  import { ODataApi } from '../../api';
2
- import { ODataOptions } from './options';
3
3
  import { ODataPathSegments } from '../path';
4
4
  import { ODataQueryOptions } from '../query';
5
5
  import { ODataResource } from '../resource';
6
- import { Observable } from 'rxjs';
6
+ import { ODataOptions } from './options';
7
7
  export declare class ODataCountResource<T> extends ODataResource<T> {
8
- static factory<T>(api: ODataApi, segments: ODataPathSegments, query: ODataQueryOptions<T>): ODataCountResource<T>;
8
+ static factory<T>(api: ODataApi, { segments, query, }: {
9
+ segments: ODataPathSegments;
10
+ query?: ODataQueryOptions<T>;
11
+ }): ODataCountResource<T>;
9
12
  clone(): ODataCountResource<T>;
10
- schema(): undefined;
11
13
  protected get(options?: ODataOptions): Observable<number>;
12
14
  /**
13
15
  * Fetch the count of the set.