breeze-client 2.2.2 → 3.0.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 (299) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +83 -63
  3. package/adapters/abstract-data-service-adapter.d.ts +120 -0
  4. package/adapters/abstract-data-service-adapter.js +395 -0
  5. package/adapters/abstract-data-service-adapter.js.map +1 -0
  6. package/adapters/adapter-ajax-fetch.d.ts +12 -0
  7. package/adapters/adapter-ajax-fetch.js +13 -0
  8. package/adapters/adapter-ajax-fetch.js.map +1 -0
  9. package/{adapter-ajax-post → adapters}/adapter-ajax-post.d.ts +40 -36
  10. package/{fesm2022/breeze-client-adapter-ajax-post.mjs → adapters/adapter-ajax-post.js} +80 -82
  11. package/adapters/adapter-ajax-post.js.map +1 -0
  12. package/{adapter-ajax-fetch → adapters}/adapter-core.d.ts +4 -4
  13. package/{fesm2022/breeze-client-adapter-uri-builder-json.mjs → adapters/adapter-core.js} +48 -91
  14. package/adapters/adapter-core.js.map +1 -0
  15. package/adapters/adapter-data-service-webapi.d.ts +9 -0
  16. package/{fesm2022/breeze-client-adapter-data-service-webapi.mjs → adapters/adapter-data-service-webapi.js} +105 -107
  17. package/adapters/adapter-data-service-webapi.js.map +1 -0
  18. package/adapters/adapter-model-library-backing-store.d.ts +32 -0
  19. package/adapters/adapter-model-library-backing-store.js +321 -0
  20. package/adapters/adapter-model-library-backing-store.js.map +1 -0
  21. package/adapters/adapter-uri-builder-json.d.ts +11 -0
  22. package/adapters/adapter-uri-builder-json.js +40 -0
  23. package/adapters/adapter-uri-builder-json.js.map +1 -0
  24. package/adapters/http.d.ts +52 -0
  25. package/adapters/http.js +202 -0
  26. package/adapters/http.js.map +1 -0
  27. package/angular/adapter-angular-httpclient.d.ts +21 -0
  28. package/angular/adapter-angular-httpclient.js +70 -0
  29. package/angular/adapter-angular-httpclient.js.map +1 -0
  30. package/breeze.d.ts +215 -0
  31. package/breeze.js +141 -0
  32. package/breeze.js.map +1 -0
  33. package/config/config.d.ts +212 -0
  34. package/config/config.js +392 -0
  35. package/config/config.js.map +1 -0
  36. package/config/configure.d.ts +66 -0
  37. package/config/configure.js +46 -0
  38. package/config/configure.js.map +1 -0
  39. package/config/default-adapters.d.ts +1 -0
  40. package/config/default-adapters.js +40 -0
  41. package/config/default-adapters.js.map +1 -0
  42. package/config/interface-registry.d.ts +191 -0
  43. package/config/interface-registry.js +5 -0
  44. package/config/interface-registry.js.map +1 -0
  45. package/{src → core}/assert-param.d.ts +52 -60
  46. package/core/assert-param.js +390 -0
  47. package/core/assert-param.js.map +1 -0
  48. package/core/core.d.ts +285 -0
  49. package/core/core.js +772 -0
  50. package/core/core.js.map +1 -0
  51. package/core/enum.d.ts +116 -0
  52. package/core/enum.js +167 -0
  53. package/core/enum.js.map +1 -0
  54. package/core/event.d.ts +169 -0
  55. package/core/event.js +338 -0
  56. package/core/event.js.map +1 -0
  57. package/entity/array.d.ts +3 -0
  58. package/entity/array.js +4 -0
  59. package/entity/array.js.map +1 -0
  60. package/entity/complex-array.d.ts +17 -0
  61. package/entity/complex-array.js +104 -0
  62. package/entity/complex-array.js.map +1 -0
  63. package/entity/default-property-interceptor.d.ts +1 -0
  64. package/entity/default-property-interceptor.js +496 -0
  65. package/entity/default-property-interceptor.js.map +1 -0
  66. package/{src → entity}/entity-action.d.ts +36 -42
  67. package/entity/entity-action.js +45 -0
  68. package/entity/entity-action.js.map +1 -0
  69. package/entity/entity-aspect.d.ts +457 -0
  70. package/entity/entity-aspect.js +1262 -0
  71. package/entity/entity-aspect.js.map +1 -0
  72. package/entity/entity-base.d.ts +55 -0
  73. package/entity/entity-base.js +41 -0
  74. package/entity/entity-base.js.map +1 -0
  75. package/entity/entity-group.d.ts +1 -0
  76. package/entity/entity-group.js +224 -0
  77. package/entity/entity-group.js.map +1 -0
  78. package/entity/entity-key.d.ts +95 -0
  79. package/entity/entity-key.js +189 -0
  80. package/entity/entity-key.js.map +1 -0
  81. package/{src → entity}/entity-state.d.ts +112 -84
  82. package/entity/entity-state.js +135 -0
  83. package/entity/entity-state.js.map +1 -0
  84. package/entity/key-generator.d.ts +57 -0
  85. package/entity/key-generator.js +155 -0
  86. package/entity/key-generator.js.map +1 -0
  87. package/entity/observable-array.d.ts +25 -0
  88. package/entity/observable-array.js +230 -0
  89. package/entity/observable-array.js.map +1 -0
  90. package/entity/primitive-array.d.ts +12 -0
  91. package/entity/primitive-array.js +71 -0
  92. package/entity/primitive-array.js.map +1 -0
  93. package/entity/relation-array.d.ts +24 -0
  94. package/entity/relation-array.js +176 -0
  95. package/entity/relation-array.js.map +1 -0
  96. package/entity/unattached-children-map.d.ts +1 -0
  97. package/entity/unattached-children-map.js +105 -0
  98. package/entity/unattached-children-map.js.map +1 -0
  99. package/generate-entity-classes.js +1176 -0
  100. package/manager/entity-manager.d.ts +801 -0
  101. package/manager/entity-manager.js +2395 -0
  102. package/manager/entity-manager.js.map +1 -0
  103. package/{src → manager}/save-options.d.ts +48 -42
  104. package/manager/save-options.js +51 -0
  105. package/manager/save-options.js.map +1 -0
  106. package/{src → metadata}/data-service.d.ts +229 -184
  107. package/metadata/data-service.js +246 -0
  108. package/metadata/data-service.js.map +1 -0
  109. package/metadata/data-type.d.ts +122 -0
  110. package/metadata/data-type.js +465 -0
  111. package/metadata/data-type.js.map +1 -0
  112. package/metadata/entity-metadata.d.ts +1193 -0
  113. package/metadata/entity-metadata.js +2502 -0
  114. package/metadata/entity-metadata.js.map +1 -0
  115. package/{src → metadata}/local-query-comparison-options.d.ts +65 -59
  116. package/metadata/local-query-comparison-options.js +69 -0
  117. package/metadata/local-query-comparison-options.js.map +1 -0
  118. package/{src → metadata}/naming-convention.d.ts +75 -72
  119. package/metadata/naming-convention.js +97 -0
  120. package/metadata/naming-convention.js.map +1 -0
  121. package/mixins/mixin-get-entity-graph.d.ts +63 -0
  122. package/{fesm2022/breeze-client-mixin-get-entity-graph.mjs → mixins/mixin-get-entity-graph.js} +331 -253
  123. package/mixins/mixin-get-entity-graph.js.map +1 -0
  124. package/mixins/mixin-save-queuing.d.ts +98 -0
  125. package/{fesm2022/breeze-client-mixin-save-queuing.mjs → mixins/mixin-save-queuing.js} +493 -365
  126. package/mixins/mixin-save-queuing.js.map +1 -0
  127. package/package.json +63 -94
  128. package/query/entity-query.d.ts +521 -0
  129. package/query/entity-query.js +1149 -0
  130. package/query/entity-query.js.map +1 -0
  131. package/{src → query}/mapping-context.d.ts +44 -46
  132. package/query/mapping-context.js +412 -0
  133. package/query/mapping-context.js.map +1 -0
  134. package/query/predicate.d.ts +394 -0
  135. package/query/predicate.js +1294 -0
  136. package/query/predicate.js.map +1 -0
  137. package/query/property-path.d.ts +252 -0
  138. package/query/property-path.js +2 -0
  139. package/query/property-path.js.map +1 -0
  140. package/{src → query}/query-options.d.ts +143 -119
  141. package/query/query-options.js +180 -0
  142. package/query/query-options.js.map +1 -0
  143. package/rxjs/breeze-rxjs.d.ts +72 -0
  144. package/rxjs/breeze-rxjs.js +117 -0
  145. package/rxjs/breeze-rxjs.js.map +1 -0
  146. package/validation/validate.d.ts +583 -0
  147. package/validation/validate.js +961 -0
  148. package/validation/validate.js.map +1 -0
  149. package/{src → validation}/validation-options.d.ts +67 -63
  150. package/validation/validation-options.js +70 -0
  151. package/validation/validation-options.js.map +1 -0
  152. package/adapter-ajax-angularjs/adapter-ajax-angularjs.d.ts +0 -17
  153. package/adapter-ajax-angularjs/adapter-core.d.ts +0 -4
  154. package/adapter-ajax-angularjs/index.d.ts +0 -5
  155. package/adapter-ajax-fetch/adapter-ajax-fetch.d.ts +0 -18
  156. package/adapter-ajax-fetch/index.d.ts +0 -5
  157. package/adapter-ajax-httpclient/adapter-ajax-httpclient.d.ts +0 -13
  158. package/adapter-ajax-httpclient/adapter-core.d.ts +0 -4
  159. package/adapter-ajax-httpclient/index.d.ts +0 -5
  160. package/adapter-ajax-jquery/adapter-ajax-jquery.d.ts +0 -15
  161. package/adapter-ajax-jquery/index.d.ts +0 -5
  162. package/adapter-ajax-post/index.d.ts +0 -5
  163. package/adapter-data-service-odata/adapter-core.d.ts +0 -4
  164. package/adapter-data-service-odata/adapter-data-service-odata.d.ts +0 -17
  165. package/adapter-data-service-odata/index.d.ts +0 -5
  166. package/adapter-data-service-webapi/adapter-data-service-webapi.d.ts +0 -15
  167. package/adapter-data-service-webapi/index.d.ts +0 -5
  168. package/adapter-model-library-backing-store/adapter-model-library-backing-store.d.ts +0 -10
  169. package/adapter-model-library-backing-store/index.d.ts +0 -5
  170. package/adapter-model-library-ko/adapter-model-library-ko.d.ts +0 -10
  171. package/adapter-model-library-ko/index.d.ts +0 -5
  172. package/adapter-uri-builder-json/adapter-core.d.ts +0 -4
  173. package/adapter-uri-builder-json/adapter-uri-builder-json.d.ts +0 -8
  174. package/adapter-uri-builder-json/index.d.ts +0 -5
  175. package/adapter-uri-builder-odata/adapter-core.d.ts +0 -4
  176. package/adapter-uri-builder-odata/adapter-uri-builder-odata.d.ts +0 -8
  177. package/adapter-uri-builder-odata/index.d.ts +0 -5
  178. package/esm2022/adapter-ajax-angularjs/adapter-ajax-angularjs.mjs +0 -135
  179. package/esm2022/adapter-ajax-angularjs/adapter-core.mjs +0 -49
  180. package/esm2022/adapter-ajax-angularjs/breeze-client-adapter-ajax-angularjs.mjs +0 -5
  181. package/esm2022/adapter-ajax-fetch/adapter-ajax-fetch.mjs +0 -135
  182. package/esm2022/adapter-ajax-fetch/adapter-core.mjs +0 -49
  183. package/esm2022/adapter-ajax-fetch/breeze-client-adapter-ajax-fetch.mjs +0 -5
  184. package/esm2022/adapter-ajax-httpclient/adapter-ajax-httpclient.mjs +0 -139
  185. package/esm2022/adapter-ajax-httpclient/adapter-core.mjs +0 -49
  186. package/esm2022/adapter-ajax-httpclient/breeze-client-adapter-ajax-httpclient.mjs +0 -5
  187. package/esm2022/adapter-ajax-jquery/adapter-ajax-jquery.mjs +0 -107
  188. package/esm2022/adapter-ajax-jquery/breeze-client-adapter-ajax-jquery.mjs +0 -5
  189. package/esm2022/adapter-ajax-post/adapter-ajax-post.mjs +0 -77
  190. package/esm2022/adapter-ajax-post/breeze-client-adapter-ajax-post.mjs +0 -5
  191. package/esm2022/adapter-data-service-odata/adapter-core.mjs +0 -49
  192. package/esm2022/adapter-data-service-odata/adapter-data-service-odata.mjs +0 -461
  193. package/esm2022/adapter-data-service-odata/breeze-client-adapter-data-service-odata.mjs +0 -5
  194. package/esm2022/adapter-data-service-webapi/adapter-data-service-webapi.mjs +0 -100
  195. package/esm2022/adapter-data-service-webapi/breeze-client-adapter-data-service-webapi.mjs +0 -5
  196. package/esm2022/adapter-model-library-backing-store/adapter-model-library-backing-store.mjs +0 -269
  197. package/esm2022/adapter-model-library-backing-store/breeze-client-adapter-model-library-backing-store.mjs +0 -5
  198. package/esm2022/adapter-model-library-ko/adapter-model-library-ko.mjs +0 -241
  199. package/esm2022/adapter-model-library-ko/breeze-client-adapter-model-library-ko.mjs +0 -5
  200. package/esm2022/adapter-uri-builder-json/adapter-core.mjs +0 -49
  201. package/esm2022/adapter-uri-builder-json/adapter-uri-builder-json.mjs +0 -37
  202. package/esm2022/adapter-uri-builder-json/breeze-client-adapter-uri-builder-json.mjs +0 -5
  203. package/esm2022/adapter-uri-builder-odata/adapter-core.mjs +0 -49
  204. package/esm2022/adapter-uri-builder-odata/adapter-uri-builder-odata.mjs +0 -191
  205. package/esm2022/adapter-uri-builder-odata/breeze-client-adapter-uri-builder-odata.mjs +0 -5
  206. package/esm2022/breeze-client.mjs +0 -5
  207. package/esm2022/index.mjs +0 -2
  208. package/esm2022/mixin-get-entity-graph/breeze-client-mixin-get-entity-graph.mjs +0 -5
  209. package/esm2022/mixin-get-entity-graph/mixin-get-entity-graph.mjs +0 -269
  210. package/esm2022/mixin-save-queuing/breeze-client-mixin-save-queuing.mjs +0 -5
  211. package/esm2022/mixin-save-queuing/mixin-save-queuing.mjs +0 -421
  212. package/esm2022/src/abstract-data-service-adapter.mjs +0 -325
  213. package/esm2022/src/array.mjs +0 -4
  214. package/esm2022/src/assert-param.mjs +0 -330
  215. package/esm2022/src/breeze.mjs +0 -85
  216. package/esm2022/src/complex-array.mjs +0 -117
  217. package/esm2022/src/config.mjs +0 -232
  218. package/esm2022/src/core.mjs +0 -712
  219. package/esm2022/src/csdl-metadata-parser.mjs +0 -385
  220. package/esm2022/src/data-service.mjs +0 -221
  221. package/esm2022/src/data-type.mjs +0 -510
  222. package/esm2022/src/default-property-interceptor.mjs +0 -460
  223. package/esm2022/src/entity-action.mjs +0 -45
  224. package/esm2022/src/entity-aspect.mjs +0 -897
  225. package/esm2022/src/entity-group.mjs +0 -192
  226. package/esm2022/src/entity-key.mjs +0 -125
  227. package/esm2022/src/entity-manager.mjs +0 -2163
  228. package/esm2022/src/entity-metadata.mjs +0 -2242
  229. package/esm2022/src/entity-query.mjs +0 -1024
  230. package/esm2022/src/entity-state.mjs +0 -107
  231. package/esm2022/src/enum.mjs +0 -143
  232. package/esm2022/src/event.mjs +0 -264
  233. package/esm2022/src/interface-registry.mjs +0 -39
  234. package/esm2022/src/key-generator.mjs +0 -110
  235. package/esm2022/src/local-query-comparison-options.mjs +0 -65
  236. package/esm2022/src/mapping-context.mjs +0 -411
  237. package/esm2022/src/naming-convention.mjs +0 -92
  238. package/esm2022/src/observable-array.mjs +0 -183
  239. package/esm2022/src/predicate.mjs +0 -1259
  240. package/esm2022/src/primitive-array.mjs +0 -85
  241. package/esm2022/src/query-options.mjs +0 -152
  242. package/esm2022/src/relation-array.mjs +0 -173
  243. package/esm2022/src/save-options.mjs +0 -41
  244. package/esm2022/src/unattached-children-map.mjs +0 -56
  245. package/esm2022/src/validate.mjs +0 -995
  246. package/esm2022/src/validation-options.mjs +0 -64
  247. package/fesm2022/breeze-client-adapter-ajax-angularjs.mjs +0 -190
  248. package/fesm2022/breeze-client-adapter-ajax-angularjs.mjs.map +0 -1
  249. package/fesm2022/breeze-client-adapter-ajax-fetch.mjs +0 -190
  250. package/fesm2022/breeze-client-adapter-ajax-fetch.mjs.map +0 -1
  251. package/fesm2022/breeze-client-adapter-ajax-httpclient.mjs +0 -194
  252. package/fesm2022/breeze-client-adapter-ajax-httpclient.mjs.map +0 -1
  253. package/fesm2022/breeze-client-adapter-ajax-jquery.mjs +0 -114
  254. package/fesm2022/breeze-client-adapter-ajax-jquery.mjs.map +0 -1
  255. package/fesm2022/breeze-client-adapter-ajax-post.mjs.map +0 -1
  256. package/fesm2022/breeze-client-adapter-data-service-odata.mjs +0 -516
  257. package/fesm2022/breeze-client-adapter-data-service-odata.mjs.map +0 -1
  258. package/fesm2022/breeze-client-adapter-data-service-webapi.mjs.map +0 -1
  259. package/fesm2022/breeze-client-adapter-model-library-backing-store.mjs +0 -276
  260. package/fesm2022/breeze-client-adapter-model-library-backing-store.mjs.map +0 -1
  261. package/fesm2022/breeze-client-adapter-model-library-ko.mjs +0 -248
  262. package/fesm2022/breeze-client-adapter-model-library-ko.mjs.map +0 -1
  263. package/fesm2022/breeze-client-adapter-uri-builder-json.mjs.map +0 -1
  264. package/fesm2022/breeze-client-adapter-uri-builder-odata.mjs +0 -246
  265. package/fesm2022/breeze-client-adapter-uri-builder-odata.mjs.map +0 -1
  266. package/fesm2022/breeze-client-mixin-get-entity-graph.mjs.map +0 -1
  267. package/fesm2022/breeze-client-mixin-save-queuing.mjs.map +0 -1
  268. package/fesm2022/breeze-client.mjs +0 -14144
  269. package/fesm2022/breeze-client.mjs.map +0 -1
  270. package/index.d.ts +0 -1
  271. package/mixin-get-entity-graph/index.d.ts +0 -5
  272. package/mixin-get-entity-graph/mixin-get-entity-graph.d.ts +0 -31
  273. package/mixin-save-queuing/index.d.ts +0 -5
  274. package/mixin-save-queuing/mixin-save-queuing.d.ts +0 -32
  275. package/src/abstract-data-service-adapter.d.ts +0 -84
  276. package/src/array.d.ts +0 -3
  277. package/src/breeze.d.ts +0 -139
  278. package/src/complex-array.d.ts +0 -13
  279. package/src/config.d.ts +0 -104
  280. package/src/core.d.ts +0 -164
  281. package/src/csdl-metadata-parser.d.ts +0 -7
  282. package/src/data-type.d.ts +0 -89
  283. package/src/default-property-interceptor.d.ts +0 -4
  284. package/src/entity-aspect.d.ts +0 -332
  285. package/src/entity-group.d.ts +0 -28
  286. package/src/entity-key.d.ts +0 -77
  287. package/src/entity-manager.d.ts +0 -680
  288. package/src/entity-metadata.d.ts +0 -988
  289. package/src/entity-query.d.ts +0 -444
  290. package/src/enum.d.ts +0 -100
  291. package/src/event.d.ts +0 -142
  292. package/src/interface-registry.d.ts +0 -150
  293. package/src/key-generator.d.ts +0 -12
  294. package/src/observable-array.d.ts +0 -52
  295. package/src/predicate.d.ts +0 -376
  296. package/src/primitive-array.d.ts +0 -7
  297. package/src/relation-array.d.ts +0 -18
  298. package/src/unattached-children-map.d.ts +0 -19
  299. package/src/validate.d.ts +0 -650
