@gooddata/sdk-backend-base 9.0.0-alpha.8 → 9.0.0-beta.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 (281) hide show
  1. package/esm/cachingBackend/index.js +14 -14
  2. package/esm/cachingBackend/index.js.map +1 -1
  3. package/esm/customBackend/config.d.ts +2 -2
  4. package/esm/customBackend/config.d.ts.map +1 -1
  5. package/esm/customBackend/execution.d.ts +2 -2
  6. package/esm/customBackend/execution.d.ts.map +1 -1
  7. package/esm/customBackend/execution.js +2 -2
  8. package/esm/customBackend/execution.js.map +1 -1
  9. package/esm/customBackend/index.d.ts +3 -3
  10. package/esm/customBackend/index.d.ts.map +1 -1
  11. package/esm/customBackend/index.js +2 -2
  12. package/esm/customBackend/index.js.map +1 -1
  13. package/esm/customBackend/workspace.d.ts +1 -1
  14. package/esm/customBackend/workspace.d.ts.map +1 -1
  15. package/esm/customBackend/workspace.js +1 -1
  16. package/esm/customBackend/workspace.js.map +1 -1
  17. package/esm/decoratedBackend/catalog.js +1 -1
  18. package/esm/decoratedBackend/catalog.js.map +1 -1
  19. package/esm/decoratedBackend/execution.js +1 -1
  20. package/esm/decoratedBackend/execution.js.map +1 -1
  21. package/esm/decoratedBackend/index.js +1 -1
  22. package/esm/decoratedBackend/index.js.map +1 -1
  23. package/esm/dummyBackend/index.js +3 -3
  24. package/esm/dummyBackend/index.js.map +1 -1
  25. package/esm/eventingBackend/index.js +3 -3
  26. package/esm/eventingBackend/index.js.map +1 -1
  27. package/esm/index.d.ts +37 -37
  28. package/esm/index.d.ts.map +1 -1
  29. package/esm/index.js +35 -35
  30. package/esm/index.js.map +1 -1
  31. package/esm/ldmFactories/catalog/attributeFactory.d.ts +4 -4
  32. package/esm/ldmFactories/catalog/attributeFactory.d.ts.map +1 -1
  33. package/esm/ldmFactories/catalog/attributeFactory.js +5 -5
  34. package/esm/ldmFactories/catalog/attributeFactory.js.map +1 -1
  35. package/esm/ldmFactories/catalog/dateDatasetFactory.d.ts +4 -4
  36. package/esm/ldmFactories/catalog/dateDatasetFactory.d.ts.map +1 -1
  37. package/esm/ldmFactories/catalog/dateDatasetFactory.js +5 -5
  38. package/esm/ldmFactories/catalog/dateDatasetFactory.js.map +1 -1
  39. package/esm/ldmFactories/catalog/factFactory.d.ts +3 -3
  40. package/esm/ldmFactories/catalog/factFactory.d.ts.map +1 -1
  41. package/esm/ldmFactories/catalog/factFactory.js +4 -4
  42. package/esm/ldmFactories/catalog/factFactory.js.map +1 -1
  43. package/esm/ldmFactories/catalog/groupFactory.d.ts +1 -1
  44. package/esm/ldmFactories/catalog/groupFactory.d.ts.map +1 -1
  45. package/esm/ldmFactories/catalog/groupFactory.js +2 -2
  46. package/esm/ldmFactories/catalog/groupFactory.js.map +1 -1
  47. package/esm/ldmFactories/catalog/measureFactory.d.ts +3 -3
  48. package/esm/ldmFactories/catalog/measureFactory.d.ts.map +1 -1
  49. package/esm/ldmFactories/catalog/measureFactory.js +4 -4
  50. package/esm/ldmFactories/catalog/measureFactory.js.map +1 -1
  51. package/esm/ldmFactories/dashboard/insightWidgetFactory.d.ts +2 -2
  52. package/esm/ldmFactories/dashboard/insightWidgetFactory.d.ts.map +1 -1
  53. package/esm/ldmFactories/dashboard/insightWidgetFactory.js +2 -2
  54. package/esm/ldmFactories/dashboard/insightWidgetFactory.js.map +1 -1
  55. package/esm/ldmFactories/dashboard/kpiWidgetFactory.d.ts +2 -2
  56. package/esm/ldmFactories/dashboard/kpiWidgetFactory.d.ts.map +1 -1
  57. package/esm/ldmFactories/dashboard/kpiWidgetFactory.js +3 -3
  58. package/esm/ldmFactories/dashboard/kpiWidgetFactory.js.map +1 -1
  59. package/esm/ldmFactories/dashboard/widgetFactory.d.ts +1 -1
  60. package/esm/ldmFactories/dashboard/widgetFactory.d.ts.map +1 -1
  61. package/esm/ldmFactories/dashboard/widgetFactory.js +1 -1
  62. package/esm/ldmFactories/dashboard/widgetFactory.js.map +1 -1
  63. package/esm/ldmFactories/metadata/attributeFactory.d.ts +2 -2
  64. package/esm/ldmFactories/metadata/attributeFactory.d.ts.map +1 -1
  65. package/esm/ldmFactories/metadata/attributeFactory.js +3 -3
  66. package/esm/ldmFactories/metadata/attributeFactory.js.map +1 -1
  67. package/esm/ldmFactories/metadata/dashboardFactory.d.ts +2 -2
  68. package/esm/ldmFactories/metadata/dashboardFactory.d.ts.map +1 -1
  69. package/esm/ldmFactories/metadata/dashboardFactory.js +3 -3
  70. package/esm/ldmFactories/metadata/dashboardFactory.js.map +1 -1
  71. package/esm/ldmFactories/metadata/dataSetFactory.d.ts +2 -2
  72. package/esm/ldmFactories/metadata/dataSetFactory.d.ts.map +1 -1
  73. package/esm/ldmFactories/metadata/dataSetFactory.js +3 -3
  74. package/esm/ldmFactories/metadata/dataSetFactory.js.map +1 -1
  75. package/esm/ldmFactories/metadata/displayFormFactory.d.ts +2 -2
  76. package/esm/ldmFactories/metadata/displayFormFactory.d.ts.map +1 -1
  77. package/esm/ldmFactories/metadata/displayFormFactory.js +3 -3
  78. package/esm/ldmFactories/metadata/displayFormFactory.js.map +1 -1
  79. package/esm/ldmFactories/metadata/factFactory.d.ts +2 -2
  80. package/esm/ldmFactories/metadata/factFactory.d.ts.map +1 -1
  81. package/esm/ldmFactories/metadata/factFactory.js +3 -3
  82. package/esm/ldmFactories/metadata/factFactory.js.map +1 -1
  83. package/esm/ldmFactories/metadata/factory.d.ts +1 -1
  84. package/esm/ldmFactories/metadata/factory.d.ts.map +1 -1
  85. package/esm/ldmFactories/metadata/factory.js +1 -1
  86. package/esm/ldmFactories/metadata/factory.js.map +1 -1
  87. package/esm/ldmFactories/metadata/measureFactory.d.ts +2 -2
  88. package/esm/ldmFactories/metadata/measureFactory.d.ts.map +1 -1
  89. package/esm/ldmFactories/metadata/measureFactory.js +3 -3
  90. package/esm/ldmFactories/metadata/measureFactory.js.map +1 -1
  91. package/esm/ldmFactories/metadata/variableFactory.d.ts +2 -2
  92. package/esm/ldmFactories/metadata/variableFactory.d.ts.map +1 -1
  93. package/esm/ldmFactories/metadata/variableFactory.js +3 -3
  94. package/esm/ldmFactories/metadata/variableFactory.js.map +1 -1
  95. package/esm/normalizingBackend/index.d.ts +1 -1
  96. package/esm/normalizingBackend/index.d.ts.map +1 -1
  97. package/esm/normalizingBackend/index.js +4 -4
  98. package/esm/normalizingBackend/index.js.map +1 -1
  99. package/esm/normalizingBackend/normalizer.d.ts +2 -0
  100. package/esm/normalizingBackend/normalizer.d.ts.map +1 -1
  101. package/esm/normalizingBackend/normalizer.js +18 -4
  102. package/esm/normalizingBackend/normalizer.js.map +1 -1
  103. package/{dist → esm}/sdk-backend-base.d.ts +2 -0
  104. package/esm/toolkit/execution.d.ts +1 -1
  105. package/esm/toolkit/execution.d.ts.map +1 -1
  106. package/esm/toolkit/execution.js +1 -1
  107. package/esm/toolkit/execution.js.map +1 -1
  108. package/esm/toolkit/paging.js +4 -4
  109. package/esm/toolkit/paging.js.map +1 -1
  110. package/esm/tsdoc-metadata.json +1 -1
  111. package/esm/workspaceSettingsBackend/index.js +3 -3
  112. package/esm/workspaceSettingsBackend/index.js.map +1 -1
  113. package/package.json +25 -35
  114. package/dist/cachingBackend/index.d.ts +0 -230
  115. package/dist/cachingBackend/index.d.ts.map +0 -1
  116. package/dist/cachingBackend/index.js +0 -579
  117. package/dist/cachingBackend/index.js.map +0 -1
  118. package/dist/convertors/fromBackend/afm/result.d.ts +0 -18
  119. package/dist/convertors/fromBackend/afm/result.d.ts.map +0 -1
  120. package/dist/convertors/fromBackend/afm/result.js +0 -28
  121. package/dist/convertors/fromBackend/afm/result.js.map +0 -1
  122. package/dist/customBackend/config.d.ts +0 -151
  123. package/dist/customBackend/config.d.ts.map +0 -1
  124. package/dist/customBackend/config.js +0 -3
  125. package/dist/customBackend/config.js.map +0 -1
  126. package/dist/customBackend/execution.d.ts +0 -14
  127. package/dist/customBackend/execution.d.ts.map +0 -1
  128. package/dist/customBackend/execution.js +0 -139
  129. package/dist/customBackend/execution.js.map +0 -1
  130. package/dist/customBackend/index.d.ts +0 -47
  131. package/dist/customBackend/index.d.ts.map +0 -1
  132. package/dist/customBackend/index.js +0 -150
  133. package/dist/customBackend/index.js.map +0 -1
  134. package/dist/customBackend/workspace.d.ts +0 -29
  135. package/dist/customBackend/workspace.d.ts.map +0 -1
  136. package/dist/customBackend/workspace.js +0 -78
  137. package/dist/customBackend/workspace.js.map +0 -1
  138. package/dist/decoratedBackend/attributes.d.ts +0 -19
  139. package/dist/decoratedBackend/attributes.d.ts.map +0 -1
  140. package/dist/decoratedBackend/attributes.js +0 -41
  141. package/dist/decoratedBackend/attributes.js.map +0 -1
  142. package/dist/decoratedBackend/catalog.d.ts +0 -46
  143. package/dist/decoratedBackend/catalog.d.ts.map +0 -1
  144. package/dist/decoratedBackend/catalog.js +0 -70
  145. package/dist/decoratedBackend/catalog.js.map +0 -1
  146. package/dist/decoratedBackend/dashboards.d.ts +0 -40
  147. package/dist/decoratedBackend/dashboards.d.ts.map +0 -1
  148. package/dist/decoratedBackend/dashboards.js +0 -101
  149. package/dist/decoratedBackend/dashboards.js.map +0 -1
  150. package/dist/decoratedBackend/elements.d.ts +0 -66
  151. package/dist/decoratedBackend/elements.d.ts.map +0 -1
  152. package/dist/decoratedBackend/elements.js +0 -81
  153. package/dist/decoratedBackend/elements.js.map +0 -1
  154. package/dist/decoratedBackend/execution.d.ts +0 -107
  155. package/dist/decoratedBackend/execution.d.ts.map +0 -1
  156. package/dist/decoratedBackend/execution.js +0 -152
  157. package/dist/decoratedBackend/execution.js.map +0 -1
  158. package/dist/decoratedBackend/index.d.ts +0 -54
  159. package/dist/decoratedBackend/index.d.ts.map +0 -1
  160. package/dist/decoratedBackend/index.js +0 -181
  161. package/dist/decoratedBackend/index.js.map +0 -1
  162. package/dist/decoratedBackend/securitySettings.d.ts +0 -12
  163. package/dist/decoratedBackend/securitySettings.d.ts.map +0 -1
  164. package/dist/decoratedBackend/securitySettings.js +0 -21
  165. package/dist/decoratedBackend/securitySettings.js.map +0 -1
  166. package/dist/decoratedBackend/workspaceSettings.d.ts +0 -12
  167. package/dist/decoratedBackend/workspaceSettings.d.ts.map +0 -1
  168. package/dist/decoratedBackend/workspaceSettings.js +0 -22
  169. package/dist/decoratedBackend/workspaceSettings.js.map +0 -1
  170. package/dist/dummyBackend/index.d.ts +0 -62
  171. package/dist/dummyBackend/index.d.ts.map +0 -1
  172. package/dist/dummyBackend/index.js +0 -729
  173. package/dist/dummyBackend/index.js.map +0 -1
  174. package/dist/eventingBackend/index.d.ts +0 -74
  175. package/dist/eventingBackend/index.d.ts.map +0 -1
  176. package/dist/eventingBackend/index.js +0 -84
  177. package/dist/eventingBackend/index.js.map +0 -1
  178. package/dist/index.d.ts +0 -48
  179. package/dist/index.d.ts.map +0 -1
  180. package/dist/index.js +0 -117
  181. package/dist/index.js.map +0 -1
  182. package/dist/ldmFactories/builder.d.ts +0 -75
  183. package/dist/ldmFactories/builder.d.ts.map +0 -1
  184. package/dist/ldmFactories/builder.js +0 -59
  185. package/dist/ldmFactories/builder.js.map +0 -1
  186. package/dist/ldmFactories/catalog/attributeFactory.d.ts +0 -27
  187. package/dist/ldmFactories/catalog/attributeFactory.d.ts.map +0 -1
  188. package/dist/ldmFactories/catalog/attributeFactory.js +0 -63
  189. package/dist/ldmFactories/catalog/attributeFactory.js.map +0 -1
  190. package/dist/ldmFactories/catalog/dateDatasetFactory.d.ts +0 -44
  191. package/dist/ldmFactories/catalog/dateDatasetFactory.d.ts.map +0 -1
  192. package/dist/ldmFactories/catalog/dateDatasetFactory.js +0 -87
  193. package/dist/ldmFactories/catalog/dateDatasetFactory.js.map +0 -1
  194. package/dist/ldmFactories/catalog/factFactory.d.ts +0 -22
  195. package/dist/ldmFactories/catalog/factFactory.d.ts.map +0 -1
  196. package/dist/ldmFactories/catalog/factFactory.js +0 -38
  197. package/dist/ldmFactories/catalog/factFactory.js.map +0 -1
  198. package/dist/ldmFactories/catalog/groupFactory.d.ts +0 -38
  199. package/dist/ldmFactories/catalog/groupFactory.d.ts.map +0 -1
  200. package/dist/ldmFactories/catalog/groupFactory.js +0 -47
  201. package/dist/ldmFactories/catalog/groupFactory.js.map +0 -1
  202. package/dist/ldmFactories/catalog/measureFactory.d.ts +0 -23
  203. package/dist/ldmFactories/catalog/measureFactory.d.ts.map +0 -1
  204. package/dist/ldmFactories/catalog/measureFactory.js +0 -45
  205. package/dist/ldmFactories/catalog/measureFactory.js.map +0 -1
  206. package/dist/ldmFactories/dashboard/insightWidgetFactory.d.ts +0 -31
  207. package/dist/ldmFactories/dashboard/insightWidgetFactory.d.ts.map +0 -1
  208. package/dist/ldmFactories/dashboard/insightWidgetFactory.js +0 -45
  209. package/dist/ldmFactories/dashboard/insightWidgetFactory.js.map +0 -1
  210. package/dist/ldmFactories/dashboard/kpiWidgetFactory.d.ts +0 -34
  211. package/dist/ldmFactories/dashboard/kpiWidgetFactory.d.ts.map +0 -1
  212. package/dist/ldmFactories/dashboard/kpiWidgetFactory.js +0 -55
  213. package/dist/ldmFactories/dashboard/kpiWidgetFactory.js.map +0 -1
  214. package/dist/ldmFactories/dashboard/widgetFactory.d.ts +0 -31
  215. package/dist/ldmFactories/dashboard/widgetFactory.d.ts.map +0 -1
  216. package/dist/ldmFactories/dashboard/widgetFactory.js +0 -29
  217. package/dist/ldmFactories/dashboard/widgetFactory.js.map +0 -1
  218. package/dist/ldmFactories/metadata/attributeFactory.d.ts +0 -24
  219. package/dist/ldmFactories/metadata/attributeFactory.d.ts.map +0 -1
  220. package/dist/ldmFactories/metadata/attributeFactory.js +0 -44
  221. package/dist/ldmFactories/metadata/attributeFactory.js.map +0 -1
  222. package/dist/ldmFactories/metadata/dashboardFactory.d.ts +0 -21
  223. package/dist/ldmFactories/metadata/dashboardFactory.d.ts.map +0 -1
  224. package/dist/ldmFactories/metadata/dashboardFactory.js +0 -28
  225. package/dist/ldmFactories/metadata/dashboardFactory.js.map +0 -1
  226. package/dist/ldmFactories/metadata/dataSetFactory.d.ts +0 -21
  227. package/dist/ldmFactories/metadata/dataSetFactory.d.ts.map +0 -1
  228. package/dist/ldmFactories/metadata/dataSetFactory.js +0 -28
  229. package/dist/ldmFactories/metadata/dataSetFactory.js.map +0 -1
  230. package/dist/ldmFactories/metadata/displayFormFactory.d.ts +0 -24
  231. package/dist/ldmFactories/metadata/displayFormFactory.d.ts.map +0 -1
  232. package/dist/ldmFactories/metadata/displayFormFactory.js +0 -40
  233. package/dist/ldmFactories/metadata/displayFormFactory.js.map +0 -1
  234. package/dist/ldmFactories/metadata/factFactory.d.ts +0 -21
  235. package/dist/ldmFactories/metadata/factFactory.d.ts.map +0 -1
  236. package/dist/ldmFactories/metadata/factFactory.js +0 -28
  237. package/dist/ldmFactories/metadata/factFactory.js.map +0 -1
  238. package/dist/ldmFactories/metadata/factory.d.ts +0 -74
  239. package/dist/ldmFactories/metadata/factory.d.ts.map +0 -1
  240. package/dist/ldmFactories/metadata/factory.js +0 -43
  241. package/dist/ldmFactories/metadata/factory.js.map +0 -1
  242. package/dist/ldmFactories/metadata/measureFactory.d.ts +0 -24
  243. package/dist/ldmFactories/metadata/measureFactory.d.ts.map +0 -1
  244. package/dist/ldmFactories/metadata/measureFactory.js +0 -40
  245. package/dist/ldmFactories/metadata/measureFactory.js.map +0 -1
  246. package/dist/ldmFactories/metadata/variableFactory.d.ts +0 -21
  247. package/dist/ldmFactories/metadata/variableFactory.d.ts.map +0 -1
  248. package/dist/ldmFactories/metadata/variableFactory.js +0 -28
  249. package/dist/ldmFactories/metadata/variableFactory.js.map +0 -1
  250. package/dist/normalizingBackend/index.d.ts +0 -46
  251. package/dist/normalizingBackend/index.d.ts.map +0 -1
  252. package/dist/normalizingBackend/index.js +0 -174
  253. package/dist/normalizingBackend/index.js.map +0 -1
  254. package/dist/normalizingBackend/normalizer.d.ts +0 -131
  255. package/dist/normalizingBackend/normalizer.d.ts.map +0 -1
  256. package/dist/normalizingBackend/normalizer.js +0 -352
  257. package/dist/normalizingBackend/normalizer.js.map +0 -1
  258. package/dist/toolkit/auth.d.ts +0 -83
  259. package/dist/toolkit/auth.d.ts.map +0 -1
  260. package/dist/toolkit/auth.js +0 -106
  261. package/dist/toolkit/auth.js.map +0 -1
  262. package/dist/toolkit/backend.d.ts +0 -8
  263. package/dist/toolkit/backend.d.ts.map +0 -1
  264. package/dist/toolkit/backend.js +0 -3
  265. package/dist/toolkit/backend.js.map +0 -1
  266. package/dist/toolkit/execution.d.ts +0 -54
  267. package/dist/toolkit/execution.d.ts.map +0 -1
  268. package/dist/toolkit/execution.js +0 -88
  269. package/dist/toolkit/execution.js.map +0 -1
  270. package/dist/toolkit/paging.d.ts +0 -52
  271. package/dist/toolkit/paging.d.ts.map +0 -1
  272. package/dist/toolkit/paging.js +0 -109
  273. package/dist/toolkit/paging.js.map +0 -1
  274. package/dist/toolkit/pluginUrlValidation.d.ts +0 -9
  275. package/dist/toolkit/pluginUrlValidation.d.ts.map +0 -1
  276. package/dist/toolkit/pluginUrlValidation.js +0 -50
  277. package/dist/toolkit/pluginUrlValidation.js.map +0 -1
  278. package/dist/workspaceSettingsBackend/index.d.ts +0 -53
  279. package/dist/workspaceSettingsBackend/index.d.ts.map +0 -1
  280. package/dist/workspaceSettingsBackend/index.js +0 -42
  281. package/dist/workspaceSettingsBackend/index.js.map +0 -1
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newVariableMetadataObject = exports.VariableMetadataObjectBuilder = void 0;
4
- const tslib_1 = require("tslib");
5
- // (C) 2019-2022 GoodData Corporation
6
- const identity_1 = tslib_1.__importDefault(require("lodash/identity"));
7
- const factory_1 = require("./factory");
8
- const builder_1 = require("../builder");
9
- /**
10
- * Variable metadata object builder
11
- * See {@link Builder}
12
- *
13
- * @beta
14
- */
15
- class VariableMetadataObjectBuilder extends factory_1.MetadataObjectBuilder {
16
- }
17
- exports.VariableMetadataObjectBuilder = VariableMetadataObjectBuilder;
18
- /**
19
- * Variable metadata object factory
20
- *
21
- * @param ref - variable reference
22
- * @param modifications - variable builder modifications to perform
23
- * @returns created variable metadata object
24
- * @beta
25
- */
26
- const newVariableMetadataObject = (ref, modifications = identity_1.default) => (0, builder_1.builderFactory)(VariableMetadataObjectBuilder, { type: "variable", ref }, modifications);
27
- exports.newVariableMetadataObject = newVariableMetadataObject;
28
- //# sourceMappingURL=variableFactory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"variableFactory.js","sourceRoot":"","sources":["../../../src/ldmFactories/metadata/variableFactory.ts"],"names":[],"mappings":";;;;AAAA,qCAAqC;AACrC,uEAAuC;AAEvC,uCAAkD;AAClD,wCAAkE;AAElE;;;;;GAKG;AACH,MAAa,6BAEX,SAAQ,+BAAwB;CAAG;AAFrC,sEAEqC;AAErC;;;;;;;GAOG;AACI,MAAM,yBAAyB,GAAG,CACrC,GAAW,EACX,gBAAqE,kBAAQ,EACtD,EAAE,CACzB,IAAA,wBAAc,EAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,EAAE,aAAa,CAAC,CAAC;AAJ/E,QAAA,yBAAyB,6BAIsD"}
@@ -1,46 +0,0 @@
1
- import { IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
2
- import { NormalizationState } from "./normalizer";
3
- /**
4
- * @beta
5
- */
6
- export type NormalizationWhenExecuteByRef = "prohibit" | "fallback";
7
- /**
8
- * @beta
9
- */
10
- export type NormalizationConfig = {
11
- /**
12
- * Specify callback where the normalizing backend will dispatch state of the normalizations being done.
13
- */
14
- normalizationStatus?: (normalizationState: NormalizationState) => void;
15
- /**
16
- * Specify what should happen if the normalized backend is asked to perform execution by reference.
17
- *
18
- * Background:
19
- *
20
- * Execution by reference cannot be normalized - strictly because execution by reference executes exactly
21
- * what is stored somewhere on the backend (this can connect to authorization schemes, ACLs and so on - such as
22
- * allowing users to execute only insights exactly as they were prepared by someone else)
23
- *
24
- * By default, trying to run execute-by-reference using normalizing decorator will fail. It is possible
25
- * to modify this behavior so that instead there will be fallback to freeform execution. For backends that
26
- * do not support execute-by-ref this is all good.
27
- */
28
- executeByRefMode?: NormalizationWhenExecuteByRef;
29
- };
30
- /**
31
- * Decorates backend with logic which transparently normalizes execution definitions before they are dispatched
32
- * to the underlying backend. The normalization standardizes local identifiers and removes any fields that do not
33
- * impact the resulting data itself: aliases, title customizations and measure format customizations.
34
- *
35
- * All the detail that is stripped on the way to the execution APIs is restored before the results reach the
36
- * caller code.
37
- *
38
- * The normalization is essential to increase cache hits - be it both on client or on the server.
39
- *
40
- * @param realBackend - real backend to decorate
41
- * @param config - Specify configuration of the normalization process, see {@link NormalizationConfig}
42
- * @returns new instance of backend
43
- * @beta
44
- */
45
- export declare function withNormalization(realBackend: IAnalyticalBackend, config?: NormalizationConfig): IAnalyticalBackend;
46
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/normalizingBackend/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,kBAAkB,EAWrB,MAAM,2BAA2B,CAAC;AAYnC,OAAO,EAAgB,kBAAkB,EAAc,MAAM,cAAc,CAAC;AA0M5E;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,GAAG,UAAU,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAC9B;;OAEG;IACH,mBAAmB,CAAC,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAEvE;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,EAAE,6BAA6B,CAAC;CACpD,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC7B,WAAW,EAAE,kBAAkB,EAC/B,MAAM,GAAE,mBAAwB,GACjC,kBAAkB,CAIpB"}
@@ -1,174 +0,0 @@
1
- "use strict";
2
- // (C) 2007-2023 GoodData Corporation
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.withNormalization = void 0;
5
- const tslib_1 = require("tslib");
6
- const sdk_backend_spi_1 = require("@gooddata/sdk-backend-spi");
7
- const decoratedBackend_1 = require("../decoratedBackend");
8
- const execution_1 = require("../decoratedBackend/execution");
9
- const sdk_model_1 = require("@gooddata/sdk-model");
10
- const normalizer_1 = require("./normalizer");
11
- const cloneDeep_1 = tslib_1.__importDefault(require("lodash/cloneDeep"));
12
- class WithNormalizationExecutionFactory extends execution_1.DecoratedExecutionFactory {
13
- constructor(decorated, config) {
14
- super(decorated);
15
- this.config = config;
16
- this.wrap = (original) => {
17
- return new NormalizingPreparedExecution(original, this.decorated, this.config);
18
- };
19
- }
20
- forInsightByRef(insight, filters) {
21
- const isFallbackAllowed = this.config.executeByRefMode === "fallback";
22
- if (isFallbackAllowed) {
23
- return this.forInsight(insight, filters);
24
- }
25
- throw new sdk_backend_spi_1.NotSupported("Execution by reference is not supported when using normalizing backend. " +
26
- "Use forInsight() instead.");
27
- }
28
- }
29
- /**
30
- * Prepared execution which does normalization. The prepared execution works with the original
31
- * exec definition all the time. All operations are done on top of it - except for the execution itself.
32
- *
33
- * Once the execute() is called, the prepared execution will perform normalization and will prepare execution
34
- * for the normalized definition. It uses the original, non-normalizing exec factory for this.
35
- *
36
- * It thus obtains the normalized execution and starts it, obtaining the normalized result.
37
- */
38
- class NormalizingPreparedExecution extends execution_1.DecoratedPreparedExecution {
39
- constructor(decorated, originalExecutionFactory, config) {
40
- super(decorated);
41
- this.originalExecutionFactory = originalExecutionFactory;
42
- this.config = config;
43
- this.execute = () => {
44
- var _a, _b;
45
- const normalizationState = normalizer_1.Normalizer.normalize(this.definition);
46
- const normalizedExecution = this.originalExecutionFactory.forDefinition(normalizationState.normalized);
47
- (_b = (_a = this.config).normalizationStatus) === null || _b === void 0 ? void 0 : _b.call(_a, normalizationState);
48
- return normalizedExecution.execute().then((result) => {
49
- return new DenormalizingExecutionResult(result, normalizationState, this, this.decorated);
50
- });
51
- };
52
- this.createNew = (decorated) => {
53
- return new NormalizingPreparedExecution(decorated, this.originalExecutionFactory, this.config);
54
- };
55
- }
56
- }
57
- /**
58
- * An implementation of de-normalizing execution result.
59
- *
60
- * It receives the result of normalized execution + normalization metadata, and at
61
- * construction time sets up the results definition to be the original definition, and
62
- * then de-normalizes the dimension headers so that they match the original definition.
63
- *
64
- * The result instance receives also receives the normalizing execution which triggered creation of
65
- * the result → this is so that when client calls transform(), they can get back to further customizing the
66
- * execution.
67
- *
68
- * The result instance receives also the original, non-normalizing prepared execution → this is needed
69
- * because of export(). Exports are a server side thing that must be done for the original execution - because
70
- * the normalization process normally takes away the essential detail that is important in the exports - such as
71
- * titles, formats and so on. See the export() implementation - this actually performs the original execution
72
- * and exports result from it.
73
- */
74
- class DenormalizingExecutionResult {
75
- constructor(normalizedResult, normalizationState, normalizingExecution, originalExecution) {
76
- this.normalizedResult = normalizedResult;
77
- this.normalizationState = normalizationState;
78
- this.normalizingExecution = normalizingExecution;
79
- this.originalExecution = originalExecution;
80
- this.transform = () => {
81
- return this.normalizingExecution;
82
- };
83
- this.export = async (options) => {
84
- const originalResult = await this.originalExecution.execute();
85
- return originalResult.export(options);
86
- };
87
- this.exportToBlob = async (options) => {
88
- const originalResult = await this.originalExecution.execute();
89
- return originalResult.exportToBlob(options);
90
- };
91
- this.readAll = () => {
92
- const promisedDataView = this.normalizedResult.readAll();
93
- return promisedDataView
94
- .then((dataView) => {
95
- return new DenormalizedDataView(this, dataView, this.denormalizer);
96
- })
97
- .catch(this.handleDataViewError);
98
- };
99
- this.readWindow = (offset, size) => {
100
- const promisedDataView = this.normalizedResult.readWindow(offset, size);
101
- return promisedDataView
102
- .then((dataView) => {
103
- return new DenormalizedDataView(this, dataView, this.denormalizer);
104
- })
105
- .catch(this.handleDataViewError);
106
- };
107
- this.equals = (other) => {
108
- return this._fingerprint === other.fingerprint();
109
- };
110
- this.fingerprint = () => {
111
- return this._fingerprint;
112
- };
113
- this.handleDataViewError = (error) => {
114
- // make sure that errors with dataViews are repackaged with the dataView denormalized as well
115
- // otherwise the dataViews will not make sense to the caller
116
- if ((0, sdk_backend_spi_1.isNoDataError)(error) && error.dataView) {
117
- throw new sdk_backend_spi_1.NoDataError(error.message, new DenormalizedDataView(this, error.dataView, this.denormalizer));
118
- }
119
- throw error;
120
- };
121
- this.denormalizer = normalizer_1.Denormalizer.from(normalizationState);
122
- this.definition = this.normalizationState.original;
123
- this.dimensions = this.denormalizer.denormalizeDimDescriptors(normalizedResult.dimensions);
124
- this._fingerprint = `normalizedResult_${(0, sdk_model_1.defFingerprint)(this.definition)}`;
125
- }
126
- }
127
- /**
128
- * Denormalized DataView takes mostly copies of the contents of the normalized data view. The only exception is the
129
- * header items. The measure headers included therein may have normalized, incorrect measure names (defaulted by
130
- * backend to localId).
131
- */
132
- class DenormalizedDataView {
133
- constructor(result, normalizedDataView, denormalizer) {
134
- this.normalizedDataView = normalizedDataView;
135
- this.equals = (other) => {
136
- return this._fingerprint === other.fingerprint();
137
- };
138
- this.fingerprint = () => {
139
- return this._fingerprint;
140
- };
141
- this.result = result;
142
- this.definition = this.result.definition;
143
- this.count = (0, cloneDeep_1.default)(this.normalizedDataView.count);
144
- this.data = (0, cloneDeep_1.default)(this.normalizedDataView.data);
145
- this.headerItems = denormalizer.denormalizeHeaders(this.normalizedDataView.headerItems);
146
- this.offset = (0, cloneDeep_1.default)(this.normalizedDataView.offset);
147
- this.totalCount = (0, cloneDeep_1.default)(this.normalizedDataView.totalCount);
148
- this.totals = (0, cloneDeep_1.default)(this.normalizedDataView.totals);
149
- this.totalTotals = (0, cloneDeep_1.default)(this.normalizedDataView.totalTotals);
150
- this._fingerprint = `${this.result.fingerprint()}/${this.offset.join(",")}-${this.count.join(",")}`;
151
- }
152
- }
153
- /**
154
- * Decorates backend with logic which transparently normalizes execution definitions before they are dispatched
155
- * to the underlying backend. The normalization standardizes local identifiers and removes any fields that do not
156
- * impact the resulting data itself: aliases, title customizations and measure format customizations.
157
- *
158
- * All the detail that is stripped on the way to the execution APIs is restored before the results reach the
159
- * caller code.
160
- *
161
- * The normalization is essential to increase cache hits - be it both on client or on the server.
162
- *
163
- * @param realBackend - real backend to decorate
164
- * @param config - Specify configuration of the normalization process, see {@link NormalizationConfig}
165
- * @returns new instance of backend
166
- * @beta
167
- */
168
- function withNormalization(realBackend, config = {}) {
169
- return (0, decoratedBackend_1.decoratedBackend)(realBackend, {
170
- execution: (original) => new WithNormalizationExecutionFactory(original, config),
171
- });
172
- }
173
- exports.withNormalization = withNormalization;
174
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/normalizingBackend/index.ts"],"names":[],"mappings":";AAAA,qCAAqC;;;;AAErC,+DAYmC;AACnC,0DAAuD;AACvD,6DAAsG;AACtG,mDAQ6B;AAC7B,6CAA4E;AAC5E,yEAAyC;AAEzC,MAAM,iCAAkC,SAAQ,qCAAyB;IACrE,YAAY,SAA4B,EAAmB,MAA2B;QAClF,KAAK,CAAC,SAAS,CAAC,CAAC;QADsC,WAAM,GAAN,MAAM,CAAqB;QAiB5E,SAAI,GAAG,CAAC,QAA4B,EAAsB,EAAE;YAClE,OAAO,IAAI,4BAA4B,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACnF,CAAC,CAAC;IAjBF,CAAC;IAED,eAAe,CAAC,OAAiB,EAAE,OAAmB;QAClD,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,KAAK,UAAU,CAAC;QAEtE,IAAI,iBAAiB,EAAE;YACnB,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;SAC5C;QAED,MAAM,IAAI,8BAAY,CAClB,0EAA0E;YACtE,2BAA2B,CAClC,CAAC;IACN,CAAC;CAKJ;AAED;;;;;;;;GAQG;AACH,MAAM,4BAA6B,SAAQ,sCAA0B;IACjE,YACI,SAA6B,EACZ,wBAA2C,EAC3C,MAA2B;QAE5C,KAAK,CAAC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C,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACtD,IAAI,CAAC,IAAI,GAAG,IAAA,mBAAS,EAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,WAAW,GAAG,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;QACxF,IAAI,CAAC,MAAM,GAAG,IAAA,mBAAS,EAAC,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;QACxD,IAAI,CAAC,UAAU,GAAG,IAAA,mBAAS,EAAC,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QAChE,IAAI,CAAC,MAAM,GAAG,IAAA,mBAAS,EAAC,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;QACxD,IAAI,CAAC,WAAW,GAAG,IAAA,mBAAS,EAAC,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;QAElE,IAAI,CAAC,YAAY,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACxG,CAAC;CASJ;AAgCD;;;;;;;;;;;;;;GAcG;AACH,SAAgB,iBAAiB,CAC7B,WAA+B,EAC/B,SAA8B,EAAE;IAEhC,OAAO,IAAA,mCAAgB,EAAC,WAAW,EAAE;QACjC,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,iCAAiC,CAAC,QAAQ,EAAE,MAAM,CAAC;KACnF,CAAC,CAAC;AACP,CAAC;AAPD,8CAOC"}
@@ -1,131 +0,0 @@
1
- import { IExecutionDefinition, IDimensionDescriptor, IResultHeader } from "@gooddata/sdk-model";
2
- /**
3
- * @beta
4
- */
5
- export type LocalIdMap = {
6
- [from: string]: string;
7
- };
8
- /**
9
- * @beta
10
- */
11
- export type NormalizationState = {
12
- /**
13
- * Normalized execution definition
14
- */
15
- readonly normalized: IExecutionDefinition;
16
- /**
17
- * Original execution definition
18
- */
19
- readonly original: IExecutionDefinition;
20
- /**
21
- * Local ID mapping between normalized and original execution definitions.
22
- */
23
- readonly n2oMap: LocalIdMap;
24
- };
25
- /**
26
- * @internal
27
- */
28
- export declare class Denormalizer {
29
- readonly state: NormalizationState;
30
- static from(state: NormalizationState): Denormalizer;
31
- private readonly originalAttributes;
32
- private readonly originalMeasures;
33
- private constructor();
34
- /**
35
- * Given the current normalization state, this method transforms the dimension descriptors of the
36
- * normalized execution, so that all the customization of the original execution definition is restored
37
- * into them:
38
- *
39
- * - Reverse lookup of local identifiers happens
40
- * - Attribute / Measure name is set according to the defined alias
41
- * - Measure format is set according to the format in definition
42
- *
43
- * @param normalizedDims - normalized dimension descriptors
44
- * @returns new descriptors
45
- */
46
- denormalizeDimDescriptors: (normalizedDims: IDimensionDescriptor[]) => IDimensionDescriptor[];
47
- /**
48
- * Derived measures or arithmetic measures have the 'name' in result header defaulted to measure
49
- * localId. This method deals with it. It creates a copy of headers with the measure headers denormalized,
50
- * values replaced with the contents of alias or title (whichever comes first).
51
- *
52
- * @param headerItems - headers to denormalize, copy will be done
53
- * @returns new headers
54
- */
55
- denormalizeHeaders: (headerItems: IResultHeader[][][]) => IResultHeader[][][];
56
- private originalLocalId;
57
- private fillOriginalMeasureTitle;
58
- private originalMeasureTitle;
59
- }
60
- /**
61
- * @internal
62
- */
63
- export interface INormalizerOptions {
64
- /**
65
- * If true, things like aliases, titles, etc. are kept in the objects. Defaults to false.
66
- */
67
- keepRemovableProperties?: boolean;
68
- }
69
- /**
70
- * The normalization of execution definition means stripping away all the detail that is unnecessary for the
71
- * backend:
72
- *
73
- * - attribute / measure alias
74
- * - measure title
75
- * - measure format
76
- * - custom-crafted local IDs
77
- *
78
- * The code does the job by _mutating_ a clone of the original definition. The mutation approach, while not
79
- * backed by functionality in sdk-model and therefore somewhat hacky, is a simpler one for this task.
80
- *
81
- * The main reason behind that is the occurrence of attribute and measure objects in multiple parts of the
82
- * execution definition: same attributes and measures are referenced from both buckets and the attributes and measures
83
- * props of the execution definition. Mutating values means that after normalizing values the execution definition
84
- * is fully normalized.
85
- *
86
- * @internal
87
- */
88
- export declare class Normalizer {
89
- readonly original: IExecutionDefinition;
90
- protected readonly options: INormalizerOptions;
91
- static normalize(def: IExecutionDefinition, options?: INormalizerOptions): NormalizationState;
92
- readonly normalized: IExecutionDefinition;
93
- /**
94
- * original to normalized local id map
95
- */
96
- private readonly o2nMap;
97
- /**
98
- * normalized to original local id map
99
- */
100
- private readonly n2oMap;
101
- private readonly originalMeasures;
102
- private readonly alreadyNormalized;
103
- private constructor();
104
- /**
105
- * Creates a new mapping between original local ID and the proposed normalized local ID. This method
106
- * ensures uniqueness of the normalized local ID. If the proposed normalized local ID is taken, it will
107
- * append a suffix to make a unique local ID.
108
- *
109
- * This can happen if the original execution definition contains same measure / attribute multiple times,
110
- * each time using different local ID.
111
- */
112
- private createUniqueMapping;
113
- private normalizedLocalId;
114
- private maybeNormalizedLocalId;
115
- private normalizeAttributes;
116
- /**
117
- * Simple measure normalization will toss away noop filters. There is nothing else to do.
118
- */
119
- private normalizeSimple;
120
- private normalizePoP;
121
- private normalizePreviousPeriod;
122
- private normalizeArithmetic;
123
- private normalizeMeasure;
124
- private normalizeMeasureByLocalId;
125
- private normalizeMeasures;
126
- private normalizeFilters;
127
- private normalizeSorts;
128
- private normalizeDimensions;
129
- private normalize;
130
- }
131
- //# sourceMappingURL=normalizer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../../src/normalizingBackend/normalizer.ts"],"names":[],"mappings":"AACA,OAAO,EAOH,oBAAoB,EA0BpB,oBAAoB,EACpB,aAAa,EAQhB,MAAM,qBAAqB,CAAC;AAM7B;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IAAE,C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