angular-odata 0.128.0 → 0.131.0

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 (246) hide show
  1. package/README.md +27 -244
  2. package/fesm2022/angular-odata.mjs +2320 -1118
  3. package/fesm2022/angular-odata.mjs.map +1 -1
  4. package/lib/api.d.ts +10 -11
  5. package/lib/cache/cache.d.ts +2 -2
  6. package/lib/cache/memory.d.ts +2 -2
  7. package/lib/cache/storage.d.ts +2 -2
  8. package/lib/index.d.ts +1 -0
  9. package/lib/loaders.d.ts +8 -8
  10. package/lib/metadata/csdl/csdl-annotation.d.ts +62 -26
  11. package/lib/metadata/csdl/csdl-entity-container.d.ts +8 -3
  12. package/lib/metadata/csdl/csdl-entity-set.d.ts +7 -2
  13. package/lib/metadata/csdl/csdl-enum-type.d.ts +11 -3
  14. package/lib/metadata/csdl/csdl-function-action.d.ts +54 -11
  15. package/lib/metadata/csdl/csdl-navigation-property-binding.d.ts +4 -0
  16. package/lib/metadata/csdl/csdl-reference.d.ts +26 -3
  17. package/lib/metadata/csdl/csdl-schema.d.ts +5 -2
  18. package/lib/metadata/csdl/csdl-singleton.d.ts +5 -0
  19. package/lib/metadata/csdl/csdl-structural-property.d.ts +19 -3
  20. package/lib/metadata/csdl/csdl-structured-type.d.ts +28 -7
  21. package/lib/metadata/csdl/csdl-type-definition.d.ts +3 -0
  22. package/lib/metadata/metadata.d.ts +16 -3
  23. package/lib/models/collection.d.ts +2 -1
  24. package/lib/models/model.d.ts +6 -5
  25. package/lib/models/options.d.ts +11 -4
  26. package/lib/module.d.ts +3 -3
  27. package/lib/options.d.ts +3 -3
  28. package/lib/resources/path/segments.d.ts +3 -3
  29. package/lib/resources/query/builder.d.ts +3 -2
  30. package/lib/resources/query/expressions/apply.d.ts +1 -1
  31. package/lib/resources/query/expressions/compute.d.ts +1 -1
  32. package/lib/resources/query/expressions/count.d.ts +1 -1
  33. package/lib/resources/query/expressions/expand.d.ts +5 -2
  34. package/lib/resources/query/expressions/filter.d.ts +2 -1
  35. package/lib/resources/query/expressions/orderby.d.ts +2 -1
  36. package/lib/resources/query/expressions/search.d.ts +2 -1
  37. package/lib/resources/query/expressions/select.d.ts +2 -1
  38. package/lib/resources/query/expressions/syntax.d.ts +2 -2
  39. package/lib/resources/query/handlers.d.ts +17 -5
  40. package/lib/resources/query/options.d.ts +3 -3
  41. package/lib/resources/resource.d.ts +36 -8
  42. package/lib/resources/types/action.d.ts +4 -4
  43. package/lib/resources/types/entity-set.d.ts +15 -8
  44. package/lib/resources/types/entity.d.ts +5 -1
  45. package/lib/resources/types/function.d.ts +4 -4
  46. package/lib/resources/types/navigation-property.d.ts +12 -3
  47. package/lib/resources/types/property.d.ts +14 -3
  48. package/lib/resources/types/singleton.d.ts +5 -1
  49. package/lib/schema/annotation.d.ts +3 -3
  50. package/lib/schema/callable.d.ts +3 -3
  51. package/lib/schema/element.d.ts +3 -3
  52. package/lib/schema/entity-container.d.ts +2 -2
  53. package/lib/schema/entity-set.d.ts +2 -2
  54. package/lib/schema/enum-type.d.ts +10 -10
  55. package/lib/schema/parsers/callable.d.ts +4 -4
  56. package/lib/schema/parsers/enum-type.d.ts +15 -15
  57. package/lib/schema/parsers/structured-type.d.ts +8 -5
  58. package/lib/schema/schema.d.ts +3 -3
  59. package/lib/schema/singleton.d.ts +2 -2
  60. package/lib/schema/structured-type.d.ts +7 -4
  61. package/lib/services/entity-set.d.ts +9 -6
  62. package/lib/services/entity.d.ts +1 -1
  63. package/lib/services/singleton.d.ts +1 -1
  64. package/lib/settings.d.ts +2 -2
  65. package/lib/types.d.ts +82 -69
  66. package/lib/utils/enums.d.ts +12 -12
  67. package/lib/utils/http.d.ts +1 -1
  68. package/lib/utils/objects.d.ts +1 -1
  69. package/lib/utils/odata.d.ts +2 -2
  70. package/lib/utils/strings.d.ts +2 -2
  71. package/package.json +3 -5
  72. package/schematics/apigen/angular/api-config.js +7 -1
  73. package/schematics/apigen/angular/api-config.js.map +1 -1
  74. package/schematics/apigen/angular/base.d.ts +22 -2
  75. package/schematics/apigen/angular/base.js +82 -42
  76. package/schematics/apigen/angular/base.js.map +1 -1
  77. package/schematics/apigen/angular/entity.js +7 -1
  78. package/schematics/apigen/angular/entity.js.map +1 -1
  79. package/schematics/apigen/angular/enum.js +1 -0
  80. package/schematics/apigen/angular/enum.js.map +1 -1
  81. package/schematics/apigen/angular/module.js.map +1 -1
  82. package/schematics/apigen/angular/service.js +3 -2
  83. package/schematics/apigen/angular/service.js.map +1 -1
  84. package/schematics/apigen/files/api-config/__fileName__.ts +8 -6
  85. package/schematics/apigen/files/entity/__fileName__.ts +2 -2
  86. package/schematics/apigen/files/entitycontainer-service/__fileName__.ts +1 -1
  87. package/schematics/apigen/files/entityset-service/__fileName__.ts +1 -1
  88. package/schematics/apigen/files/enum/__fileName__.ts +1 -1
  89. package/schematics/apigen/files/metadata/metadata.json +1 -0
  90. package/schematics/apigen/files/singleton-service/__fileName__.ts +1 -1
  91. package/schematics/apigen/index.js +56 -12
  92. package/schematics/apigen/index.js.map +1 -1
  93. package/schematics/apigen/metadata/csdl/csdl-annotation.d.ts +56 -23
  94. package/schematics/apigen/metadata/csdl/csdl-annotation.js +143 -13
  95. package/schematics/apigen/metadata/csdl/csdl-annotation.js.map +1 -1
  96. package/schematics/apigen/metadata/csdl/csdl-entity-container.d.ts +3 -0
  97. package/schematics/apigen/metadata/csdl/csdl-entity-container.js +19 -0
  98. package/schematics/apigen/metadata/csdl/csdl-entity-container.js.map +1 -1
  99. package/schematics/apigen/metadata/csdl/csdl-entity-set.d.ts +3 -0
  100. package/schematics/apigen/metadata/csdl/csdl-entity-set.js +11 -0
  101. package/schematics/apigen/metadata/csdl/csdl-entity-set.js.map +1 -1
  102. package/schematics/apigen/metadata/csdl/csdl-enum-type.d.ts +6 -0
  103. package/schematics/apigen/metadata/csdl/csdl-enum-type.js +17 -0
  104. package/schematics/apigen/metadata/csdl/csdl-enum-type.js.map +1 -1
  105. package/schematics/apigen/metadata/csdl/csdl-function-action.d.ts +37 -0
  106. package/schematics/apigen/metadata/csdl/csdl-function-action.js +52 -0
  107. package/schematics/apigen/metadata/csdl/csdl-function-action.js.map +1 -1
  108. package/schematics/apigen/metadata/csdl/csdl-navigation-property-binding.d.ts +4 -0
  109. package/schematics/apigen/metadata/csdl/csdl-navigation-property-binding.js +6 -0
  110. package/schematics/apigen/metadata/csdl/csdl-navigation-property-binding.js.map +1 -1
  111. package/schematics/apigen/metadata/csdl/csdl-reference.d.ts +15 -3
  112. package/schematics/apigen/metadata/csdl/csdl-reference.js +26 -2
  113. package/schematics/apigen/metadata/csdl/csdl-reference.js.map +1 -1
  114. package/schematics/apigen/metadata/csdl/csdl-schema.d.ts +3 -0
  115. package/schematics/apigen/metadata/csdl/csdl-schema.js +37 -0
  116. package/schematics/apigen/metadata/csdl/csdl-schema.js.map +1 -1
  117. package/schematics/apigen/metadata/csdl/csdl-singleton.d.ts +3 -0
  118. package/schematics/apigen/metadata/csdl/csdl-singleton.js +8 -0
  119. package/schematics/apigen/metadata/csdl/csdl-singleton.js.map +1 -1
  120. package/schematics/apigen/metadata/csdl/csdl-structural-property.d.ts +16 -0
  121. package/schematics/apigen/metadata/csdl/csdl-structural-property.js +53 -0
  122. package/schematics/apigen/metadata/csdl/csdl-structural-property.js.map +1 -1
  123. package/schematics/apigen/metadata/csdl/csdl-structured-type.d.ts +22 -3
  124. package/schematics/apigen/metadata/csdl/csdl-structured-type.js +47 -2
  125. package/schematics/apigen/metadata/csdl/csdl-structured-type.js.map +1 -1
  126. package/schematics/apigen/metadata/csdl/csdl-type-definition.d.ts +3 -0
  127. package/schematics/apigen/metadata/csdl/csdl-type-definition.js +19 -0
  128. package/schematics/apigen/metadata/csdl/csdl-type-definition.js.map +1 -1
  129. package/schematics/apigen/metadata/metadata.d.ts +10 -0
  130. package/schematics/apigen/metadata/metadata.js +12 -6
  131. package/schematics/apigen/metadata/metadata.js.map +1 -1
  132. package/schematics/apigen/metadata/parser.js.map +1 -1
  133. package/schematics/apigen/schema.d.ts +2 -1
  134. package/schematics/apigen/schema.json +15 -14
  135. package/schematics/apigen/utils.d.ts +1 -0
  136. package/schematics/apigen/utils.js +25 -1
  137. package/schematics/apigen/utils.js.map +1 -1
  138. package/schematics/ng-add/index.js +1 -2
  139. package/schematics/ng-add/index.js.map +1 -1
  140. package/esm2022/angular-odata.mjs +0 -5
  141. package/esm2022/lib/annotations.mjs +0 -140
  142. package/esm2022/lib/api.mjs +0 -419
  143. package/esm2022/lib/cache/cache.mjs +0 -175
  144. package/esm2022/lib/cache/index.mjs +0 -4
  145. package/esm2022/lib/cache/memory.mjs +0 -30
  146. package/esm2022/lib/cache/storage.mjs +0 -55
  147. package/esm2022/lib/client.mjs +0 -212
  148. package/esm2022/lib/constants.mjs +0 -95
  149. package/esm2022/lib/helper.mjs +0 -280
  150. package/esm2022/lib/index.mjs +0 -21
  151. package/esm2022/lib/loaders.mjs +0 -39
  152. package/esm2022/lib/metadata/csdl/csdl-annotation.mjs +0 -95
  153. package/esm2022/lib/metadata/csdl/csdl-entity-container.mjs +0 -27
  154. package/esm2022/lib/metadata/csdl/csdl-entity-set.mjs +0 -24
  155. package/esm2022/lib/metadata/csdl/csdl-enum-type.mjs +0 -37
  156. package/esm2022/lib/metadata/csdl/csdl-function-action.mjs +0 -94
  157. package/esm2022/lib/metadata/csdl/csdl-navigation-property-binding.mjs +0 -7
  158. package/esm2022/lib/metadata/csdl/csdl-reference.mjs +0 -23
  159. package/esm2022/lib/metadata/csdl/csdl-schema.mjs +0 -39
  160. package/esm2022/lib/metadata/csdl/csdl-singleton.mjs +0 -15
  161. package/esm2022/lib/metadata/csdl/csdl-structural-property.mjs +0 -70
  162. package/esm2022/lib/metadata/csdl/csdl-structured-type.mjs +0 -92
  163. package/esm2022/lib/metadata/csdl/csdl-type-definition.mjs +0 -15
  164. package/esm2022/lib/metadata/index.mjs +0 -3
  165. package/esm2022/lib/metadata/metadata.mjs +0 -14
  166. package/esm2022/lib/metadata/parser.mjs +0 -563
  167. package/esm2022/lib/models/collection.mjs +0 -814
  168. package/esm2022/lib/models/index.mjs +0 -4
  169. package/esm2022/lib/models/model.mjs +0 -553
  170. package/esm2022/lib/models/options.mjs +0 -1179
  171. package/esm2022/lib/module.mjs +0 -55
  172. package/esm2022/lib/options.mjs +0 -36
  173. package/esm2022/lib/resources/index.mjs +0 -7
  174. package/esm2022/lib/resources/options.mjs +0 -56
  175. package/esm2022/lib/resources/path/handlers.mjs +0 -79
  176. package/esm2022/lib/resources/path/index.mjs +0 -3
  177. package/esm2022/lib/resources/path/segments.mjs +0 -148
  178. package/esm2022/lib/resources/query/builder.mjs +0 -636
  179. package/esm2022/lib/resources/query/expressions/apply.mjs +0 -236
  180. package/esm2022/lib/resources/query/expressions/base.mjs +0 -25
  181. package/esm2022/lib/resources/query/expressions/compute.mjs +0 -54
  182. package/esm2022/lib/resources/query/expressions/count.mjs +0 -116
  183. package/esm2022/lib/resources/query/expressions/expand.mjs +0 -147
  184. package/esm2022/lib/resources/query/expressions/filter.mjs +0 -178
  185. package/esm2022/lib/resources/query/expressions/index.mjs +0 -10
  186. package/esm2022/lib/resources/query/expressions/orderby.mjs +0 -79
  187. package/esm2022/lib/resources/query/expressions/search.mjs +0 -141
  188. package/esm2022/lib/resources/query/expressions/select.mjs +0 -47
  189. package/esm2022/lib/resources/query/expressions/syntax.mjs +0 -751
  190. package/esm2022/lib/resources/query/handlers.mjs +0 -420
  191. package/esm2022/lib/resources/query/index.mjs +0 -5
  192. package/esm2022/lib/resources/query/options.mjs +0 -139
  193. package/esm2022/lib/resources/request.mjs +0 -196
  194. package/esm2022/lib/resources/resource.mjs +0 -311
  195. package/esm2022/lib/resources/response.mjs +0 -174
  196. package/esm2022/lib/resources/types/action.mjs +0 -116
  197. package/esm2022/lib/resources/types/batch.mjs +0 -428
  198. package/esm2022/lib/resources/types/count.mjs +0 -33
  199. package/esm2022/lib/resources/types/entity-set.mjs +0 -131
  200. package/esm2022/lib/resources/types/entity.mjs +0 -112
  201. package/esm2022/lib/resources/types/function.mjs +0 -146
  202. package/esm2022/lib/resources/types/index.mjs +0 -15
  203. package/esm2022/lib/resources/types/media.mjs +0 -44
  204. package/esm2022/lib/resources/types/metadata.mjs +0 -35
  205. package/esm2022/lib/resources/types/navigation-property.mjs +0 -256
  206. package/esm2022/lib/resources/types/options.mjs +0 -2
  207. package/esm2022/lib/resources/types/property.mjs +0 -197
  208. package/esm2022/lib/resources/types/reference.mjs +0 -87
  209. package/esm2022/lib/resources/types/singleton.mjs +0 -130
  210. package/esm2022/lib/resources/types/value.mjs +0 -48
  211. package/esm2022/lib/schema/annotation.mjs +0 -37
  212. package/esm2022/lib/schema/callable.mjs +0 -66
  213. package/esm2022/lib/schema/element.mjs +0 -67
  214. package/esm2022/lib/schema/entity-container.mjs +0 -11
  215. package/esm2022/lib/schema/entity-set.mjs +0 -9
  216. package/esm2022/lib/schema/enum-type.mjs +0 -68
  217. package/esm2022/lib/schema/index.mjs +0 -9
  218. package/esm2022/lib/schema/parsers/callable.mjs +0 -110
  219. package/esm2022/lib/schema/parsers/edm.mjs +0 -101
  220. package/esm2022/lib/schema/parsers/enum-type.mjs +0 -130
  221. package/esm2022/lib/schema/parsers/index.mjs +0 -5
  222. package/esm2022/lib/schema/parsers/structured-type.mjs +0 -514
  223. package/esm2022/lib/schema/schema.mjs +0 -45
  224. package/esm2022/lib/schema/singleton.mjs +0 -9
  225. package/esm2022/lib/schema/structured-type.mjs +0 -213
  226. package/esm2022/lib/services/base.mjs +0 -29
  227. package/esm2022/lib/services/entity-set.mjs +0 -155
  228. package/esm2022/lib/services/entity.mjs +0 -12
  229. package/esm2022/lib/services/factory.mjs +0 -44
  230. package/esm2022/lib/services/index.mjs +0 -5
  231. package/esm2022/lib/services/singleton.mjs +0 -54
  232. package/esm2022/lib/settings.mjs +0 -112
  233. package/esm2022/lib/types.mjs +0 -118
  234. package/esm2022/lib/utils/arraybuffers.mjs +0 -46
  235. package/esm2022/lib/utils/arrays.mjs +0 -10
  236. package/esm2022/lib/utils/dates.mjs +0 -18
  237. package/esm2022/lib/utils/durations.mjs +0 -40
  238. package/esm2022/lib/utils/enums.mjs +0 -61
  239. package/esm2022/lib/utils/http.mjs +0 -95
  240. package/esm2022/lib/utils/index.mjs +0 -10
  241. package/esm2022/lib/utils/objects.mjs +0 -204
  242. package/esm2022/lib/utils/odata.mjs +0 -22
  243. package/esm2022/lib/utils/strings.mjs +0 -20
  244. package/esm2022/lib/utils/types.mjs +0 -136
  245. package/esm2022/lib/utils/urls.mjs +0 -24
  246. package/esm2022/public-api.mjs +0 -5
