@gooddata/sdk-backend-base 8.13.0-alpha.2 → 8.13.0-alpha.21

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 (159) hide show
  1. package/dist/cachingBackend/index.js +304 -380
  2. package/dist/cachingBackend/index.js.map +1 -1
  3. package/dist/convertors/fromBackend/afm/result.js +3 -3
  4. package/dist/convertors/fromBackend/afm/result.js.map +1 -1
  5. package/dist/customBackend/execution.js +77 -92
  6. package/dist/customBackend/execution.js.map +1 -1
  7. package/dist/customBackend/index.js +78 -114
  8. package/dist/customBackend/index.js.map +1 -1
  9. package/dist/customBackend/workspace.js +39 -40
  10. package/dist/customBackend/workspace.js.map +1 -1
  11. package/dist/decoratedBackend/attributes.js +21 -22
  12. package/dist/decoratedBackend/attributes.js.map +1 -1
  13. package/dist/decoratedBackend/catalog.js +38 -50
  14. package/dist/decoratedBackend/catalog.js.map +1 -1
  15. package/dist/decoratedBackend/dashboards.js +61 -62
  16. package/dist/decoratedBackend/dashboards.js.map +1 -1
  17. package/dist/decoratedBackend/elements.js +47 -70
  18. package/dist/decoratedBackend/elements.js.map +1 -1
  19. package/dist/decoratedBackend/execution.js +62 -79
  20. package/dist/decoratedBackend/execution.js.map +1 -1
  21. package/dist/decoratedBackend/index.js +90 -104
  22. package/dist/decoratedBackend/index.js.map +1 -1
  23. package/dist/decoratedBackend/securitySettings.js +7 -8
  24. package/dist/decoratedBackend/securitySettings.js.map +1 -1
  25. package/dist/decoratedBackend/workspaceSettings.js +12 -26
  26. package/dist/decoratedBackend/workspaceSettings.js.map +1 -1
  27. package/dist/dummyBackend/index.js +347 -391
  28. package/dist/dummyBackend/index.js.map +1 -1
  29. package/dist/eventingBackend/index.js +42 -49
  30. package/dist/eventingBackend/index.js.map +1 -1
  31. package/dist/ldmFactories/builder.js +14 -16
  32. package/dist/ldmFactories/builder.js.map +1 -1
  33. package/dist/ldmFactories/catalog/attributeFactory.js +22 -32
  34. package/dist/ldmFactories/catalog/attributeFactory.js.map +1 -1
  35. package/dist/ldmFactories/catalog/dateDatasetFactory.js +25 -41
  36. package/dist/ldmFactories/catalog/dateDatasetFactory.js.map +1 -1
  37. package/dist/ldmFactories/catalog/factFactory.js +11 -19
  38. package/dist/ldmFactories/catalog/factFactory.js.map +1 -1
  39. package/dist/ldmFactories/catalog/groupFactory.js +14 -27
  40. package/dist/ldmFactories/catalog/groupFactory.js.map +1 -1
  41. package/dist/ldmFactories/catalog/measureFactory.js +15 -25
  42. package/dist/ldmFactories/catalog/measureFactory.js.map +1 -1
  43. package/dist/ldmFactories/dashboard/insightWidgetFactory.js +20 -27
  44. package/dist/ldmFactories/dashboard/insightWidgetFactory.js.map +1 -1
  45. package/dist/ldmFactories/dashboard/kpiWidgetFactory.js +24 -34
  46. package/dist/ldmFactories/dashboard/kpiWidgetFactory.js.map +1 -1
  47. package/dist/ldmFactories/dashboard/widgetFactory.js +20 -39
  48. package/dist/ldmFactories/dashboard/widgetFactory.js.map +1 -1
  49. package/dist/ldmFactories/metadata/attributeFactory.js +13 -21
  50. package/dist/ldmFactories/metadata/attributeFactory.js.map +1 -1
  51. package/dist/ldmFactories/metadata/dashboardFactory.js +7 -15
  52. package/dist/ldmFactories/metadata/dashboardFactory.js.map +1 -1
  53. package/dist/ldmFactories/metadata/dataSetFactory.js +7 -15
  54. package/dist/ldmFactories/metadata/dataSetFactory.js.map +1 -1
  55. package/dist/ldmFactories/metadata/displayFormFactory.js +13 -21
  56. package/dist/ldmFactories/metadata/displayFormFactory.js.map +1 -1
  57. package/dist/ldmFactories/metadata/factFactory.js +7 -15
  58. package/dist/ldmFactories/metadata/factFactory.js.map +1 -1
  59. package/dist/ldmFactories/metadata/factory.js +17 -23
  60. package/dist/ldmFactories/metadata/factory.js.map +1 -1
  61. package/dist/ldmFactories/metadata/measureFactory.js +13 -21
  62. package/dist/ldmFactories/metadata/measureFactory.js.map +1 -1
  63. package/dist/ldmFactories/metadata/variableFactory.js +7 -15
  64. package/dist/ldmFactories/metadata/variableFactory.js.map +1 -1
  65. package/dist/normalizingBackend/index.js +71 -96
  66. package/dist/normalizingBackend/index.js.map +1 -1
  67. package/dist/normalizingBackend/normalizer.d.ts.map +1 -1
  68. package/dist/normalizingBackend/normalizer.js +130 -138
  69. package/dist/normalizingBackend/normalizer.js.map +1 -1
  70. package/dist/toolkit/auth.js +47 -60
  71. package/dist/toolkit/auth.js.map +1 -1
  72. package/dist/toolkit/execution.js +40 -52
  73. package/dist/toolkit/execution.js.map +1 -1
  74. package/dist/toolkit/paging.js +77 -146
  75. package/dist/toolkit/paging.js.map +1 -1
  76. package/dist/toolkit/pluginUrlValidation.js +9 -9
  77. package/dist/toolkit/pluginUrlValidation.js.map +1 -1
  78. package/dist/workspaceSettingsBackend/index.js +23 -46
  79. package/dist/workspaceSettingsBackend/index.js.map +1 -1
  80. package/esm/cachingBackend/index.js +281 -358
  81. package/esm/cachingBackend/index.js.map +1 -1
  82. package/esm/convertors/fromBackend/afm/result.js +3 -3
  83. package/esm/convertors/fromBackend/afm/result.js.map +1 -1
  84. package/esm/customBackend/execution.js +72 -89
  85. package/esm/customBackend/execution.js.map +1 -1
  86. package/esm/customBackend/index.js +75 -112
  87. package/esm/customBackend/index.js.map +1 -1
  88. package/esm/customBackend/workspace.js +37 -39
  89. package/esm/customBackend/workspace.js.map +1 -1
  90. package/esm/decoratedBackend/attributes.js +21 -23
  91. package/esm/decoratedBackend/attributes.js.map +1 -1
  92. package/esm/decoratedBackend/catalog.js +36 -51
  93. package/esm/decoratedBackend/catalog.js.map +1 -1
  94. package/esm/decoratedBackend/dashboards.js +61 -63
  95. package/esm/decoratedBackend/dashboards.js.map +1 -1
  96. package/esm/decoratedBackend/elements.js +47 -73
  97. package/esm/decoratedBackend/elements.js.map +1 -1
  98. package/esm/decoratedBackend/execution.js +60 -81
  99. package/esm/decoratedBackend/execution.js.map +1 -1
  100. package/esm/decoratedBackend/index.js +88 -103
  101. package/esm/decoratedBackend/index.js.map +1 -1
  102. package/esm/decoratedBackend/securitySettings.js +7 -9
  103. package/esm/decoratedBackend/securitySettings.js.map +1 -1
  104. package/esm/decoratedBackend/workspaceSettings.js +12 -27
  105. package/esm/decoratedBackend/workspaceSettings.js.map +1 -1
  106. package/esm/dummyBackend/index.js +342 -387
  107. package/esm/dummyBackend/index.js.map +1 -1
  108. package/esm/eventingBackend/index.js +37 -45
  109. package/esm/eventingBackend/index.js.map +1 -1
  110. package/esm/ldmFactories/builder.js +14 -17
  111. package/esm/ldmFactories/builder.js.map +1 -1
  112. package/esm/ldmFactories/catalog/attributeFactory.js +15 -27
  113. package/esm/ldmFactories/catalog/attributeFactory.js.map +1 -1
  114. package/esm/ldmFactories/catalog/dateDatasetFactory.js +18 -37
  115. package/esm/ldmFactories/catalog/dateDatasetFactory.js.map +1 -1
  116. package/esm/ldmFactories/catalog/factFactory.js +5 -15
  117. package/esm/ldmFactories/catalog/factFactory.js.map +1 -1
  118. package/esm/ldmFactories/catalog/groupFactory.js +11 -27
  119. package/esm/ldmFactories/catalog/groupFactory.js.map +1 -1
  120. package/esm/ldmFactories/catalog/measureFactory.js +9 -21
  121. package/esm/ldmFactories/catalog/measureFactory.js.map +1 -1
  122. package/esm/ldmFactories/dashboard/insightWidgetFactory.js +16 -25
  123. package/esm/ldmFactories/dashboard/insightWidgetFactory.js.map +1 -1
  124. package/esm/ldmFactories/dashboard/kpiWidgetFactory.js +19 -31
  125. package/esm/ldmFactories/dashboard/kpiWidgetFactory.js.map +1 -1
  126. package/esm/ldmFactories/dashboard/widgetFactory.js +19 -39
  127. package/esm/ldmFactories/dashboard/widgetFactory.js.map +1 -1
  128. package/esm/ldmFactories/metadata/attributeFactory.js +9 -19
  129. package/esm/ldmFactories/metadata/attributeFactory.js.map +1 -1
  130. package/esm/ldmFactories/metadata/dashboardFactory.js +3 -13
  131. package/esm/ldmFactories/metadata/dashboardFactory.js.map +1 -1
  132. package/esm/ldmFactories/metadata/dataSetFactory.js +3 -13
  133. package/esm/ldmFactories/metadata/dataSetFactory.js.map +1 -1
  134. package/esm/ldmFactories/metadata/displayFormFactory.js +9 -19
  135. package/esm/ldmFactories/metadata/displayFormFactory.js.map +1 -1
  136. package/esm/ldmFactories/metadata/factFactory.js +3 -13
  137. package/esm/ldmFactories/metadata/factFactory.js.map +1 -1
  138. package/esm/ldmFactories/metadata/factory.js +16 -23
  139. package/esm/ldmFactories/metadata/factory.js.map +1 -1
  140. package/esm/ldmFactories/metadata/measureFactory.js +9 -19
  141. package/esm/ldmFactories/metadata/measureFactory.js.map +1 -1
  142. package/esm/ldmFactories/metadata/variableFactory.js +3 -13
  143. package/esm/ldmFactories/metadata/variableFactory.js.map +1 -1
  144. package/esm/normalizingBackend/index.js +64 -90
  145. package/esm/normalizingBackend/index.js.map +1 -1
  146. package/esm/normalizingBackend/normalizer.d.ts.map +1 -1
  147. package/esm/normalizingBackend/normalizer.js +125 -136
  148. package/esm/normalizingBackend/normalizer.js.map +1 -1
  149. package/esm/toolkit/auth.js +47 -63
  150. package/esm/toolkit/auth.js.map +1 -1
  151. package/esm/toolkit/execution.js +38 -53
  152. package/esm/toolkit/execution.js.map +1 -1
  153. package/esm/toolkit/paging.js +72 -144
  154. package/esm/toolkit/paging.js.map +1 -1
  155. package/esm/toolkit/pluginUrlValidation.js +8 -8
  156. package/esm/toolkit/pluginUrlValidation.js.map +1 -1
  157. package/esm/workspaceSettingsBackend/index.js +19 -43
  158. package/esm/workspaceSettingsBackend/index.js.map +1 -1
  159. package/package.json +7 -6
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.dummyDataView = exports.dummyBackendEmptyData = exports.dummyBackend = exports.defaultDummyBackendConfig = void 0;
4
- var tslib_1 = require("tslib");
4
+ const tslib_1 = require("tslib");
5
5
  // (C) 2019-2023 GoodData Corporation