@@ -0,0 +1,51 @@
1
+ import { core } from '../core/core.js';
2
+ import { assertConfig } from '../core/assert-param.js';
3
+ import { DataService } from '../metadata/data-service.js';
4
+ /**
5
+ A SaveOptions instance is used to specify the 'options' under which a save will occur.
6
+ */
7
+ export class SaveOptions {
8
+ /** The default value whenever SaveOptions are not specified. */
9
+ static defaultInstance = new SaveOptions({ allowConcurrentSaves: false });
10
+ /** Creates save options from a {@link SaveOptionsConfig}. Passed to {@link EntityManager.saveChanges},
11
+ they are used for that save in place of the manager's {@link EntityManager.saveOptions} - as a
12
+ whole, not merged with them setting by setting.
13
+ ```ts
14
+ const so = new SaveOptions({ allowConcurrentSaves: true });
15
+ em.saveChanges(null, so);
16
+ ```
17
+ */
18
+ constructor(config) {
19
+ SaveOptions._updateWithConfig(this, config);
20
+ }
21
+ /**
22
+ Sets the 'defaultInstance' by creating a copy of the current 'defaultInstance' and then applying all of the properties of the current instance.
23
+ The current instance is returned unchanged.
24
+ */
25
+ setAsDefault() {
26
+ return core.setAsDefault(this, SaveOptions);
27
+ }
28
+ /**
29
+ Returns a copy of this SaveOptions with the specified config options applied.
30
+ ```ts
31
+ var saveOptions = em1.saveOptions.using( {resourceName: "anotherResource" });
32
+ ```
33
+ */
34
+ using(config) {
35
+ return SaveOptions._updateWithConfig(this, config);
36
+ }
37
+ /** @hidden @internal */
38
+ static _updateWithConfig(obj, config) {
39
+ if (config) {
40
+ assertConfig(config)
41
+ .whereParam("resourceName").isOptional().isString()
42
+ .whereParam("dataService").isOptional().isInstanceOf(DataService)
43
+ .whereParam("allowConcurrentSaves").isBoolean().isOptional()
44
+ .whereParam("tag").isOptional()
45
+ .applyAll(obj);
46
+ }
47
+ return obj;
48
+ }
49
+ }
50
+ SaveOptions.prototype._$typeName = "SaveOptions";
51
+ //# sourceMappingURL=save-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save-options.js","sourceRoot":"","sources":["../../src/manager/save-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAc1D;;EAEE;AACF,MAAM,OAAO,WAAW;IAYtB,gEAAgE;IAChE,MAAM,CAAC,eAAe,GAAG,IAAI,WAAW,CAAC,EAAE,oBAAoB,EAAE,KAAK,EAAC,CAAC,CAAC;IAEzE;;;;;;;MAOE;IACF,YAAY,MAA0B;QACpC,WAAW,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAGD;;;MAGE;IACF,YAAY;QACV,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;MAKE;IACF,KAAK,CAAC,MAAyB;QAC7B,OAAO,WAAW,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACrD,CAAC;IAED,wBAAwB;IAChB,MAAM,CAAC,iBAAiB,CAAC,GAAgB,EAAE,MAA0B;QAC3E,IAAI,MAAM,EAAE,CAAC;YACX,YAAY,CAAC,MAAM,CAAC;iBACf,UAAU,CAAC,cAAc,CAAC,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE;iBAClD,UAAU,CAAC,aAAa,CAAC,CAAC,UAAU,EAAE,CAAC,YAAY,CAAC,WAAW,CAAC;iBAChE,UAAU,CAAC,sBAAsB,CAAC,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE;iBAC3D,UAAU,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE;iBAC9B,QAAQ,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;;AAGH,WAAW,CAAC,SAAS,CAAC,UAAU,GAAG,aAAa,CAAC","sourcesContent":["import { core } from '../core/core.js';\r\nimport { assertConfig } from '../core/assert-param.js';\r\nimport { DataService } from '../metadata/data-service.js';\r\n\r\n/** Configuration info to be passed to the {@link SaveOptions} constructor */\r\nexport interface SaveOptionsConfig {\r\n /** Resource name to be used during the save - this defaults to \"SaveChanges\" */\r\n resourceName?: string;\r\n /** The DataService to be used for this save. */\r\n dataService?: DataService;\r\n /** Whether multiple saves can be in-flight at the same time. The default is false. */\r\n allowConcurrentSaves?: boolean;\r\n /** Free form value that will be sent to the server during the save. */\r\n tag?: any;\r\n}\r\n\r\n/**\r\nA SaveOptions instance is used to specify the 'options' under which a save will occur.\r\n*/\r\nexport class SaveOptions {\r\n /** @hidden @internal */\r\n declare _$typeName: string; // on proto\r\n /** Resource name to be used during the save - this defaults to \"SaveChanges\". __Read Only__ */\r\n declare resourceName: string;\r\n /** The DataService to be used for this save. __Read Only__ */\r\n declare dataService: DataService;\r\n /** Whether multiple saves can be in-flight at the same time. The default is false. __Read Only__ */\r\n declare allowConcurrentSaves: boolean;\r\n /** Free form value that will be sent to the server during the save. __Read Only__ */\r\n declare tag: any;\r\n\r\n /** The default value whenever SaveOptions are not specified. */\r\n static defaultInstance = new SaveOptions({ allowConcurrentSaves: false});\r\n\r\n /** Creates save options from a {@link SaveOptionsConfig}. Passed to {@link EntityManager.saveChanges},\r\n they are used for that save in place of the manager's {@link EntityManager.saveOptions} - as a\r\n whole, not merged with them setting by setting.\r\n ```ts\r\n const so = new SaveOptions({ allowConcurrentSaves: true });\r\n em.saveChanges(null, so);\r\n ```\r\n */\r\n constructor(config?: SaveOptionsConfig) {\r\n SaveOptions._updateWithConfig(this, config);\r\n }\r\n\r\n\r\n /**\r\n Sets the 'defaultInstance' by creating a copy of the current 'defaultInstance' and then applying all of the properties of the current instance.\r\n The current instance is returned unchanged.\r\n */\r\n setAsDefault() {\r\n return core.setAsDefault(this, SaveOptions);\r\n }\r\n\r\n /**\r\n Returns a copy of this SaveOptions with the specified config options applied.\r\n ```ts\r\n var saveOptions = em1.saveOptions.using( {resourceName: \"anotherResource\" });\r\n ```\r\n */\r\n using(config: SaveOptionsConfig) {\r\n return SaveOptions._updateWithConfig(this, config);\r\n }\r\n\r\n /** @hidden @internal */\r\n private static _updateWithConfig(obj: SaveOptions, config?: SaveOptionsConfig) {\r\n if (config) {\r\n assertConfig(config)\r\n .whereParam(\"resourceName\").isOptional().isString()\r\n .whereParam(\"dataService\").isOptional().isInstanceOf(DataService)\r\n .whereParam(\"allowConcurrentSaves\").isBoolean().isOptional()\r\n .whereParam(\"tag\").isOptional()\r\n .applyAll(obj);\r\n }\r\n return obj;\r\n }\r\n\r\n}\r\nSaveOptions.prototype._$typeName = \"SaveOptions\";\r\n\r\n\r\n\r\n"]}
@@ -1,184 +1,229 @@
1
- import { EntityType, NavigationProperty } from './entity-metadata';
2
- import { DataServiceAdapter, UriBuilderAdapter } from './interface-registry';
3
- import { KeyMapping } from './entity-manager';
4
- import { MappingContext } from './mapping-context';
5
- /** Configuration info to be passed to the [[DataService]] constructor */
6
- export interface DataServiceConfig {
7
- /** The serviceName for this DataService. **/
8
- serviceName?: string;
9
- /** The adapter name for the [[IDataServiceAdapter]] to be used with this service. **/
10
- adapterName?: string;
11
- /** The adapter name for the [[IUriBuilderAdapter]] to be used with this service. **/
12
- uriBuilderName?: string;
13
- /** Whether the server can provide metadata for this service. **/
14
- hasServerMetadata?: boolean;
15
- /** The [[JsonResultsAdapter]] used to process the results of any query against this DataService. **/
16
- jsonResultsAdapter?: JsonResultsAdapter;
17
- /** Whether to use JSONP when performing a 'GET' request against this service. **/
18
- useJsonp?: boolean;
19
- }
20
- /**
21
- A DataService instance is used to encapsulate the details of a single 'service'; this includes a serviceName, a dataService adapterInstance,
22
- and whether the service has server side metadata.
23
-
24
- You can construct an EntityManager with either a serviceName or a DataService instance, if you use a serviceName then a DataService
25
- is constructed for you. (It can also be set via the EntityManager.setProperties method).
26
-
27
- The same applies to the MetadataStore.fetchMetadata method, i.e. it takes either a serviceName or a DataService instance.
28
-
29
- Each metadataStore contains a list of DataServices, each accessible via its ‘serviceName’.
30
- ( see MetadataStore.getDataService and MetadataStore.addDataService). The ‘addDataService’ method is called internally
31
- anytime a MetadataStore.fetchMetadata call occurs with a new dataService ( or service name).
32
-
33
- **/
34
- export declare class DataService {
35
- /** @hidden @internal */
36
- _$typeName: string;
37
- /** The serviceName for this DataService. __Read Only__ **/
38
- serviceName: string;
39
- /** The adapter name for the [[IDataServiceAdapter]] to be used with this service. __Read Only__ **/
40
- adapterName: string;
41
- /** The [[IDataServiceAdapter]] implementation instance associated with this EntityManager. __Read Only__ **/
42
- adapterInstance?: DataServiceAdapter;
43
- /** The adapter name for the [[IUriBuilderAdapter]] to be used with this service. __Read Only__ **/
44
- uriBuilderName: string;
45
- /** The [[IUriBuilderAdapter]] implementation instance associated with this EntityManager. __Read Only__ **/
46
- uriBuilder?: UriBuilderAdapter;
47
- /** Whether the server can provide metadata for this service. __Read Only__ **/
48
- hasServerMetadata: boolean;
49
- /** The [[JsonResultsAdapter]] used to process the results of any query against this DataService. __Read Only__ **/
50
- jsonResultsAdapter: JsonResultsAdapter;
51
- /** Whether to use JSONP when performing a 'GET' request against this service. __Read Only__ **/
52
- useJsonp: boolean;
53
- /** DataService constructor
54
- > var dataService = new DataService({
55
- > serviceName: altServiceName,
56
- > hasServerMetadata: false
57
- > });
58
-
59
- > var metadataStore = new MetadataStore({
60
- > namingConvention: NamingConvention.camelCase
61
- > });
62
-
63
- > return new EntityManager({
64
- > dataService: dataService,
65
- > metadataStore: metadataStore
66
- > });
67
- @param config - A configuration object.
68
- **/
69
- constructor(config?: DataServiceConfig);
70
- /**
71
- Returns a copy of this DataService with the specified properties applied.
72
- @param config - The configuration object to apply to create a new DataService.
73
- **/
74
- using(config: DataServiceConfig): DataService;
75
- static resolve(dataServices: DataService[]): DataService;
76
- /** @hidden @internal */
77
- static _normalizeServiceName(serviceName: string): string;
78
- /** */
79
- toJSON(): Object;
80
- static fromJSON(json: any): DataService;
81
- /**
82
- Returns a url for this dataService with the specified suffix. This method handles dataService names either
83
- with or without trailing '/'s. If the suffix starts with "http" then it will be returned as-is.
84
- @method qualifyUrl
85
- @param suffix {String} The resulting url.
86
- @return {a Url string}
87
- **/
88
- qualifyUrl(suffix: string): string;
89
- }
90
- export interface NodeMeta {
91
- entityType?: EntityType;
92
- nodeId?: string;
93
- nodeRefId?: string;
94
- ignore?: boolean;
95
- passThru?: boolean;
96
- extraMetadata?: any;
97
- }
98
- export interface NodeContext {
99
- nodeType: string;
100
- propertyName?: string;
101
- navigationProperty?: NavigationProperty;
102
- }
103
- /** Configuration info to be passed to the [[JsonResultsAdapter]] constructor */
104
- export interface JsonResultsAdapterConfig {
105
- /** The name of this adapter. This name is used to uniquely identify and locate this instance when an 'exported' JsonResultsAdapter is later imported. */
106
- name: string;
107
- /** A Function that is called once per query operation to extract the 'payload' from any json received over the wire.
108
- This method has a default implementation which to simply return the "results" property from any json returned as a result of executing the query.
109
- */
110
- extractResults?: Function;
111
- /** A function that is called once per save operation to extract the entities from any json received over the wire. Must return an array.
112
- This method has a default implementation which simply returns the "entities" property from any json returned as a result of executing the save. */
113
- extractSaveResults?: Function;
114
- /** A function that is called once per save operation to extract the key mappings from any json received over the wire. Must return an array.
115
- This method has a default implementation which simply returns the "keyMappings" property from any json returned as a result of executing the save. */
116
- extractKeyMappings?: (data: {}) => KeyMapping[];
117
- /** A function that is called once per save operation to extract any deleted keys from any json received over the wire. Must return an array.
118
- This method has a default implementation which simply returns an empty array. */
119
- extractDeletedKeys?: (data: {}) => any[];
120
- /** A visitor method that will be called on each node of the returned payload. */
121
- visitNode?: (v: any, mc?: MappingContext, nodeContext?: NodeContext) => NodeMeta;
122
- }
123
- /**
124
- A JsonResultsAdapter instance is used to provide custom extraction and parsing logic on the json results returned by any web service.
125
- This facility makes it possible for breeze to talk to virtually any web service and return objects that will be first class 'breeze' citizens.
126
- **/
127
- export declare class JsonResultsAdapter {
128
- /** @hidden @internal */
129
- _$typeName: string;
130
- /** The name of this adapter. This name is used to uniquely identify and locate this instance when an 'exported' JsonResultsAdapter is later imported. */
131
- name: string;
132
- /** A Function that is called once per query operation to extract the 'payload' from any json received over the wire.
133
- This method has a default implementation which simply returns the "results" property from any json returned as a result of executing the query. */
134
- extractResults: Function;
135
- /** A function that is called once per save operation to extract the entities from any json received over the wire. Must return an array.
136
- This method has a default implementation which simply returns the "entities" property from any json returned as a result of executing the save. */
137
- extractSaveResults: Function;
138
- /** A function that is called once per save operation to extract the key mappings from any json received over the wire. Must return an array.
139
- This method has a default implementation which simply returns the "keyMappings" property from any json returned as a result of executing the save. */
140
- extractKeyMappings: (data: {}) => KeyMapping[];
141
- /** A function that is called once per save operation to extract any deleted keys from any json received over the wire. Must return an array.
142
- This method has a default implementation which is to simply returns the "deletedKeys" property from any json returned as a result of executing the save. */
143
- extractDeletedKeys?: (data: {}) => any[];
144
- /** A visitor method that will be called on each node of the returned payload. */
145
- visitNode: Function;
146
- /**
147
- JsonResultsAdapter constructor
148
-
149
- @example
150
- //
151
- var jsonResultsAdapter = new JsonResultsAdapter({
152
- name: "test1e",
153
- extractResults: function(json) {
154
- return json.results;
155
- },
156
- visitNode: function(node, mappingContext, nodeContext) {
157
- var entityType = normalizeTypeName(node.$type);
158
- var propertyName = nodeContext.propertyName;
159
- var ignore = propertyName && propertyName.substr(0, 1) === "$";
160
-
161
- return {
162
- entityType: entityType,
163
- nodeId: node.$id,
164
- nodeRefId: node.$ref,
165
- ignore: ignore,
166
- passThru: false // default
167
- };
168
- }
169
- });
170
-
171
- var dataService = new DataService( {
172
- serviceName: "breeze/foo",
173
- jsonResultsAdapter: jsonResultsAdapter
174
- });
175
-
176
- var entityManager = new EntityManager( {
177
- dataService: dataService
178
- });
179
-
180
- @param config - A configuration object.
181
-
182
- **/
183
- constructor(jsConfig: JsonResultsAdapterConfig);
184
- }
1
+ import { EntityType, NavigationProperty } from './entity-metadata.js';
2
+ import { DataServiceAdapter, UriBuilderAdapter } from '../config/interface-registry.js';
3
+ import { KeyMapping } from '../manager/entity-manager.js';
4
+ import { MappingContext } from '../query/mapping-context.js';
5
+ /** Configuration info to be passed to the {@link DataService} constructor */
6
+ export interface DataServiceConfig {
7
+ /** The serviceName for this DataService. */
8
+ serviceName?: string;
9
+ /** The adapter name for the {@link DataServiceAdapter} to be used with this service. */
10
+ adapterName?: string;
11
+ /** The adapter name for the {@link UriBuilderAdapter} to be used with this service. */
12
+ uriBuilderName?: string;
13
+ /** Whether the server can provide metadata for this service. */
14
+ hasServerMetadata?: boolean;
15
+ /** The {@link JsonResultsAdapter} used to process the results of any query against this DataService. */
16
+ jsonResultsAdapter?: JsonResultsAdapter;
17
+ /** Whether to use JSONP when performing a 'GET' request against this service.
18
+ @deprecated No effect on Breeze's own transport, which has no JSONP support. Kept because it is
19
+ part of a serialized DataService, and because a registered (deprecated) ajax adapter can still
20
+ act on the dataType and crossDomain settings it produces. */
21
+ useJsonp?: boolean;
22
+ }
23
+ /**
24
+ A DataService instance is used to encapsulate the details of a single 'service'; this includes a serviceName, a dataService adapterInstance,
25
+ and whether the service has server side metadata.
26
+
27
+ You can construct an EntityManager with either a serviceName or a DataService instance, if you use a serviceName then a DataService
28
+ is constructed for you. (It can also be set via the EntityManager.setProperties method).
29
+
30
+ The same applies to the MetadataStore.fetchMetadata method, i.e. it takes either a serviceName or a DataService instance.
31
+
32
+ Each metadataStore contains a list of DataServices, each accessible via its ‘serviceName’.
33
+ ( see MetadataStore.getDataService and MetadataStore.addDataService). The ‘addDataService’ method is called internally
34
+ anytime a MetadataStore.fetchMetadata call occurs with a new dataService ( or service name).
35
+
36
+ */
37
+ export declare class DataService {
38
+ /** The serviceName for this DataService. __Read Only__ */
39
+ serviceName: string;
40
+ /** The adapter name for the {@link DataServiceAdapter} to be used with this service. __Read Only__ */
41
+ adapterName: string;
42
+ /** The {@link DataServiceAdapter} implementation instance associated with this EntityManager. __Read Only__ */
43
+ adapterInstance?: DataServiceAdapter;
44
+ /** The adapter name for the {@link UriBuilderAdapter} to be used with this service. __Read Only__ */
45
+ uriBuilderName: string;
46
+ /** The {@link UriBuilderAdapter} implementation instance associated with this EntityManager. __Read Only__ */
47
+ uriBuilder?: UriBuilderAdapter;
48
+ /** Whether the server can provide metadata for this service. __Read Only__ */
49
+ hasServerMetadata: boolean;
50
+ /** The {@link JsonResultsAdapter} used to process the results of any query against this DataService. __Read Only__ */
51
+ jsonResultsAdapter: JsonResultsAdapter;
52
+ /** Whether to use JSONP when performing a 'GET' request against this service. __Read Only__
53
+ @deprecated No effect on Breeze's own transport, which has no JSONP support. Kept because it is
54
+ part of a serialized DataService, and because a registered (deprecated) ajax adapter can still
55
+ act on the dataType and crossDomain settings it produces. */
56
+ useJsonp: boolean;
57
+ /** DataService constructor
58
+ ```ts
59
+ var dataService = new DataService({
60
+ serviceName: altServiceName,
61
+ hasServerMetadata: false
62
+ });
63
+ ```
64
+
65
+ ```ts
66
+ var metadataStore = new MetadataStore({
67
+ namingConvention: NamingConvention.camelCase
68
+ });
69
+ ```
70
+
71
+ ```ts
72
+ return new EntityManager({
73
+ dataService: dataService,
74
+ metadataStore: metadataStore
75
+ });
76
+ ```
77
+ @param config - A configuration object.
78
+ */
79
+ constructor(config?: DataServiceConfig);
80
+ /**
81
+ Returns a copy of this DataService with the specified properties applied.
82
+ @param config - The configuration object to apply to create a new DataService.
83
+ */
84
+ using(config: DataServiceConfig): DataService;
85
+ /**
86
+ Combines several DataServices into one, taking each property from the first of them that has it
87
+ set, and filling in the adapters: the named ones, or the defaults. Breeze uses it to combine a
88
+ query's or save's own DataService with the EntityManager's before each request; applications do
89
+ not normally need it.
90
+ @param dataServices - The DataServices to combine, most specific first. Entries may be null or
91
+ undefined. The array is modified.
92
+ @throws if none of them has a `serviceName`.
93
+ */
94
+ static resolve(dataServices: DataService[]): DataService;
95
+ /**
96
+ Returns the serializable form of this DataService: `serviceName`, `adapterName`,
97
+ `uriBuilderName`, `hasServerMetadata`, `useJsonp` and the `name` of its `jsonResultsAdapter`,
98
+ leaving out any that are not set. `JSON.stringify` calls it when `MetadataStore.exportMetadata`
99
+ and `EntityManager.exportEntities` serialize their DataServices; {@link DataService.fromJSON}
100
+ reads it back.
101
+ */
102
+ toJSON(): Object;
103
+ /**
104
+ Creates a DataService from the output of {@link DataService.toJSON}. Used when importing metadata
105
+ and exported entities. The `jsonResultsAdapter` name is looked up among the
106
+ {@link JsonResultsAdapter}s created so far, so create a custom one before importing.
107
+ @param json - A serialized DataService. Its `jsonResultsAdapter` property is replaced.
108
+ @throws if the named `jsonResultsAdapter` does not exist.
109
+ */
110
+ static fromJSON(json: any): DataService;
111
+ /**
112
+ Returns a url for this dataService with the specified suffix. This method handles dataService names either
113
+ with or without trailing '/'s. If the suffix starts with "http" then it will be returned as-is.
114
+ @param suffix {String} The resulting url.
115
+ @returns {a Url string}
116
+ */
117
+ qualifyUrl(suffix: string): string;
118
+ }
119
+ /**
120
+ What a {@link JsonResultsAdapter}'s `visitNode` returns for one node of a query or save result,
121
+ telling Breeze how to treat it. Every property is optional; returning `{}` (or nothing) treats the
122
+ node as plain data.
123
+ */
124
+ export interface NodeMeta {
125
+ /** The type of entity or complex object this node is, or its name. When set, Breeze materializes the node as an entity of that type and merges it into the cache (unless the query is `noTracking`); a complex type is mapped without merging. For a top-level query result with no type, Breeze uses the query's result type. */
126
+ entityType?: EntityType;
127
+ /** An id for this node, such as a Json.NET `$id`, that other nodes can refer to with `nodeRefId`. */
128
+ nodeId?: string;
129
+ /** The `nodeId` of another node that this node stands for, such as a Json.NET `$ref`. Breeze returns the entity or object read from that node in its place. */
130
+ nodeRefId?: string;
131
+ /** Whether to skip this node. A skipped property is left off the object that holds it; a skipped top-level node is dropped from the results (or is `null` there, when the query includes deleted entities). */
132
+ ignore?: boolean;
133
+ /** Whether to keep the node exactly as the server sent it, without mapping its property names to the client's or visiting what it contains. Ignored for a top-level node that has an `entityType`, which is merged as an entity. */
134
+ passThru?: boolean;
135
+ /** Anything else about the node to keep. Breeze stores it on the entity's `entityAspect.extraMetadata`. */
136
+ extraMetadata?: any;
137
+ /** Use this object in place of the node that was visited. */
138
+ node?: any;
139
+ }
140
+ /** Where a node passed to a {@link JsonResultsAdapter}'s `visitNode` sits in the result. */
141
+ export interface NodeContext {
142
+ /** `"root"` for a top-level result, `"navProp"` or `"navPropItem"` for the value or an item of a navigation property, and `"anonProp"` or `"anonPropItem"` for the value or an item of a property of a plain (non-entity) object. */
143
+ nodeType: string;
144
+ /** For an `"anonProp"` or `"anonPropItem"` node, the client name of the property that holds it. */
145
+ propertyName?: string;
146
+ /** For a `"navProp"` or `"navPropItem"` node, the navigation property that holds it. */
147
+ navigationProperty?: NavigationProperty;
148
+ }
149
+ /** Configuration info to be passed to the {@link JsonResultsAdapter} constructor */
150
+ export interface JsonResultsAdapterConfig {
151
+ /** The name of this adapter. This name is used to uniquely identify and locate this instance when an 'exported' JsonResultsAdapter is later imported. */
152
+ name: string;
153
+ /** A Function that is called once per query operation to extract the 'payload' from any json received over the wire.
154
+ This method has a default implementation which to simply return the "results" property from any json returned as a result of executing the query.
155
+ */
156
+ extractResults?: Function;
157
+ /** A function that is called once per save operation to extract the entities from any json received over the wire. Must return an array.
158
+ This method has a default implementation which simply returns the "entities" property from any json returned as a result of executing the save. */
159
+ extractSaveResults?: Function;
160
+ /** A function that is called once per save operation to extract the key mappings from any json received over the wire. Must return an array.
161
+ This method has a default implementation which simply returns the "keyMappings" property from any json returned as a result of executing the save. */
162
+ extractKeyMappings?: (data: {}) => KeyMapping[];
163
+ /** A function that is called once per save operation to extract any deleted keys from any json received over the wire. Must return an array.
164
+ This method has a default implementation which simply returns an empty array. */
165
+ extractDeletedKeys?: (data: {}) => any[];
166
+ /** A visitor method that will be called on each node of the returned payload. Required.
167
+ Breeze always passes all three arguments. Returning nothing is the same as returning `{}`. */
168
+ visitNode: (node: any, mappingContext: MappingContext, nodeContext: NodeContext) => NodeMeta | null | void;
169
+ }
170
+ /**
171
+ A JsonResultsAdapter instance is used to provide custom extraction and parsing logic on the json results returned by any web service.
172
+ This facility makes it possible for breeze to talk to virtually any web service and return objects that will be first class 'breeze' citizens.
173
+ */
174
+ export declare class JsonResultsAdapter {
175
+ /** The name of this adapter. This name is used to uniquely identify and locate this instance when an 'exported' JsonResultsAdapter is later imported. */
176
+ name: string;
177
+ /** A Function that is called once per query operation to extract the 'payload' from any json received over the wire.
178
+ This method has a default implementation which simply returns the "results" property from any json returned as a result of executing the query. */
179
+ extractResults: Function;
180
+ /** A function that is called once per save operation to extract the entities from any json received over the wire. Must return an array.
181
+ This method has a default implementation which simply returns the "entities" property from any json returned as a result of executing the save. */
182
+ extractSaveResults: Function;
183
+ /** A function that is called once per save operation to extract the key mappings from any json received over the wire. Must return an array.
184
+ This method has a default implementation which simply returns the "keyMappings" property from any json returned as a result of executing the save. */
185
+ extractKeyMappings: (data: {}) => KeyMapping[];
186
+ /** A function that is called once per save operation to extract any deleted keys from any json received over the wire. Must return an array.
187
+ This method has a default implementation which is to simply returns the "deletedKeys" property from any json returned as a result of executing the save. */
188
+ extractDeletedKeys?: (data: {}) => any[];
189
+ /** A visitor method that will be called on each node of the returned payload. */
190
+ visitNode: Function;
191
+ /**
192
+ JsonResultsAdapter constructor
193
+
194
+ @example
195
+ //
196
+ var jsonResultsAdapter = new JsonResultsAdapter({
197
+ name: "test1e",
198
+ extractResults: function(json) {
199
+ return json.results;
200
+ },
201
+ visitNode: function(node, mappingContext, nodeContext) {
202
+ var entityType = normalizeTypeName(node.$type);
203
+ var propertyName = nodeContext.propertyName;
204
+ var ignore = propertyName && propertyName.substr(0, 1) === "$";
205
+
206
+ return {
207
+ entityType: entityType,
208
+ nodeId: node.$id,
209
+ nodeRefId: node.$ref,
210
+ ignore: ignore,
211
+ passThru: false // default
212
+ };
213
+ }
214
+ });
215
+
216
+ var dataService = new DataService( {
217
+ serviceName: "breeze/foo",
218
+ jsonResultsAdapter: jsonResultsAdapter
219
+ });
220
+
221
+ var entityManager = new EntityManager( {
222
+ dataService: dataService
223
+ });
224
+
225
+ @param jsConfig - A configuration object.
226
+
227
+ */
228
+ constructor(jsConfig: JsonResultsAdapterConfig);
229
+ }