@@ -1,7 +1,7 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { ODataApi } from '../../api';
3
- import { ODataCollection, ODataModel } from '../../models';
4
- import { QueryOption, StructuredTypeFieldConfig } from '../../types';
3
+ import type { ModelInterface, ODataCollection, ODataModel } from '../../models';
4
+ import { QueryOption, ODataStructuredTypeFieldConfig } from '../../types';
5
5
  import { ApplyExpression, ApplyExpressionBuilder, ODataQueryOptions } from '../query';
6
6
  import { ODataResource } from '../resource';
7
7
  import { ODataActionResource } from './action';
@@ -10,7 +10,6 @@ import { ODataEntityResource } from './entity';
10
10
  import { ODataFunctionResource } from './function';
11
11
  import { ODataOptions } from './options';
12
12
  import { ODataEntities, ODataEntity } from '../response';
13
- import { ODataEntitiesAnnotations } from '../../annotations';
14
13
  export declare class ODataEntitySetResource<T> extends ODataResource<T> {
15
14
  static factory<E>(api: ODataApi, { path, type, query, }: {
16
15
  path: string;
@@ -21,7 +20,7 @@ export declare class ODataEntitySetResource<T> extends ODataResource<T> {
21
20
  transform<R>(opts: (builder: ApplyExpressionBuilder<T>, current?: ApplyExpression<T>) => ApplyExpression<T>, { type, fields, }?: {
22
21
  type?: string;
23
22
  fields?: {
24
- [P in keyof R]?: StructuredTypeFieldConfig;
23
+ [name: string]: ODataStructuredTypeFieldConfig;
25
24
  };
26
25
  }): ODataEntitySetResource<R>;
27
26
  entity(key?: any): ODataEntityResource<T>;
@@ -43,27 +42,35 @@ export declare class ODataEntitySetResource<T> extends ODataResource<T> {
43
42
  withCount?: boolean;
44
43
  bodyQueryOptions?: QueryOption[];
45
44
  }): Observable<{
46
- entities: T[];
47
- annots: ODataEntitiesAnnotations<T>;
45
+ entities: any[];
46
+ annots: import("angular-odata").ODataEntitiesAnnotations<any>;
48
47
  }>;
49
48
  fetchMany(top: number, options?: ODataOptions & {
50
49
  withCount?: boolean;
51
50
  bodyQueryOptions?: QueryOption[];
52
51
  }): Observable<{
53
52
  entities: T[];
54
- annots: ODataEntitiesAnnotations<T>;
53
+ annots: import("angular-odata").ODataEntitiesAnnotations<T>;
54
+ } | {
55
+ entities: T[];
56
+ annots: import("angular-odata").ODataEntitiesAnnotations<any>;
55
57
  }>;
56
58
  fetchOne(options?: ODataOptions & {
57
59
  withCount?: boolean;
58
60
  bodyQueryOptions?: QueryOption[];
59
61
  }): Observable<{
60
62
  entity: T | null;
61
- annots: ODataEntitiesAnnotations<T>;
63
+ annots: import("angular-odata").ODataEntitiesAnnotations<T>;
62
64
  }>;
63
65
  fetchEntities(options?: ODataOptions & {
64
66
  withCount?: boolean;
65
67
  bodyQueryOptions?: QueryOption[];
66
68
  }): Observable<T[] | null>;
69
+ fetchCollection(options?: ODataOptions & {
70
+ withCount?: boolean;
71
+ bodyQueryOptions?: QueryOption[];
72
+ CollectionType?: typeof ODataCollection;
73
+ }): Observable<ODataCollection<T, ODataModel<T> & ModelInterface<T>> | null>;
67
74
  fetchCollection<M extends ODataModel<T>, C extends ODataCollection<T, M>>(options?: ODataOptions & {
68
75
  withCount?: boolean;
69
76
  bodyQueryOptions?: QueryOption[];
@@ -1,6 +1,6 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { ODataApi } from '../../api';
3
- import { ODataModel } from '../../models';
3
+ import { ModelInterface, ODataModel } from '../../models';
4
4
  import { QueryOption } from '../../types';
5
5
  import { ODataPathSegments } from '../path';
6
6
  import { ODataQueryOptions } from '../query';
@@ -43,6 +43,10 @@ export declare class ODataEntityResource<T> extends ODataResource<T> {
43
43
  fetchEntity(options?: ODataOptions & {
44
44
  bodyQueryOptions?: QueryOption[];
45
45
  }): Observable<T | null>;
46
+ fetchModel(options?: ODataOptions & {
47
+ bodyQueryOptions?: QueryOption[];
48
+ ModelType?: typeof ODataModel;
49
+ }): Observable<(ODataModel<T> & ModelInterface<T>) | null>;
46
50
  fetchModel<M extends ODataModel<T>>(options?: ODataOptions & {
47
51
  bodyQueryOptions?: QueryOption[];
48
52
  ModelType?: typeof ODataModel;
@@ -74,10 +74,10 @@ export declare class ODataFunctionResource<P, R> extends ODataResource<R> {
74
74
  * @param options Options for the request
75
75
  * @returns Observable of the result of the function
76
76
  */
77
- callModel<M extends ODataModel<R>>(params: P | null, { alias, ModelType, ...options }?: ODataOptions & {
77
+ callModel(params: P | null, { alias, ModelType, ...options }?: ODataOptions & {
78
78
  alias?: boolean;
79
79
  ModelType?: typeof ODataModel;
80
- }): Observable<M | null>;
80
+ }): Observable<(ODataModel<R> & import("angular-odata").ModelInterface<R>) | null>;
81
81
  /**
82
82
  * Execute the function with the given parameters and return the result as a entities
83
83
  * @param params Parameters to be sent to the function
@@ -95,10 +95,10 @@ export declare class ODataFunctionResource<P, R> extends ODataResource<R> {
95
95
  * @param options Options for the request
96
96
  * @returns Observable of the result of the function
97
97
  */
98
- callCollection<M extends ODataModel<R>, C extends ODataCollection<R, M>>(params: P | null, { alias, CollectionType, ...options }?: {
98
+ callCollection(params: P | null, { alias, CollectionType, ...options }?: {
99
99
  alias?: boolean;
100
100
  CollectionType?: typeof ODataCollection;
101
- } & ODataOptions): Observable<C | null>;
101
+ } & ODataOptions): Observable<ODataCollection<R, ODataModel<R> & import("angular-odata").ModelInterface<R>> | null>;
102
102
  callArraybuffer(params: P | null, { alias, ...options }?: {
103
103
  alias?: boolean;
104
104
  } & ODataOptions): Observable<ArrayBuffer>;
@@ -1,7 +1,7 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { ODataApi } from '../../api';
3
- import { ODataCollection, ODataModel } from '../../models';
4
- import { QueryOption, StructuredTypeFieldConfig } from '../../types';
3
+ import type { ModelInterface, ODataCollection, ODataModel } from '../../models';
4
+ import { QueryOption, ODataStructuredTypeFieldConfig } from '../../types';
5
5
  import { ODataPathSegments } from '../path';
6
6
  import { ApplyExpression, ApplyExpressionBuilder } from '../query';
7
7
  import { ODataResource } from '../resource';
@@ -28,7 +28,7 @@ export declare class ODataNavigationPropertyResource<T> extends ODataResource<T>
28
28
  transform<R>(opts: (builder: ApplyExpressionBuilder<T>, current?: ApplyExpression<T>) => ApplyExpression<T>, { type, fields, }?: {
29
29
  type?: string;
30
30
  fields?: {
31
- [P in keyof R]?: StructuredTypeFieldConfig;
31
+ [name: string]: ODataStructuredTypeFieldConfig;
32
32
  };
33
33
  }): ODataNavigationPropertyResource<R>;
34
34
  key(value: any): ODataNavigationPropertyResource<T>;
@@ -97,6 +97,10 @@ export declare class ODataNavigationPropertyResource<T> extends ODataResource<T>
97
97
  * @param options Options for the request
98
98
  * @returns The model
99
99
  */
100
+ fetchModel(options?: ODataOptions & {
101
+ bodyQueryOptions?: QueryOption[];
102
+ ModelType?: typeof ODataModel;
103
+ }): Observable<(ODataModel<T> & ModelInterface<T>) | null>;
100
104
  fetchModel<M extends ODataModel<T>>(options?: ODataOptions & {
101
105
  bodyQueryOptions?: QueryOption[];
102
106
  ModelType?: typeof ODataModel;
@@ -114,6 +118,11 @@ export declare class ODataNavigationPropertyResource<T> extends ODataResource<T>
114
118
  * @param options Options for the request
115
119
  * @returns The collection
116
120
  */
121
+ fetchCollection(options?: ODataOptions & {
122
+ withCount?: boolean;
123
+ bodyQueryOptions?: QueryOption[];
124
+ CollectionType?: typeof ODataCollection;
125
+ }): Observable<ODataCollection<T, ODataModel<T> & ModelInterface<T>> | null>;
117
126
  fetchCollection<M extends ODataModel<T>, C extends ODataCollection<T, M>>(options?: ODataOptions & {
118
127
  withCount?: boolean;
119
128
  bodyQueryOptions?: QueryOption[];
@@ -1,7 +1,7 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { ODataApi } from '../../api';
3
- import { ODataCollection, ODataModel } from '../../models';
4
- import { QueryOption, StructuredTypeFieldConfig } from '../../types';
3
+ import type { ModelInterface, ODataCollection, ODataModel } from '../../models';
4
+ import { QueryOption, ODataStructuredTypeFieldConfig } from '../../types';
5
5
  import { ODataPathSegments } from '../path';
6
6
  import { ApplyExpression, ApplyExpressionBuilder } from '../query';
7
7
  import { ODataResource } from '../resource';
@@ -21,7 +21,7 @@ export declare class ODataPropertyResource<T> extends ODataResource<T> {
21
21
  transform<R>(opts: (builder: ApplyExpressionBuilder<T>, current?: ApplyExpression<T>) => ApplyExpression<T>, { type, fields, }?: {
22
22
  type?: string;
23
23
  fields?: {
24
- [P in keyof R]?: StructuredTypeFieldConfig;
24
+ [name: string]: ODataStructuredTypeFieldConfig;
25
25
  };
26
26
  }): ODataPropertyResource<R>;
27
27
  key(value: any): ODataPropertyResource<T>;
@@ -55,7 +55,12 @@ export declare class ODataPropertyResource<T> extends ODataResource<T> {
55
55
  * @param options Options for the request
56
56
  * @returns The model
57
57
  */
58
+ fetchModel(options?: ODataOptions & {
59
+ bodyQueryOptions?: QueryOption[];
60
+ ModelType?: typeof ODataModel;
61
+ }): Observable<(ODataModel<T> & ModelInterface<T>) | null>;
58
62
  fetchModel<M extends ODataModel<T>>(options?: ODataOptions & {
63
+ bodyQueryOptions?: QueryOption[];
59
64
  ModelType?: typeof ODataModel;
60
65
  }): Observable<M | null>;
61
66
  /**
@@ -71,8 +76,14 @@ export declare class ODataPropertyResource<T> extends ODataResource<T> {
71
76
  * @param options Options for the request
72
77
  * @returns The collection
73
78
  */
79
+ fetchCollection(options?: ODataOptions & {
80
+ withCount?: boolean;
81
+ bodyQueryOptions?: QueryOption[];
82
+ CollectionType?: typeof ODataCollection;
83
+ }): Observable<ODataCollection<T, ODataModel<T> & ModelInterface<T>> | null>;
74
84
  fetchCollection<M extends ODataModel<T>, C extends ODataCollection<T, M>>(options?: ODataOptions & {
75
85
  withCount?: boolean;
86
+ bodyQueryOptions?: QueryOption[];
76
87
  CollectionType?: typeof ODataCollection;
77
88
  }): Observable<C | null>;
78
89
  fetchOne(options?: ODataOptions & {
@@ -1,6 +1,6 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { ODataApi } from '../../api';
3
- import { ODataModel } from '../../models';
3
+ import { ModelInterface, ODataModel } from '../../models';
4
4
  import { QueryOption } from '../../types';
5
5
  import { ODataResource } from '../resource';
6
6
  import { ODataEntity } from '../response';
@@ -76,6 +76,10 @@ export declare class ODataSingletonResource<T> extends ODataResource<T> {
76
76
  * @param options The options for the request.
77
77
  * @returns Observable of the entity.
78
78
  */
79
+ fetchModel(options?: ODataOptions & {
80
+ bodyQueryOptions?: QueryOption[];
81
+ ModelType?: typeof ODataModel;
82
+ }): Observable<(ODataModel<T> & ModelInterface<T>) | null>;
79
83
  fetchModel<M extends ODataModel<T>>(options?: ODataOptions & {
80
84
  bodyQueryOptions?: QueryOption[];
81
85
  ModelType?: typeof ODataModel;
@@ -1,4 +1,4 @@
1
- import { AnnotationConfig } from '../types';
1
+ import { ODataAnnotationConfig } from '../types';
2
2
  export declare class ODataAnnotation {
3
3
  term: string;
4
4
  string?: string;
@@ -6,12 +6,12 @@ export declare class ODataAnnotation {
6
6
  int?: number;
7
7
  permissions?: string[];
8
8
  properties?: string[];
9
- constructor(annot: AnnotationConfig);
9
+ constructor(annot: ODataAnnotationConfig);
10
10
  }
11
11
  export declare class ODataAnnotatable {
12
12
  annotations: ODataAnnotation[];
13
13
  constructor(config: {
14
- annotations?: AnnotationConfig[];
14
+ annotations?: ODataAnnotationConfig[];
15
15
  });
16
16
  /**
17
17
  * Find an annotation inside the annotatable.
@@ -1,4 +1,4 @@
1
- import { CallableConfig, ParserOptions } from '../types';
1
+ import { ODataCallableConfig, ParserOptions } from '../types';
2
2
  import { ODataParserSchemaElement } from './element';
3
3
  import { ODataCallableParser } from './parsers';
4
4
  import { ODataSchema } from './schema';
@@ -6,7 +6,7 @@ export declare class ODataCallable<R> extends ODataParserSchemaElement<R, ODataC
6
6
  entitySetPath?: string;
7
7
  bound?: boolean;
8
8
  composable?: boolean;
9
- constructor(config: CallableConfig, schema: ODataSchema);
9
+ constructor(config: ODataCallableConfig, schema: ODataSchema);
10
10
  path(): string;
11
11
  configure({ options }: {
12
12
  options: ParserOptions;
@@ -36,6 +36,6 @@ export declare class ODataCallable<R> extends ODataParserSchemaElement<R, ODataC
36
36
  * Returns the binding parameter of the callable.
37
37
  * @returns The binding parameter of the callable.
38
38
  */
39
- binding(): import("./parsers").ODataParameterParser<any> | undefined;
39
+ binding(): import("angular-odata").ODataParameterParser<any> | undefined;
40
40
  returnType(): string | undefined;
41
41
  }
@@ -1,11 +1,11 @@
1
- import { AnnotationConfig, Parser } from '../types';
1
+ import { ODataAnnotationConfig, Parser } from '../types';
2
2
  import { ODataAnnotatable } from './annotation';
3
3
  import { ODataSchema } from './schema';
4
4
  export declare class ODataSchemaElement extends ODataAnnotatable {
5
5
  name: string;
6
6
  schema: ODataSchema;
7
7
  constructor(config: {
8
- annotations?: AnnotationConfig[];
8
+ annotations?: ODataAnnotationConfig[];
9
9
  name: string;
10
10
  }, schema: ODataSchema);
11
11
  get api(): import("angular-odata").ODataApi;
@@ -46,7 +46,7 @@ export declare class ODataSchemaElement extends ODataAnnotatable {
46
46
  export declare class ODataParserSchemaElement<E, P extends Parser<E>> extends ODataSchemaElement {
47
47
  parser: P;
48
48
  constructor(config: {
49
- annotations?: AnnotationConfig[];
49
+ annotations?: ODataAnnotationConfig[];
50
50
  name: string;
51
51
  }, schema: ODataSchema, parser: P);
52
52
  }
@@ -1,4 +1,4 @@
1
- import { EntityContainerConfig } from '../types';
1
+ import { ODataEntityContainerConfig } from '../types';
2
2
  import { ODataSchemaElement } from './element';
3
3
  import { ODataEntitySet } from './entity-set';
4
4
  import { ODataSchema } from './schema';
@@ -6,5 +6,5 @@ import { ODataSingleton } from './singleton';
6
6
  export declare class ODataEntityContainer extends ODataSchemaElement {
7
7
  entitySets: ODataEntitySet[];
8
8
  singletons: ODataSingleton[];
9
- constructor(config: EntityContainerConfig, schema: ODataSchema);
9
+ constructor(config: ODataEntityContainerConfig, schema: ODataSchema);
10
10
  }
@@ -1,4 +1,4 @@
1
- import { EntitySetConfig } from '../types';
1
+ import { ODataEntitySetConfig } from '../types';
2
2
  import { ODataSchemaElement } from './element';
3
3
  import { ODataSchema } from './schema';
4
4
  export declare class ODataEntitySet extends ODataSchemaElement {
@@ -6,5 +6,5 @@ export declare class ODataEntitySet extends ODataSchemaElement {
6
6
  service: {
7
7
  new (...params: any[]): any;
8
8
  };
9
- constructor(config: EntitySetConfig, schema: ODataSchema);
9
+ constructor(config: ODataEntitySetConfig, schema: ODataSchema);
10
10
  }
@@ -1,14 +1,14 @@
1
- import { EnumTypeConfig, ParserOptions } from '../types';
1
+ import { ODataEnumTypeConfig, ParserOptions } from '../types';
2
2
  import { ODataParserSchemaElement } from './element';
3
3
  import { ODataEnumTypeFieldParser, ODataEnumTypeParser } from './parsers';
4
4
  import { ODataSchema } from './schema';
5
5
  export declare class ODataEnumType<E> extends ODataParserSchemaElement<E, ODataEnumTypeParser<E>> {
6
6
  members: {
7
- [name: string]: E;
7
+ [name: string]: number;
8
8
  } | {
9
9
  [value: number]: string;
10
10
  };
11
- constructor(config: EnumTypeConfig<E>, schema: ODataSchema);
11
+ constructor(config: ODataEnumTypeConfig, schema: ODataSchema);
12
12
  configure({ options }: {
13
13
  options: ParserOptions;
14
14
  }): void;
@@ -16,19 +16,19 @@ export declare class ODataEnumType<E> extends ODataParserSchemaElement<E, ODataE
16
16
  * Returns the fields of the enum type.
17
17
  * @returns The fields of the enum type.
18
18
  */
19
- fields(value?: E): ODataEnumTypeFieldParser<E>[];
19
+ fields(namesValue?: string | number): ODataEnumTypeFieldParser[];
20
20
  /**
21
21
  * Find a field by name or value.
22
22
  * @param enu The name or value of the field
23
23
  * @returns The field with the given name or value
24
24
  */
25
- field(enu: string | E): ODataEnumTypeFieldParser<E>;
25
+ field(nameValue: string | number): ODataEnumTypeFieldParser | undefined;
26
26
  /**
27
27
  * Map the fields of the enum type.
28
28
  * @param mapper Function that maps the value to the new value
29
29
  * @returns The fields mapped by the mapper
30
30
  */
31
- mapFields<T>(mapper: (field: ODataEnumTypeFieldParser<E>) => T): T[];
31
+ mapFields<T>(mapper: (field: ODataEnumTypeFieldParser) => T): T[];
32
32
  /**
33
33
  * Deseialize the given value from the enum type.
34
34
  * @param value Value to deserialize
@@ -42,14 +42,14 @@ export declare class ODataEnumType<E> extends ODataParserSchemaElement<E, ODataE
42
42
  * @param options Options for serialization
43
43
  * @returns Serialized value
44
44
  */
45
- serialize(value: E, options?: ParserOptions): any;
45
+ serialize(value: number, options?: ParserOptions): any;
46
46
  /**
47
47
  * Encode the given value for the enum type.
48
48
  * @param value Value to encode
49
49
  * @param options Options for encoding
50
50
  * @returns Encoded value
51
51
  */
52
- encode(value: E, options?: ParserOptions): any;
53
- unpack(value: E): number[];
54
- pack(value: number[]): E;
52
+ encode(value: number, options?: ParserOptions): any;
53
+ unpack(value: string | number): number[];
54
+ pack(value: string | number | number[]): number;
55
55
  }
@@ -1,4 +1,4 @@
1
- import { CallableConfig, ParserOptions, ParameterConfig, Parser } from '../../types';
1
+ import { ODataCallableConfig, ParserOptions, ODataParameterConfig, Parser } from '../../types';
2
2
  import { ODataEnumTypeParser } from './enum-type';
3
3
  import { ODataStructuredTypeParser } from './structured-type';
4
4
  export declare class ODataParameterParser<T> {
@@ -8,7 +8,7 @@ export declare class ODataParameterParser<T> {
8
8
  collection?: boolean;
9
9
  nullable?: boolean;
10
10
  parserOptions?: ParserOptions;
11
- constructor(name: string, parameter: ParameterConfig);
11
+ constructor(name: string, parameter: ODataParameterConfig);
12
12
  serialize(value: T, options?: ParserOptions): any;
13
13
  encode(value: any, options?: ParserOptions): string;
14
14
  configure({ options, parserForType, }: {
@@ -20,7 +20,7 @@ export declare class ODataParameterParser<T> {
20
20
  enumType(): ODataEnumTypeParser<T>;
21
21
  isStructuredType(): boolean;
22
22
  structuredType(): ODataStructuredTypeParser<T>;
23
- field<F>(name: string): import("./structured-type").ODataStructuredTypeFieldParser<F>;
23
+ field<F>(name: string): import("angular-odata").ODataStructuredTypeFieldParser<F>;
24
24
  }
25
25
  export declare class ODataCallableParser<R> implements Parser<R> {
26
26
  name: string;
@@ -33,7 +33,7 @@ export declare class ODataCallableParser<R> implements Parser<R> {
33
33
  parser: Parser<any>;
34
34
  parameters: ODataParameterParser<any>[];
35
35
  parserOptions?: ParserOptions;
36
- constructor(config: CallableConfig, namespace: string, alias?: string);
36
+ constructor(config: ODataCallableConfig, namespace: string, alias?: string);
37
37
  isTypeOf(type: string): boolean;
38
38
  deserialize(value: any, options?: ParserOptions): R;
39
39
  serialize(params: any, options?: ParserOptions): any;
@@ -1,9 +1,9 @@
1
- import { EnumTypeConfig, EnumTypeFieldConfig, ParserOptions, FieldParser, JsonType } from '../../types';
1
+ import { ODataEnumTypeConfig, ODataEnumTypeFieldConfig, ParserOptions, FieldParser, JsonType } from '../../types';
2
2
  import { ODataAnnotatable } from '../annotation';
3
- export declare class ODataEnumTypeFieldParser<E> extends ODataAnnotatable {
3
+ export declare class ODataEnumTypeFieldParser extends ODataAnnotatable {
4
4
  name: string;
5
- value: E;
6
- constructor(name: string, field: EnumTypeFieldConfig<E>);
5
+ value: number;
6
+ constructor(name: string, field: ODataEnumTypeFieldConfig);
7
7
  titleize(term?: string | RegExp): string;
8
8
  }
9
9
  export declare class ODataEnumTypeParser<E> extends ODataAnnotatable implements FieldParser<E> {
@@ -12,28 +12,28 @@ export declare class ODataEnumTypeParser<E> extends ODataAnnotatable implements
12
12
  alias?: string;
13
13
  flags?: boolean;
14
14
  members: {
15
- [name: string]: E;
15
+ [name: string]: number;
16
16
  } | {
17
17
  [value: number]: string;
18
18
  };
19
19
  private _fields;
20
20
  parserOptions?: ParserOptions;
21
- constructor(config: EnumTypeConfig<E>, namespace: string, alias?: string);
21
+ constructor(config: ODataEnumTypeConfig, namespace: string, alias?: string);
22
22
  configure({ options }: {
23
23
  options: ParserOptions;
24
24
  }): void;
25
25
  isTypeOf(type: string): boolean;
26
- fields(value?: E): ODataEnumTypeFieldParser<E>[];
27
- field(nameValue: string | E): ODataEnumTypeFieldParser<E>;
26
+ fields(namesValue?: string | number | number[]): ODataEnumTypeFieldParser[];
27
+ field(nameValue: string | number): ODataEnumTypeFieldParser | undefined;
28
28
  /**
29
29
  * Map the fields of the enum type.
30
30
  * @param mapper Function that maps the value to the new value
31
31
  * @returns The fields mapped by the mapper
32
32
  */
33
- mapFields<R>(mapper: (field: ODataEnumTypeFieldParser<E>) => R): R[];
33
+ mapFields<R>(mapper: (field: ODataEnumTypeFieldParser) => R): R[];
34
34
  deserialize(value: string, options?: ParserOptions): E;
35
- serialize(value: E, options?: ParserOptions): string | undefined;
36
- encode(value: E, options?: ParserOptions): any;
35
+ serialize(value: number, options?: ParserOptions): string | undefined;
36
+ encode(value: number, options?: ParserOptions): any;
37
37
  toJsonSchema(): {
38
38
  title: string;
39
39
  type: JsonType;
@@ -43,14 +43,14 @@ export declare class ODataEnumTypeParser<E> extends ODataAnnotatable implements
43
43
  enum?: undefined;
44
44
  } | {
45
45
  type: JsonType;
46
- enum: E[];
46
+ enum: number[];
47
47
  title?: undefined;
48
48
  items?: undefined;
49
49
  };
50
- validate(member: string | number, { method, navigation, }?: {
50
+ validate(value: string | number, { method, navigation, }?: {
51
51
  method?: 'create' | 'update' | 'modify';
52
52
  navigation?: boolean;
53
53
  }): string[] | undefined;
54
- unpack(value: E): number[];
55
- pack(value: number[]): E;
54
+ unpack(value: string | number): number[];
55
+ pack(value: string | number | number[]): number;
56
56
  }
@@ -1,4 +1,4 @@
1
- import { ParserOptions, Parser, StructuredTypeConfig, StructuredTypeFieldConfig, FieldParser, EdmType } from '../../types';
1
+ import { ParserOptions, Parser, ODataStructuredTypeConfig, ODataStructuredTypeFieldConfig, FieldParser, EdmType } from '../../types';
2
2
  import { ODataAnnotatable } from '../annotation';
3
3
  import { ODataEnumTypeParser } from './enum-type';
4
4
  type JsonSchemaSelect<T> = Array<keyof T>;
@@ -47,7 +47,7 @@ export declare class ODataStructuredTypeFieldParser<T> extends ODataAnnotatable
47
47
  scale?: number | 'variable';
48
48
  referentials: ODataReferential[];
49
49
  parserOptions?: ParserOptions;
50
- constructor(name: string, structured: ODataStructuredTypeParser<any>, field: StructuredTypeFieldConfig);
50
+ constructor(name: string, structured: ODataStructuredTypeParser<any>, field: ODataStructuredTypeFieldConfig);
51
51
  validate(value: any, { method, navigation, }?: {
52
52
  method?: 'create' | 'update' | 'modify';
53
53
  navigation?: boolean;
@@ -86,8 +86,8 @@ export declare class ODataStructuredTypeParser<T> extends ODataAnnotatable imple
86
86
  private _keys?;
87
87
  private _fields;
88
88
  parserOptions?: ParserOptions;
89
- constructor(config: StructuredTypeConfig<T>, namespace: string, alias?: string);
90
- addField<F>(name: string, config: StructuredTypeFieldConfig): ODataStructuredTypeFieldParser<F>;
89
+ constructor(config: ODataStructuredTypeConfig, namespace: string, alias?: string);
90
+ addField<F>(name: string, config: ODataStructuredTypeFieldConfig): ODataStructuredTypeFieldParser<F>;
91
91
  /**
92
92
  * Create a nicer looking title.
93
93
  * Titleize is meant for creating pretty output.
@@ -144,9 +144,12 @@ export declare class ODataStructuredTypeParser<T> extends ODataAnnotatable imple
144
144
  */
145
145
  pick(attrs: {
146
146
  [name: string]: any;
147
- }, { include_parents, include_navigation, include_etag, options, }?: {
147
+ }, { include_id, include_key, include_parents, include_navigation, include_computed, include_etag, options, }?: {
148
+ include_id?: boolean;
149
+ include_key?: boolean;
148
150
  include_parents?: boolean;
149
151
  include_navigation?: boolean;
152
+ include_computed?: boolean;
150
153
  include_etag?: boolean;
151
154
  options?: ParserOptions;
152
155
  }): Partial<T>;
@@ -1,5 +1,5 @@
1
1
  import { ODataApi } from '../api';
2
- import { ParserOptions, SchemaConfig, StructuredTypeConfig } from '../types';
2
+ import { ParserOptions, ODataSchemaConfig, ODataStructuredTypeConfig } from '../types';
3
3
  import { ODataAnnotatable } from './annotation';
4
4
  import { ODataCallable } from './callable';
5
5
  import { ODataEntityContainer } from './entity-container';
@@ -15,11 +15,11 @@ export declare class ODataSchema extends ODataAnnotatable {
15
15
  entities: ODataStructuredType<any>[];
16
16
  callables: ODataCallable<any>[];
17
17
  containers: ODataEntityContainer[];
18
- constructor(config: SchemaConfig, api: ODataApi);
18
+ constructor(config: ODataSchemaConfig, api: ODataApi);
19
19
  isNamespaceOf(type: string): boolean;
20
20
  get entitySets(): ODataEntitySet[];
21
21
  get singletons(): ODataSingleton[];
22
- createStructuredType<T>(config: StructuredTypeConfig<T>): ODataStructuredType<T>;
22
+ createStructuredType<T>(config: ODataStructuredTypeConfig): ODataStructuredType<T>;
23
23
  configure({ options }: {
24
24
  options: ParserOptions;
25
25
  }): void;
@@ -1,4 +1,4 @@
1
- import { SingletonConfig } from '../types';
1
+ import { ODataSingletonConfig } from '../types';
2
2
  import { ODataSchemaElement } from './element';
3
3
  import { ODataSchema } from './schema';
4
4
  export declare class ODataSingleton extends ODataSchemaElement {
@@ -6,5 +6,5 @@ export declare class ODataSingleton extends ODataSchemaElement {
6
6
  service: {
7
7
  new (...params: any[]): any;
8
8
  };
9
- constructor(config: SingletonConfig, schema: ODataSchema);
9
+ constructor(config: ODataSingletonConfig, schema: ODataSchema);
10
10
  }
@@ -1,6 +1,6 @@
1
1
  import { ODataCollection } from '../models/collection';
2
2
  import { ODataModel } from '../models/model';
3
- import { ParserOptions, StructuredTypeConfig, StructuredTypeFieldConfig } from '../types';
3
+ import { ParserOptions, ODataStructuredTypeConfig, ODataStructuredTypeFieldConfig } from '../types';
4
4
  import { ODataParserSchemaElement } from './element';
5
5
  import { JsonSchemaOptions, ODataEntityTypeKey, ODataStructuredTypeFieldParser, ODataStructuredTypeParser } from './parsers';
6
6
  import { ODataSchema } from './schema';
@@ -10,7 +10,7 @@ export declare class ODataStructuredType<T> extends ODataParserSchemaElement<T,
10
10
  children: ODataStructuredType<any>[];
11
11
  model?: typeof ODataModel;
12
12
  collection?: typeof ODataCollection;
13
- constructor(config: StructuredTypeConfig<T>, schema: ODataSchema);
13
+ constructor(config: ODataStructuredTypeConfig, schema: ODataSchema);
14
14
  configure({ options }: {
15
15
  options: ParserOptions;
16
16
  }): void;
@@ -45,7 +45,7 @@ export declare class ODataStructuredType<T> extends ODataParserSchemaElement<T,
45
45
  * @returns The field parser
46
46
  */
47
47
  field<F>(name: keyof T): ODataStructuredTypeFieldParser<F>;
48
- addField<F>(name: string, config: StructuredTypeFieldConfig): ODataStructuredTypeFieldParser<F>;
48
+ addField<F>(name: string, config: ODataStructuredTypeFieldConfig): ODataStructuredTypeFieldParser<F>;
49
49
  /**
50
50
  * Find a parent schema of the structured type.
51
51
  * @param predicate Function for evaluate the schemas in the hierarchy.
@@ -69,9 +69,12 @@ export declare class ODataStructuredType<T> extends ODataParserSchemaElement<T,
69
69
  */
70
70
  pick(attrs: {
71
71
  [name: string]: any;
72
- }, { include_parents, include_navigation, include_etag, }?: {
72
+ }, { include_id, include_key, include_parents, include_navigation, include_computed, include_etag, }?: {
73
+ include_id?: boolean;
74
+ include_key?: boolean;
73
75
  include_parents?: boolean;
74
76
  include_navigation?: boolean;
77
+ include_computed?: boolean;
75
78
  include_etag?: boolean;
76
79
  }): Partial<T>;
77
80
  /**
@@ -6,8 +6,8 @@ import { ODataEntityService } from './entity';
6
6
  export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
7
7
  static Model?: typeof ODataModel;
8
8
  static Collection?: typeof ODataCollection;
9
- model(entity?: Partial<T>): ODataModel<T>;
10
- collection(entities?: Partial<T>[]): ODataCollection<T, ODataModel<T>>;
9
+ model(entity?: Partial<T>, reset?: boolean): ODataModel<T> & import("angular-odata").ModelInterface<T>;
10
+ collection(entities?: Partial<T>[], reset?: boolean): ODataCollection<T, ODataModel<T> & import("angular-odata").ModelInterface<T>>;
11
11
  /**
12
12
  * Get the entity set resource for this service.
13
13
  */
@@ -32,8 +32,8 @@ export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
32
32
  * @param options The options for the request.
33
33
  */
34
34
  fetchAll(options?: ODataOptions): Observable<{
35
- entities: T[];
36
- annots: import("../annotations").ODataEntitiesAnnotations<T>;
35
+ entities: any[];
36
+ annots: import("angular-odata").ODataEntitiesAnnotations<any>;
37
37
  }>;
38
38
  /**
39
39
  * Get entities from the entity set.
@@ -44,7 +44,10 @@ export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
44
44
  withCount?: boolean;
45
45
  }): Observable<{
46
46
  entities: T[];
47
- annots: import("../annotations").ODataEntitiesAnnotations<T>;
47
+ annots: import("angular-odata").ODataEntitiesAnnotations<T>;
48
+ } | {
49
+ entities: T[];
50
+ annots: import("angular-odata").ODataEntitiesAnnotations<any>;
48
51
  }>;
49
52
  /**
50
53
  * Get an entity from the entity set.
@@ -56,7 +59,7 @@ export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
56
59
  etag?: string;
57
60
  }): Observable<{
58
61
  entity: T | null;
59
- annots: import("../annotations").ODataEntitiesAnnotations<T>;
62
+ annots: import("angular-odata").ODataEntitiesAnnotations<T>;
60
63
  }>;
61
64
  /**
62
65
  * Create an entity in the entity set.
@@ -7,5 +7,5 @@ export declare abstract class ODataEntityService<T> extends ODataBaseService {
7
7
  /**
8
8
  * The schema for the structured type.
9
9
  */
10
- get structuredTypeSchema(): import("angular-odata").ODataStructuredType<T> | undefined;
10
+ get structuredTypeSchema(): import("angular-odata").ODataStructuredType<any> | import("angular-odata").ODataStructuredType<T> | undefined;
11
11
  }