6
- var sdk_backend_spi_1 = require("@gooddata/sdk-backend-spi");
7
- var sdk_model_1 = require("@gooddata/sdk-model");
8
- var isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
9
- var isEmpty_1 = tslib_1.__importDefault(require("lodash/isEmpty"));
10
- var execution_1 = require("../toolkit/execution");
6
+ const sdk_backend_spi_1 = require("@gooddata/sdk-backend-spi");
7
+ const sdk_model_1 = require("@gooddata/sdk-model");
8
+ const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
9
+ const isEmpty_1 = tslib_1.__importDefault(require("lodash/isEmpty"));
10
+ const execution_1 = require("../toolkit/execution");
11
11
  /**
12
12
  *
13
13
  */
@@ -27,54 +27,53 @@ exports.defaultDummyBackendConfig = {
27
27
  * @param config - Provide configuration of the backend (host/user)
28
28
  * @internal
29
29
  */
30
- function dummyBackend(config) {
31
- if (config === void 0) { config = exports.defaultDummyBackendConfig; }
32
- var noopBackend = {
30
+ function dummyBackend(config = exports.defaultDummyBackendConfig) {
31
+ const noopBackend = {
33
32
  capabilities: {
34
33
  canCalculateTotals: true,
35
34
  canCalculateSubTotals: true,
36
35
  canCalculateNativeTotals: true,
37
36
  canCalculateGrandTotals: true,
38
37
  },
39
- config: config,
40
- onHostname: function (hostname) {
41
- return dummyBackend(tslib_1.__assign(tslib_1.__assign({}, config), { hostname: hostname }));
38
+ config,
39
+ onHostname(hostname) {
40
+ return dummyBackend(Object.assign(Object.assign({}, config), { hostname }));
42
41
  },
43
- withTelemetry: function (_component, _props) {
42
+ withTelemetry(_component, _props) {
44
43
  return noopBackend;
45
44
  },
46
- withAuthentication: function (_) {
45
+ withAuthentication(_) {
47
46
  return this;
48
47
  },
49
- organization: function (organizationId) {
48
+ organization(organizationId) {
50
49
  return new DummyOrganization(organizationId);
51
50
  },
52
- organizations: function () {
51
+ organizations() {
53
52
  return {
54
- getCurrentOrganization: function () {
53
+ getCurrentOrganization() {
55
54
  return Promise.resolve(new DummyOrganization("dummy-organization-id"));
56
55
  },
57
56
  };
58
57
  },
59
- currentUser: function () {
58
+ currentUser() {
60
59
  throw new sdk_backend_spi_1.NotSupported("not supported");
61
60
  },
62
- workspace: function (id) {
61
+ workspace(id) {
63
62
  return dummyWorkspace(id, config);
64
63
  },
65
- entitlements: function () {
64
+ entitlements() {
66
65
  throw new sdk_backend_spi_1.NotSupported("not supported");
67
66
  },
68
- workspaces: function () {
67
+ workspaces() {
69
68
  throw new sdk_backend_spi_1.NotSupported("not supported");
70
69
  },
71
- authenticate: function () {
70
+ authenticate() {
72
71
  return Promise.resolve({ userId: "dummyUser" });
73
72
  },
74
- deauthenticate: function () {
73
+ deauthenticate() {
75
74
  return Promise.resolve();
76
75
  },
77
- isAuthenticated: function () {
76
+ isAuthenticated() {
78
77
  return Promise.resolve({ userId: "dummyUser" });
79
78
  },
80
79
  };
@@ -108,23 +107,22 @@ exports.dummyBackendEmptyData = dummyBackendEmptyData;
108
107
  * @returns new instance of data view
109
108
  * @internal
110
109
  */
111
- function dummyDataView(definition, result, config) {
112
- if (config === void 0) { config = exports.defaultDummyBackendConfig; }
113
- var factory = new DummyExecutionFactory(config, definition.workspace);
114
- var execResult = result ? result : dummyExecutionResult(definition, factory, config);
115
- var fp = sdk_model_1.defFingerprint(definition) + "/emptyView";
110
+ function dummyDataView(definition, result, config = exports.defaultDummyBackendConfig) {
111
+ const factory = new DummyExecutionFactory(config, definition.workspace);
112
+ const execResult = result ? result : dummyExecutionResult(definition, factory, config);
113
+ const fp = sdk_model_1.defFingerprint(definition) + "/emptyView";
116
114
  return {
117
- definition: definition,
115
+ definition,
118
116
  result: execResult,
119
117
  headerItems: [],
120
118
  data: [],
121
119
  offset: [0, 0],
122
120
  count: [0, 0],
123
121
  totalCount: [0, 0],
124
- fingerprint: function () {
122
+ fingerprint() {
125
123
  return fp;
126
124
  },
127
- equals: function (other) {
125
+ equals(other) {
128
126
  return fp === other.fingerprint();
129
127
  },
130
128
  };
@@ -135,60 +133,56 @@ exports.dummyDataView = dummyDataView;
135
133
  //
136
134
  function dummyWorkspace(workspace, config) {
137
135
  return {
138
- workspace: workspace,
139
- getDescriptor: function () {
140
- return tslib_1.__awaiter(this, void 0, void 0, function () {
141
- return tslib_1.__generator(this, function (_a) {
142
- return [2 /*return*/, dummyDescriptor(this.workspace)];
143
- });
144
- });
136
+ workspace,
137
+ async getDescriptor() {
138
+ return dummyDescriptor(this.workspace);
145
139
  },
146
- getParentWorkspace: function () {
140
+ getParentWorkspace() {
147
141
  throw new sdk_backend_spi_1.NotSupported("not supported");
148
142
  },
149
- execution: function () {
143
+ execution() {
150
144
  return new DummyExecutionFactory(config, workspace);
151
145
  },
152
- catalog: function () {
146
+ catalog() {
153
147
  return new DummyWorkspaceCatalogFactory(workspace);
154
148
  },
155
- attributes: function () {
149
+ attributes() {
156
150
  return new DummyWorkspaceAttributesService(workspace);
157
151
  },
158
- measures: function () {
152
+ measures() {
159
153
  return new DummyWorkspaceMeasuresService(workspace);
160
154
  },
161
- facts: function () {
155
+ facts() {
162
156
  throw new sdk_backend_spi_1.NotSupported("not supported");
163
157
  },
164
- settings: function () {
158
+ settings() {
165
159
  return new DummyWorkspaceSettingsService(workspace);
166
160
  },
167
- insights: function () {
161
+ insights() {
168
162
  throw new sdk_backend_spi_1.NotSupported("not supported");
169
163
  },
170
- dashboards: function () {
164
+ dashboards() {
171
165
  throw new sdk_backend_spi_1.NotSupported("not supported");
172
166
  },
173
- styling: function () {
167
+ styling() {
174
168
  throw new sdk_backend_spi_1.NotSupported("not supported");
175
169
  },
176
- datasets: function () {
170
+ datasets() {
177
171
  throw new sdk_backend_spi_1.NotSupported("not supported");
178
172
  },
179
- permissions: function () {
173
+ permissions() {
180
174
  throw new sdk_backend_spi_1.NotSupported("not supported");
181
175
  },
182
- users: function () {
176
+ users() {
183
177
  throw new sdk_backend_spi_1.NotSupported("not supported");
184
178
  },
185
- userGroups: function () {
179
+ userGroups() {
186
180
  throw new sdk_backend_spi_1.NotSupported("not supported");
187
181
  },
188
- dateFilterConfigs: function () {
182
+ dateFilterConfigs() {
189
183
  throw new sdk_backend_spi_1.NotSupported("not supported");
190
184
  },
191
- accessControl: function () {
185
+ accessControl() {
192
186
  throw new sdk_backend_spi_1.NotSupported("not supported");
193
187
  },
194
188
  };
@@ -201,20 +195,17 @@ function dummyDescriptor(workspaceId) {
201
195
  isDemo: false,
202
196
  };
203
197
  }
204
- var DummyExecutionFactory = /** @class */ (function (_super) {
205
- tslib_1.__extends(DummyExecutionFactory, _super);
206
- function DummyExecutionFactory(config, workspace) {
207
- var _this = _super.call(this, workspace) || this;
208
- _this.config = config;
209
- return _this;
210
- }
211
- DummyExecutionFactory.prototype.forDefinition = function (def) {
198
+ class DummyExecutionFactory extends execution_1.AbstractExecutionFactory {
199
+ constructor(config, workspace) {
200
+ super(workspace);
201
+ this.config = config;
202
+ }
203
+ forDefinition(def) {
212
204
  return dummyPreparedExecution(def, this, this.config);
213
- };
214
- return DummyExecutionFactory;
215
- }(execution_1.AbstractExecutionFactory));
205
+ }
206
+ }
216
207
  function dummyExecutionResult(definition, executionFactory, config) {
217
- var fp = sdk_model_1.defFingerprint(definition) + "/emptyResult";
208
+ const fp = sdk_model_1.defFingerprint(definition) + "/emptyResult";
218
209
  function dummyRead() {
219
210
  if (config.raiseNoDataExceptions) {
220
211
  return Promise.reject(new sdk_backend_spi_1.NoDataError("Empty data view from dummy backend", config.raiseNoDataExceptions === "with-data-view"
@@ -223,71 +214,63 @@ function dummyExecutionResult(definition, executionFactory, config) {
223
214
  }
224
215
  return Promise.resolve(dummyDataView(definition, result, config));
225
216
  }
226
- var result = {
227
- definition: definition,
217
+ const result = {
218
+ definition,
228
219
  dimensions: [],
229
- readAll: function () {
220
+ readAll() {
230
221
  return dummyRead();
231
222
  },
232
- readWindow: function (_1, _2) {
223
+ readWindow(_1, _2) {
233
224
  return dummyRead();
234
225
  },
235
- fingerprint: function () {
226
+ fingerprint() {
236
227
  return fp;
237
228
  },
238
- equals: function (other) {
229
+ equals(other) {
239
230
  return fp === other.fingerprint();
240
231
  },
241
- export: function (_) {
232
+ export(_) {
242
233
  throw new sdk_backend_spi_1.NotSupported("...");
243
234
  },
244
- exportToBlob: function (_) {
235
+ exportToBlob(_) {
245
236
  throw new sdk_backend_spi_1.NotSupported("...");
246
237
  },
247
- transform: function () {
238
+ transform() {
248
239
  return executionFactory.forDefinition(definition);
249
240
  },
250
241
  };
251
242
  return result;
252
243
  }
253
244
  function dummyPreparedExecution(definition, executionFactory, config) {
254
- var fp = sdk_model_1.defFingerprint(definition);
245
+ const fp = sdk_model_1.defFingerprint(definition);
255
246
  return {
256
- definition: definition,
257
- withDimensions: function () {
258
- var dim = [];
259
- for (var _i = 0; _i < arguments.length; _i++) {
260
- dim[_i] = arguments[_i];
261
- }
262
- return executionFactory.forDefinition(sdk_model_1.defWithDimensions.apply(void 0, tslib_1.__spreadArrays([definition], dim)));
247
+ definition,
248
+ withDimensions(...dim) {
249
+ return executionFactory.forDefinition(sdk_model_1.defWithDimensions(definition, ...dim));
263
250
  },
264
- withSorting: function () {
265
- var items = [];
266
- for (var _i = 0; _i < arguments.length; _i++) {
267
- items[_i] = arguments[_i];
268
- }
251
+ withSorting(...items) {
269
252
  return executionFactory.forDefinition(sdk_model_1.defWithSorting(definition, items));
270
253
  },
271
- withDateFormat: function (dateFormat) {
254
+ withDateFormat(dateFormat) {
272
255
  return executionFactory.forDefinition(sdk_model_1.defWithDateFormat(definition, dateFormat));
273
256
  },
274
- execute: function () {
257
+ execute() {
275
258
  return Promise.resolve(dummyExecutionResult(definition, executionFactory, config));
276
259
  },
277
- explain: function () {
260
+ explain() {
278
261
  console.warn("Backend does not support explain mode");
279
262
  return {
280
- data: function () { return Promise.reject(new Error("Backend does not support explain mode data call.")); },
281
- download: function () { return Promise.resolve(); },
263
+ data: () => Promise.reject(new Error(`Backend does not support explain mode data call.`)),
264
+ download: () => Promise.resolve(),
282
265
  };
283
266
  },
284
- fingerprint: function () {
267
+ fingerprint() {
285
268
  return fp;
286
269
  },
287
- equals: function (other) {
270
+ equals(other) {
288
271
  return isEqual_1.default(this.definition, other.definition);
289
272
  },
290
- withExecConfig: function (config) {
273
+ withExecConfig(config) {
291
274
  if (!isEmpty_1.default(config === null || config === void 0 ? void 0 : config.dataSamplingPercentage)) {
292
275
  console.warn("Backend does not support data sampling, result will be not affected");
293
276
  }
@@ -295,203 +278,197 @@ function dummyPreparedExecution(definition, executionFactory, config) {
295
278
  },
296
279
  };
297
280
  }
298
- var DummyWorkspaceCatalogFactory = /** @class */ (function () {
299
- function DummyWorkspaceCatalogFactory(workspace, options) {
300
- if (options === void 0) { options = {
301
- types: ["attribute", "measure", "fact", "dateDataset"],
302
- excludeTags: [],
303
- includeTags: [],
304
- loadGroups: true,
305
- }; }
281
+ class DummyWorkspaceCatalogFactory {
282
+ constructor(workspace, options = {
283
+ types: ["attribute", "measure", "fact", "dateDataset"],
284
+ excludeTags: [],
285
+ includeTags: [],
286
+ loadGroups: true,
287
+ }) {
306
288
  this.workspace = workspace;
307
289
  this.options = options;
308
290
  }
309
- DummyWorkspaceCatalogFactory.prototype.withOptions = function (options) {
310
- var newOptions = tslib_1.__assign(tslib_1.__assign({}, this.options), options);
291
+ withOptions(options) {
292
+ const newOptions = Object.assign(Object.assign({}, this.options), options);
311
293
  return new DummyWorkspaceCatalogFactory(this.workspace, newOptions);
312
- };
313
- DummyWorkspaceCatalogFactory.prototype.forDataset = function (dataset) {
294
+ }
295
+ forDataset(dataset) {
314
296
  return this.withOptions({
315
- dataset: dataset,
297
+ dataset,
316
298
  });
317
- };
318
- DummyWorkspaceCatalogFactory.prototype.forTypes = function (types) {
299
+ }
300
+ forTypes(types) {
319
301
  return this.withOptions({
320
- types: types,
302
+ types,
321
303
  });
322
- };
323
- DummyWorkspaceCatalogFactory.prototype.includeTags = function (tags) {
304
+ }
305
+ includeTags(tags) {
324
306
  return this.withOptions({
325
307
  includeTags: tags,
326
308
  });
327
- };
328
- DummyWorkspaceCatalogFactory.prototype.excludeTags = function (tags) {
309
+ }
310
+ excludeTags(tags) {
329
311
  return this.withOptions({
330
312
  excludeTags: tags,
331
313
  });
332
- };
333
- DummyWorkspaceCatalogFactory.prototype.withGroups = function (loadGroups) {
314
+ }
315
+ withGroups(loadGroups) {
334
316
  return this.withOptions({
335
- loadGroups: loadGroups,
317
+ loadGroups,
336
318
  });
337
- };
338
- DummyWorkspaceCatalogFactory.prototype.load = function () {
319
+ }
320
+ load() {
339
321
  return Promise.resolve(new DummyWorkspaceCatalog(this.workspace));
340
- };
341
- return DummyWorkspaceCatalogFactory;
342
- }());
343
- var DummyWorkspaceCatalog = /** @class */ (function () {
344
- function DummyWorkspaceCatalog(workspace) {
322
+ }
323
+ }
324
+ class DummyWorkspaceCatalog {
325
+ constructor(workspace) {
345
326
  this.workspace = workspace;
346
327
  }
347
- DummyWorkspaceCatalog.prototype.allItems = function () {
328
+ allItems() {
348
329
  return [];
349
- };
350
- DummyWorkspaceCatalog.prototype.attributes = function () {
330
+ }
331
+ attributes() {
351
332
  return [];
352
- };
353
- DummyWorkspaceCatalog.prototype.availableItems = function () {
333
+ }
334
+ availableItems() {
354
335
  return new DummyWorkspaceCatalogAvailableItemsFactory(this.workspace);
355
- };
356
- DummyWorkspaceCatalog.prototype.dateDatasets = function () {
336
+ }
337
+ dateDatasets() {
357
338
  return [];
358
- };
359
- DummyWorkspaceCatalog.prototype.facts = function () {
339
+ }
340
+ facts() {
360
341
  return [];
361
- };
362
- DummyWorkspaceCatalog.prototype.groups = function () {
342
+ }
343
+ groups() {
363
344
  return [];
364
- };
365
- DummyWorkspaceCatalog.prototype.measures = function () {
345
+ }
346
+ measures() {
366
347
  return [];
367
- };
368
- return DummyWorkspaceCatalog;
369
- }());
370
- var DummyWorkspaceCatalogAvailableItemsFactory = /** @class */ (function () {
371
- function DummyWorkspaceCatalogAvailableItemsFactory(workspace, options) {
372
- if (options === void 0) { options = {
373
- items: [],
374
- excludeTags: [],
375
- insight: undefined,
376
- dataset: undefined,
377
- production: false,
378
- includeDateGranularities: [],
379
- includeTags: [],
380
- loadGroups: false,
381
- types: [],
382
- }; }
348
+ }
349
+ }
350
+ class DummyWorkspaceCatalogAvailableItemsFactory {
351
+ constructor(workspace, options = {
352
+ items: [],
353
+ excludeTags: [],
354
+ insight: undefined,
355
+ dataset: undefined,
356
+ production: false,
357
+ includeDateGranularities: [],
358
+ includeTags: [],
359
+ loadGroups: false,
360
+ types: [],
361
+ }) {
383
362
  this.workspace = workspace;
384
363
  this.options = options;
385
364
  }
386
- DummyWorkspaceCatalogAvailableItemsFactory.prototype.excludeTags = function (excludeTags) {
365
+ excludeTags(excludeTags) {
387
366
  return this.withOptions({
388
- excludeTags: excludeTags,
367
+ excludeTags,
389
368
  });
390
- };
369
+ }
391
370
  //eslint-disable-next-line sonarjs/no-identical-functions
392
- DummyWorkspaceCatalogAvailableItemsFactory.prototype.forDataset = function (dataset) {
371
+ forDataset(dataset) {
393
372
  return this.withOptions({
394
- dataset: dataset,
373
+ dataset,
395
374
  });
396
- };
397
- DummyWorkspaceCatalogAvailableItemsFactory.prototype.forInsight = function (insight) {
375
+ }
376
+ forInsight(insight) {
398
377
  return this.withOptions({
399
- insight: insight,
378
+ insight,
400
379
  });
401
- };
402
- DummyWorkspaceCatalogAvailableItemsFactory.prototype.forItems = function (items) {
380
+ }
381
+ forItems(items) {
403
382
  return this.withOptions({
404
- items: items,
383
+ items,
405
384
  });
406
- };
385
+ }
407
386
  //eslint-disable-next-line sonarjs/no-identical-functions
408
- DummyWorkspaceCatalogAvailableItemsFactory.prototype.forTypes = function (types) {
387
+ forTypes(types) {
409
388
  return this.withOptions({
410
- types: types,
389
+ types,
411
390
  });
412
- };
413
- DummyWorkspaceCatalogAvailableItemsFactory.prototype.includeTags = function (includeTags) {
391
+ }
392
+ includeTags(includeTags) {
414
393
  return this.withOptions({
415
- includeTags: includeTags,
394
+ includeTags,
416
395
  });
417
- };
418
- DummyWorkspaceCatalogAvailableItemsFactory.prototype.load = function () {
396
+ }
397
+ load() {
419
398
  return Promise.resolve(new DummyWorkspaceCatalogWithAvailableItems(this.workspace));
420
- };
399
+ }
421
400
  //eslint-disable-next-line sonarjs/no-identical-functions
422
- DummyWorkspaceCatalogAvailableItemsFactory.prototype.withGroups = function (loadGroups) {
401
+ withGroups(loadGroups) {
423
402
  return this.withOptions({
424
- loadGroups: loadGroups,
403
+ loadGroups,
425
404
  });
426
- };
427
- DummyWorkspaceCatalogAvailableItemsFactory.prototype.withOptions = function (options) {
428
- var newOptions = tslib_1.__assign(tslib_1.__assign({}, this.options), options);
405
+ }
406
+ withOptions(options) {
407
+ const newOptions = Object.assign(Object.assign({}, this.options), options);
429
408
  return new DummyWorkspaceCatalogAvailableItemsFactory(this.workspace, newOptions);
430
- };
431
- return DummyWorkspaceCatalogAvailableItemsFactory;
432
- }());
433
- var DummyWorkspaceCatalogWithAvailableItems = /** @class */ (function () {
434
- function DummyWorkspaceCatalogWithAvailableItems(workspace) {
409
+ }
410
+ }
411
+ class DummyWorkspaceCatalogWithAvailableItems {
412
+ constructor(workspace) {
435
413
  this.workspace = workspace;
436
414
  }
437
- DummyWorkspaceCatalogWithAvailableItems.prototype.allAvailableItems = function () {
415
+ allAvailableItems() {
438
416
  return [];
439
- };
440
- DummyWorkspaceCatalogWithAvailableItems.prototype.allItems = function () {
417
+ }
418
+ allItems() {
441
419
  return [];
442
- };
443
- DummyWorkspaceCatalogWithAvailableItems.prototype.attributes = function () {
420
+ }
421
+ attributes() {
444
422
  return [];
445
- };
446
- DummyWorkspaceCatalogWithAvailableItems.prototype.availableAttributes = function () {
423
+ }
424
+ availableAttributes() {
447
425
  return [];
448
- };
449
- DummyWorkspaceCatalogWithAvailableItems.prototype.availableDateDatasets = function () {
426
+ }
427
+ availableDateDatasets() {
450
428
  return [];
451
- };
452
- DummyWorkspaceCatalogWithAvailableItems.prototype.availableFacts = function () {
429
+ }
430
+ availableFacts() {
453
431
  return [];
454
- };
455
- DummyWorkspaceCatalogWithAvailableItems.prototype.availableMeasures = function () {
432
+ }
433
+ availableMeasures() {
456
434
  return [];
457
- };
458
- DummyWorkspaceCatalogWithAvailableItems.prototype.dateDatasets = function () {
435
+ }
436
+ dateDatasets() {
459
437
  return [];
460
- };
461
- DummyWorkspaceCatalogWithAvailableItems.prototype.facts = function () {
438
+ }
439
+ facts() {
462
440
  return [];
463
- };
464
- DummyWorkspaceCatalogWithAvailableItems.prototype.groups = function () {
441
+ }
442
+ groups() {
465
443
  return [];
466
- };
467
- DummyWorkspaceCatalogWithAvailableItems.prototype.measures = function () {
444
+ }
445
+ measures() {
468
446
  return [];
469
- };
470
- return DummyWorkspaceCatalogWithAvailableItems;
471
- }());
472
- var DummyOrganization = /** @class */ (function () {
473
- function DummyOrganization(organizationId) {
447
+ }
448
+ }
449
+ class DummyOrganization {
450
+ constructor(organizationId) {
474
451
  this.organizationId = organizationId;
475
452
  }
476
- DummyOrganization.prototype.getDescriptor = function () {
453
+ getDescriptor() {
477
454
  return Promise.resolve({
478
455
  id: this.organizationId,
479
456
  title: "dummy organization",
480
457
  });
481
- };
482
- DummyOrganization.prototype.securitySettings = function () {
458
+ }
459
+ securitySettings() {
483
460
  return {
484
- scope: "/gdc/domains/" + this.organizationId,
485
- isUrlValid: function (_url, _context) {
461
+ scope: `/gdc/domains/${this.organizationId}`,
462
+ isUrlValid(_url, _context) {
486
463
  return Promise.resolve(true);
487
464
  },
488
- isDashboardPluginUrlValid: function (_url, _workspace) {
465
+ isDashboardPluginUrlValid(_url, _workspace) {
489
466
  return Promise.resolve(true);
490
467
  },
491
468
  };
492
- };
493
- DummyOrganization.prototype.styling = function () {
494
- var resolveTheme = function (theme) {
469
+ }
470
+ styling() {
471
+ const resolveTheme = (theme) => {
495
472
  return Promise.resolve({
496
473
  type: "theme",
497
474
  id: "theme_id",
@@ -505,57 +482,54 @@ var DummyOrganization = /** @class */ (function () {
505
482
  theme: theme.theme,
506
483
  });
507
484
  };
508
- var resolveColorPalette = function (colorPalette) {
509
- return Promise.resolve({
510
- type: "colorPalette",
511
- id: "color_palette_id",
512
- title: "Color Palette 1",
513
- description: "",
514
- production: true,
515
- deprecated: false,
516
- unlisted: false,
517
- ref: sdk_model_1.idRef("color_palette_id"),
518
- uri: "color_palette_uri",
519
- colorPalette: colorPalette.colorPalette,
520
- });
521
- };
485
+ const resolveColorPalette = (colorPalette) => Promise.resolve({
486
+ type: "colorPalette",
487
+ id: "color_palette_id",
488
+ title: "Color Palette 1",
489
+ description: "",
490
+ production: true,
491
+ deprecated: false,
492
+ unlisted: false,
493
+ ref: sdk_model_1.idRef("color_palette_id"),
494
+ uri: "color_palette_uri",
495
+ colorPalette: colorPalette.colorPalette,
496
+ });
522
497
  return {
523
- getThemes: function () { return Promise.resolve([]); },
524
- getActiveTheme: function () { return Promise.resolve(undefined); },
525
- setActiveTheme: function () { return Promise.resolve(); },
526
- clearActiveTheme: function () { return Promise.resolve(); },
498
+ getThemes: () => Promise.resolve([]),
499
+ getActiveTheme: () => Promise.resolve(undefined),
500
+ setActiveTheme: () => Promise.resolve(),
501
+ clearActiveTheme: () => Promise.resolve(),
527
502
  createTheme: resolveTheme,
528
503
  updateTheme: resolveTheme,
529
- deleteTheme: function () { return Promise.resolve(); },
530
- getColorPalettes: function () { return Promise.resolve([]); },
531
- getActiveColorPalette: function () { return Promise.resolve(undefined); },
532
- setActiveColorPalette: function () { return Promise.resolve(); },
533
- clearActiveColorPalette: function () { return Promise.resolve(); },
504
+ deleteTheme: () => Promise.resolve(),
505
+ getColorPalettes: () => Promise.resolve([]),
506
+ getActiveColorPalette: () => Promise.resolve(undefined),
507
+ setActiveColorPalette: () => Promise.resolve(),
508
+ clearActiveColorPalette: () => Promise.resolve(),
534
509
  createColorPalette: resolveColorPalette,
535
510
  updateColorPalette: resolveColorPalette,
536
- deleteColorPalette: function () { return Promise.resolve(); },
511
+ deleteColorPalette: () => Promise.resolve(),
537
512
  };
538
- };
539
- DummyOrganization.prototype.settings = function () {
513
+ }
514
+ settings() {
540
515
  return {
541
- setWhiteLabeling: function () { return Promise.resolve(); },
542
- setLocale: function () { return Promise.resolve(); },
543
- getSettings: function () { return Promise.resolve({}); },
516
+ setWhiteLabeling: () => Promise.resolve(),
517
+ setLocale: () => Promise.resolve(),
518
+ getSettings: () => Promise.resolve({}),
544
519
  };
545
- };
546
- return DummyOrganization;
547
- }());
548
- var DummyWorkspaceSettingsService = /** @class */ (function () {
549
- function DummyWorkspaceSettingsService(workspace) {
520
+ }
521
+ }
522
+ class DummyWorkspaceSettingsService {
523
+ constructor(workspace) {
550
524
  this.workspace = workspace;
551
525
  }
552
- DummyWorkspaceSettingsService.prototype.getSettings = function () {
526
+ getSettings() {
553
527
  return Promise.resolve({
554
528
  workspace: this.workspace,
555
529
  testSetting: "test_value",
556
530
  });
557
- };
558
- DummyWorkspaceSettingsService.prototype.getSettingsForCurrentUser = function () {
531
+ }
532
+ getSettingsForCurrentUser() {
559
533
  return Promise.resolve({
560
534
  workspace: this.workspace,
561
535
  testSetting: "test_value",
@@ -566,165 +540,148 @@ var DummyWorkspaceSettingsService = /** @class */ (function () {
566
540
  decimal: ".",
567
541
  },
568
542
  });
569
- };
570
- DummyWorkspaceSettingsService.prototype.setLocale = function (_locale) {
543
+ }
544
+ setLocale(_locale) {
571
545
  return Promise.resolve();
572
- };
573
- return DummyWorkspaceSettingsService;
574
- }());
575
- var DummyElementsQueryResult = /** @class */ (function () {
576
- function DummyElementsQueryResult(items, limit, offset, totalCount) {
546
+ }
547
+ }
548
+ class DummyElementsQueryResult {
549
+ constructor(items, limit, offset, totalCount) {
577
550
  this.items = items;
578
551
  this.limit = limit;
579
552
  this.offset = offset;
580
553
  this.totalCount = totalCount;
581
554
  }
582
- DummyElementsQueryResult.prototype.next = function () {
555
+ next() {
583
556
  throw new sdk_backend_spi_1.NotSupported("not supported");
584
- };
585
- DummyElementsQueryResult.prototype.goTo = function (_pageIndex) {
557
+ }
558
+ goTo(_pageIndex) {
586
559
  throw new sdk_backend_spi_1.NotSupported("not supported");
587
- };
588
- DummyElementsQueryResult.prototype.all = function () {
560
+ }
561
+ all() {
589
562
  throw new sdk_backend_spi_1.NotSupported("not supported");
590
- };
591
- DummyElementsQueryResult.prototype.allSorted = function (_compareFn) {
563
+ }
564
+ allSorted(_compareFn) {
592
565
  throw new sdk_backend_spi_1.NotSupported("not supported");
593
- };
594
- return DummyElementsQueryResult;
595
- }());
596
- var DummyElementsQuery = /** @class */ (function () {
597
- function DummyElementsQuery(workspace, ref) {
598
- var _this = this;
566
+ }
567
+ }
568
+ class DummyElementsQuery {
569
+ constructor(workspace, ref) {
599
570
  this.workspace = workspace;
600
571
  this.ref = ref;
601
572
  this.offset = 0;
602
573
  this.limit = 50;
603
- this.query = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
604
- return tslib_1.__generator(this, function (_a) {
605
- return [2 /*return*/, new DummyElementsQueryResult([], this.limit, this.offset, 0)];
606
- });
607
- }); };
574
+ this.query = async () => {
575
+ return new DummyElementsQueryResult([], this.limit, this.offset, 0);
576
+ };
608
577
  }
609
- DummyElementsQuery.prototype.withLimit = function (limit) {
578
+ withLimit(limit) {
610
579
  this.limit = limit;
611
580
  return this;
612
- };
613
- DummyElementsQuery.prototype.withOffset = function (offset) {
581
+ }
582
+ withOffset(offset) {
614
583
  this.offset = offset;
615
584
  return this;
616
- };
617
- DummyElementsQuery.prototype.withAttributeFilters = function (_filters) {
585
+ }
586
+ withAttributeFilters(_filters) {
618
587
  throw new sdk_backend_spi_1.NotSupported("not supported");
619
- };
620
- DummyElementsQuery.prototype.withMeasures = function (_measures) {
588
+ }
589
+ withMeasures(_measures) {
621
590
  throw new sdk_backend_spi_1.NotSupported("not supported");
622
- };
623
- DummyElementsQuery.prototype.withOptions = function (_options) {
591
+ }
592
+ withOptions(_options) {
624
593
  throw new sdk_backend_spi_1.NotSupported("not supported");
625
- };
626
- DummyElementsQuery.prototype.withDateFilters = function (_filters) {
594
+ }
595
+ withDateFilters(_filters) {
627
596
  throw new sdk_backend_spi_1.NotSupported("not supported");
628
- };
629
- DummyElementsQuery.prototype.withSignal = function (_) {
597
+ }
598
+ withSignal(_) {
630
599
  throw new sdk_backend_spi_1.NotSupported("not supported");
631
- };
632
- return DummyElementsQuery;
633
- }());
634
- var DummyElementsQueryFactory = /** @class */ (function () {
635
- function DummyElementsQueryFactory(workspace) {
600
+ }
601
+ }
602
+ class DummyElementsQueryFactory {
603
+ constructor(workspace) {
636
604
  this.workspace = workspace;
637
605
  }
638
- DummyElementsQueryFactory.prototype.forDisplayForm = function (ref) {
606
+ forDisplayForm(ref) {
639
607
  return new DummyElementsQuery(this.workspace, ref);
640
- };
641
- DummyElementsQueryFactory.prototype.forFilter = function (_filter, _dateFilterDisplayForm) {
608
+ }
609
+ forFilter(_filter, _dateFilterDisplayForm) {
642
610
  throw new sdk_backend_spi_1.NotSupported("not supported");
643
- };
644
- return DummyElementsQueryFactory;
645
- }());
646
- var DummyWorkspaceAttributesService = /** @class */ (function () {
647
- function DummyWorkspaceAttributesService(workspace) {
611
+ }
612
+ }
613
+ class DummyWorkspaceAttributesService {
614
+ constructor(workspace) {
648
615
  this.workspace = workspace;
649
616
  }
650
- DummyWorkspaceAttributesService.prototype.elements = function () {
617
+ elements() {
651
618
  return new DummyElementsQueryFactory(this.workspace);
652
- };
653
- DummyWorkspaceAttributesService.prototype.getAttributeDisplayForm = function (ref) {
654
- return tslib_1.__awaiter(this, void 0, void 0, function () {
655
- return tslib_1.__generator(this, function (_a) {
656
- return [2 /*return*/, {
657
- attribute: sdk_model_1.idRef("dummyAttribute"),
658
- deprecated: false,
659
- description: "Dummy attribute",
660
- id: sdk_model_1.isIdentifierRef(ref) ? ref.identifier : "dummyDisplayForm",
661
- production: true,
662
- ref: ref,
663
- title: "Dummy display form",
664
- type: "displayForm",
665
- unlisted: false,
666
- uri: sdk_model_1.isUriRef(ref) ? ref.uri : "/gdc/md/" + ref.identifier,
667
- }];
668
- });
669
- });
670
- };
671
- DummyWorkspaceAttributesService.prototype.getAttributeDisplayForms = function (refs) {
672
- var _this = this;
673
- return Promise.all(refs.map(function (ref) { return _this.getAttributeDisplayForm(ref); }));
674
- };
675
- DummyWorkspaceAttributesService.prototype.getAttribute = function (_ref) {
619
+ }
620
+ async getAttributeDisplayForm(ref) {
621
+ return {
622
+ attribute: sdk_model_1.idRef("dummyAttribute"),
623
+ deprecated: false,
624
+ description: "Dummy attribute",
625
+ id: sdk_model_1.isIdentifierRef(ref) ? ref.identifier : "dummyDisplayForm",
626
+ production: true,
627
+ ref,
628
+ title: "Dummy display form",
629
+ type: "displayForm",
630
+ unlisted: false,
631
+ uri: sdk_model_1.isUriRef(ref) ? ref.uri : `/gdc/md/${ref.identifier}`,
632
+ };
633
+ }
634
+ getAttributeDisplayForms(refs) {
635
+ return Promise.all(refs.map((ref) => this.getAttributeDisplayForm(ref)));
636
+ }
637
+ getAttribute(_ref) {
676
638
  throw new sdk_backend_spi_1.NotSupported("not supported");
677
- };
678
- DummyWorkspaceAttributesService.prototype.getAttributeByDisplayForm = function (ref) {
679
- return tslib_1.__awaiter(this, void 0, void 0, function () {
680
- return tslib_1.__generator(this, function (_a) {
681
- return [2 /*return*/, {
682
- deprecated: false,
683
- description: "Dummy attribute",
684
- displayForms: [
685
- {
686
- attribute: sdk_model_1.idRef("dummyAttribute"),
687
- deprecated: false,
688
- description: "Dummy attribute",
689
- id: sdk_model_1.isIdentifierRef(ref) ? ref.identifier : "dummyDisplayForm",
690
- production: true,
691
- ref: ref,
692
- title: "Dummy display form",
693
- type: "displayForm",
694
- unlisted: false,
695
- uri: sdk_model_1.isUriRef(ref) ? ref.uri : "/gdc/md/" + ref.identifier,
696
- },
697
- ],
698
- id: "dummyAttribute",
699
- production: true,
700
- ref: sdk_model_1.idRef("dummyAttribute"),
701
- title: "Dummy attribute",
702
- type: "attribute",
703
- unlisted: false,
704
- uri: "/gdc/md/dummyAttribute",
705
- }];
706
- });
707
- });
708
- };
709
- DummyWorkspaceAttributesService.prototype.getAttributes = function (_refs) {
639
+ }
640
+ async getAttributeByDisplayForm(ref) {
641
+ return {
642
+ deprecated: false,
643
+ description: "Dummy attribute",
644
+ displayForms: [
645
+ {
646
+ attribute: sdk_model_1.idRef("dummyAttribute"),
647
+ deprecated: false,
648
+ description: "Dummy attribute",
649
+ id: sdk_model_1.isIdentifierRef(ref) ? ref.identifier : "dummyDisplayForm",
650
+ production: true,
651
+ ref,
652
+ title: "Dummy display form",
653
+ type: "displayForm",
654
+ unlisted: false,
655
+ uri: sdk_model_1.isUriRef(ref) ? ref.uri : `/gdc/md/${ref.identifier}`,
656
+ },
657
+ ],
658
+ id: "dummyAttribute",
659
+ production: true,
660
+ ref: sdk_model_1.idRef("dummyAttribute"),
661
+ title: "Dummy attribute",
662
+ type: "attribute",
663
+ unlisted: false,
664
+ uri: "/gdc/md/dummyAttribute",
665
+ };
666
+ }
667
+ getAttributes(_refs) {
710
668
  throw new sdk_backend_spi_1.NotSupported("not supported");
711
- };
712
- DummyWorkspaceAttributesService.prototype.getCommonAttributes = function (_attributeRefs) {
669
+ }
670
+ getCommonAttributes(_attributeRefs) {
713
671
  throw new sdk_backend_spi_1.NotSupported("not supported");
714
- };
715
- DummyWorkspaceAttributesService.prototype.getCommonAttributesBatch = function (_attributesRefsBatch) {
672
+ }
673
+ getCommonAttributesBatch(_attributesRefsBatch) {
716
674
  throw new sdk_backend_spi_1.NotSupported("not supported");
717
- };
718
- DummyWorkspaceAttributesService.prototype.getAttributeDatasetMeta = function (_ref) {
675
+ }
676
+ getAttributeDatasetMeta(_ref) {
719
677
  throw new sdk_backend_spi_1.NotSupported("not supported");
720
- };
721
- return DummyWorkspaceAttributesService;
722
- }());
723
- var DummyWorkspaceMeasuresService = /** @class */ (function () {
724
- function DummyWorkspaceMeasuresService(workspace) {
678
+ }
679
+ }
680
+ class DummyWorkspaceMeasuresService {
681
+ constructor(workspace) {
725
682
  this.workspace = workspace;
726
683
  }
727
- DummyWorkspaceMeasuresService.prototype.createMeasure = function (measure) {
684
+ createMeasure(measure) {
728
685
  return Promise.resolve({
729
686
  id: "test_metric_id",
730
687
  uri: "test_metric_id",
@@ -739,19 +696,18 @@ var DummyWorkspaceMeasuresService = /** @class */ (function () {
739
696
  isLocked: measure.isLocked || false,
740
697
  unlisted: measure.unlisted || false,
741
698
  });
742
- };
743
- DummyWorkspaceMeasuresService.prototype.deleteMeasure = function (_measureRef) {
699
+ }
700
+ deleteMeasure(_measureRef) {
744
701
  return Promise.resolve(undefined);
745
- };
746
- DummyWorkspaceMeasuresService.prototype.getMeasureExpressionTokens = function (_ref) {
702
+ }
703
+ getMeasureExpressionTokens(_ref) {
747
704
  return Promise.resolve([]);
748
- };
749
- DummyWorkspaceMeasuresService.prototype.getMeasureReferencingObjects = function (_measureRef) {
705
+ }
706
+ getMeasureReferencingObjects(_measureRef) {
750
707
  return Promise.resolve({});
751
- };
752
- DummyWorkspaceMeasuresService.prototype.updateMeasure = function (measure) {
753
- return Promise.resolve(tslib_1.__assign({}, measure));
754
- };
755
- return DummyWorkspaceMeasuresService;
756
- }());
708
+ }
709
+ updateMeasure(measure) {
710
+ return Promise.resolve(Object.assign({}, measure));
711
+ }
712
+ }
757
713
  //# sourceMappingURL=index.js.map