@salesforce/lds-adapters-analytics-unifiedanalytics 1.290.0 → 1.291.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 (50) hide show
  1. package/dist/es/es2018/analytics-unifiedanalytics.js +958 -543
  2. package/dist/es/es2018/types/src/generated/adapters/createDashboard.d.ts +2 -4
  3. package/dist/es/es2018/types/src/generated/adapters/deleteDashboard.d.ts +14 -0
  4. package/dist/es/es2018/types/src/generated/adapters/deleteVisualization.d.ts +14 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getVisualization.d.ts +28 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getVisualizations.d.ts +28 -0
  7. package/dist/es/es2018/types/src/generated/adapters/updateDashboard.d.ts +23 -0
  8. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +5 -0
  9. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +9 -1
  10. package/dist/es/es2018/types/src/generated/resources/deleteUnifiedAnalyticsDashboardsByDashboardIdOrApiName.d.ts +1 -0
  11. package/dist/es/es2018/types/src/generated/resources/deleteUnifiedAnalyticsVisualizationsByVisualizationIdOrApiName.d.ts +12 -0
  12. package/dist/es/es2018/types/src/generated/resources/getUnifiedAnalyticsVisualizations.d.ts +16 -0
  13. package/dist/es/es2018/types/src/generated/resources/getUnifiedAnalyticsVisualizationsByVisualizationIdOrApiName.d.ts +16 -0
  14. package/dist/es/es2018/types/src/generated/resources/patchUnifiedAnalyticsDashboardsByDashboardIdOrApiName.d.ts +2 -4
  15. package/dist/es/es2018/types/src/generated/resources/postUnifiedAnalyticsDashboards.d.ts +2 -4
  16. package/dist/es/es2018/types/src/generated/resources/postUnifiedAnalyticsVisualizations.d.ts +16 -0
  17. package/dist/es/es2018/types/src/generated/types/AnalyticsVisualizationCollectionRepresentation.d.ts +38 -0
  18. package/dist/es/es2018/types/src/generated/types/{FilterWidgetParametersInputRepresentation.d.ts → AnalyticsVisualizationInputRepresentation.d.ts} +23 -15
  19. package/dist/es/es2018/types/src/generated/types/AnalyticsVisualizationRepresentation.d.ts +62 -0
  20. package/dist/es/es2018/types/src/generated/types/DashboardInputRepresentation.d.ts +5 -7
  21. package/dist/es/es2018/types/src/generated/types/DashboardRepresentation.d.ts +9 -12
  22. package/package.json +3 -3
  23. package/sfdc/index.js +1093 -614
  24. package/src/raml/api.raml +103 -406
  25. package/src/raml/luvio.raml +31 -1
  26. package/dist/es/es2018/types/src/generated/types/AnalyticsWidgetInputRepresentation.d.ts +0 -43
  27. package/dist/es/es2018/types/src/generated/types/AnalyticsWidgetRepresentation.d.ts +0 -32
  28. package/dist/es/es2018/types/src/generated/types/AnalyticsWidgetStylesInputRepresentation.d.ts +0 -40
  29. package/dist/es/es2018/types/src/generated/types/AnalyticsWidgetStylesRepresentation.d.ts +0 -40
  30. package/dist/es/es2018/types/src/generated/types/ButtonWidgetIconInputRepresentation.d.ts +0 -31
  31. package/dist/es/es2018/types/src/generated/types/ButtonWidgetIconRepresentation.d.ts +0 -31
  32. package/dist/es/es2018/types/src/generated/types/ButtonWidgetParametersInputRepresentation.d.ts +0 -46
  33. package/dist/es/es2018/types/src/generated/types/ButtonWidgetParametersRepresentation.d.ts +0 -46
  34. package/dist/es/es2018/types/src/generated/types/ButtonWidgetStylesInputRepresentation.d.ts +0 -32
  35. package/dist/es/es2018/types/src/generated/types/ButtonWidgetStylesRepresentation.d.ts +0 -32
  36. package/dist/es/es2018/types/src/generated/types/DashboardLayoutInputRepresentation.d.ts +0 -41
  37. package/dist/es/es2018/types/src/generated/types/DashboardLayoutPageInputRepresentation.d.ts +0 -44
  38. package/dist/es/es2018/types/src/generated/types/DashboardLayoutPageRepresentation.d.ts +0 -33
  39. package/dist/es/es2018/types/src/generated/types/DashboardLayoutRepresentation.d.ts +0 -30
  40. package/dist/es/es2018/types/src/generated/types/DashboardPageWidgetInputRepresentation.d.ts +0 -49
  41. package/dist/es/es2018/types/src/generated/types/DashboardPageWidgetRepresentation.d.ts +0 -38
  42. package/dist/es/es2018/types/src/generated/types/FilterWidgetParametersRepresentation.d.ts +0 -32
  43. package/dist/es/es2018/types/src/generated/types/TextWidgetContentAttributeInputRepresentation.d.ts +0 -34
  44. package/dist/es/es2018/types/src/generated/types/TextWidgetContentAttributeRepresentation.d.ts +0 -34
  45. package/dist/es/es2018/types/src/generated/types/TextWidgetContentParameterInputRepresentation.d.ts +0 -31
  46. package/dist/es/es2018/types/src/generated/types/TextWidgetContentParameterRepresentation.d.ts +0 -32
  47. package/dist/es/es2018/types/src/generated/types/TextWidgetParametersInputRepresentation.d.ts +0 -31
  48. package/dist/es/es2018/types/src/generated/types/TextWidgetParametersRepresentation.d.ts +0 -32
  49. package/dist/es/es2018/types/src/generated/types/VisualizationWidgetParametersInputRepresentation.d.ts +0 -31
  50. package/dist/es/es2018/types/src/generated/types/VisualizationWidgetParametersRepresentation.d.ts +0 -31
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$4, StoreKeyMap, createResourceParams as createResourceParams$4 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4, typeCheckConfig as typeCheckConfig$9, StoreKeyMap, createResourceParams as createResourceParams$9 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -93,7 +93,827 @@ function createLink(ref) {
93
93
  };
94
94
  }
95
95
 
96
- function validate$i(obj, path = 'BaseAnalyticsRepresentation') {
96
+ const VERSION$4 = "4a961b470a805882e90c05020d119eea";
97
+ function validate$c(obj, path = 'DashboardRepresentation') {
98
+ const v_error = (() => {
99
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
100
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
101
+ }
102
+ const obj_createdBy = obj.createdBy;
103
+ const path_createdBy = path + '.createdBy';
104
+ if (obj_createdBy === undefined) {
105
+ return new TypeError('Expected "defined" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
106
+ }
107
+ const obj_createdDate = obj.createdDate;
108
+ const path_createdDate = path + '.createdDate';
109
+ if (typeof obj_createdDate !== 'string') {
110
+ return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
111
+ }
112
+ if (obj.description !== undefined) {
113
+ const obj_description = obj.description;
114
+ const path_description = path + '.description';
115
+ if (typeof obj_description !== 'string') {
116
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
117
+ }
118
+ }
119
+ const obj_id = obj.id;
120
+ const path_id = path + '.id';
121
+ if (typeof obj_id !== 'string') {
122
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
123
+ }
124
+ const obj_label = obj.label;
125
+ const path_label = path + '.label';
126
+ if (typeof obj_label !== 'string') {
127
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
128
+ }
129
+ if (obj.lastModifiedBy !== undefined) {
130
+ const obj_lastModifiedBy = obj.lastModifiedBy;
131
+ const path_lastModifiedBy = path + '.lastModifiedBy';
132
+ if (obj_lastModifiedBy === undefined) {
133
+ return new TypeError('Expected "defined" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
134
+ }
135
+ }
136
+ if (obj.lastModifiedDate !== undefined) {
137
+ const obj_lastModifiedDate = obj.lastModifiedDate;
138
+ const path_lastModifiedDate = path + '.lastModifiedDate';
139
+ if (typeof obj_lastModifiedDate !== 'string') {
140
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
141
+ }
142
+ }
143
+ const obj_layouts = obj.layouts;
144
+ const path_layouts = path + '.layouts';
145
+ if (!ArrayIsArray(obj_layouts)) {
146
+ return new TypeError('Expected "array" but received "' + typeof obj_layouts + '" (at "' + path_layouts + '")');
147
+ }
148
+ for (let i = 0; i < obj_layouts.length; i++) {
149
+ const obj_layouts_item = obj_layouts[i];
150
+ const path_layouts_item = path_layouts + '[' + i + ']';
151
+ if (obj_layouts_item === undefined) {
152
+ return new TypeError('Expected "defined" but received "' + typeof obj_layouts_item + '" (at "' + path_layouts_item + '")');
153
+ }
154
+ }
155
+ const obj_name = obj.name;
156
+ const path_name = path + '.name';
157
+ if (typeof obj_name !== 'string') {
158
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
159
+ }
160
+ const obj_url = obj.url;
161
+ const path_url = path + '.url';
162
+ if (typeof obj_url !== 'string') {
163
+ return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
164
+ }
165
+ const obj_widgets = obj.widgets;
166
+ const path_widgets = path + '.widgets';
167
+ if (typeof obj_widgets !== 'object' || ArrayIsArray(obj_widgets) || obj_widgets === null) {
168
+ return new TypeError('Expected "object" but received "' + typeof obj_widgets + '" (at "' + path_widgets + '")');
169
+ }
170
+ const obj_widgets_keys = ObjectKeys(obj_widgets);
171
+ for (let i = 0; i < obj_widgets_keys.length; i++) {
172
+ const key = obj_widgets_keys[i];
173
+ const obj_widgets_prop = obj_widgets[key];
174
+ const path_widgets_prop = path_widgets + '["' + key + '"]';
175
+ if (obj_widgets_prop === undefined) {
176
+ return new TypeError('Expected "defined" but received "' + typeof obj_widgets_prop + '" (at "' + path_widgets_prop + '")');
177
+ }
178
+ }
179
+ })();
180
+ return v_error === undefined ? null : v_error;
181
+ }
182
+ const RepresentationType$4 = 'DashboardRepresentation';
183
+ function keyBuilder$c(luvio, config) {
184
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.name;
185
+ }
186
+ function keyBuilderFromType$2(luvio, object) {
187
+ const keyParams = {
188
+ name: object.name
189
+ };
190
+ return keyBuilder$c(luvio, keyParams);
191
+ }
192
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
193
+ return input;
194
+ }
195
+ const select$b = function DashboardRepresentationSelect() {
196
+ return {
197
+ kind: 'Fragment',
198
+ version: VERSION$4,
199
+ private: [],
200
+ opaque: true
201
+ };
202
+ };
203
+ function equals$4(existing, incoming) {
204
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
205
+ return false;
206
+ }
207
+ return true;
208
+ }
209
+ const ingest$4 = function DashboardRepresentationIngest(input, path, luvio, store, timestamp) {
210
+ if (process.env.NODE_ENV !== 'production') {
211
+ const validateError = validate$c(input);
212
+ if (validateError !== null) {
213
+ throw validateError;
214
+ }
215
+ }
216
+ const key = keyBuilderFromType$2(luvio, input);
217
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
218
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "UnifiedAnalytics", VERSION$4, RepresentationType$4, equals$4);
219
+ return createLink(key);
220
+ };
221
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
222
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
223
+ const rootKey = keyBuilderFromType$2(luvio, input);
224
+ rootKeySet.set(rootKey, {
225
+ namespace: keyPrefix,
226
+ representationName: RepresentationType$4,
227
+ mergeable: false
228
+ });
229
+ }
230
+
231
+ const VERSION$3 = "962823130e6a9315240ef0e0f0c5f757";
232
+ function validate$b(obj, path = 'DashboardCollectionRepresentation') {
233
+ const v_error = (() => {
234
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
235
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
236
+ }
237
+ const obj_dashboards = obj.dashboards;
238
+ const path_dashboards = path + '.dashboards';
239
+ if (!ArrayIsArray(obj_dashboards)) {
240
+ return new TypeError('Expected "array" but received "' + typeof obj_dashboards + '" (at "' + path_dashboards + '")');
241
+ }
242
+ for (let i = 0; i < obj_dashboards.length; i++) {
243
+ const obj_dashboards_item = obj_dashboards[i];
244
+ const path_dashboards_item = path_dashboards + '[' + i + ']';
245
+ if (typeof obj_dashboards_item !== 'object') {
246
+ return new TypeError('Expected "object" but received "' + typeof obj_dashboards_item + '" (at "' + path_dashboards_item + '")');
247
+ }
248
+ }
249
+ })();
250
+ return v_error === undefined ? null : v_error;
251
+ }
252
+ const RepresentationType$3 = 'DashboardCollectionRepresentation';
253
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
254
+ const input_dashboards = input.dashboards;
255
+ const input_dashboards_id = path.fullPath + '__dashboards';
256
+ for (let i = 0; i < input_dashboards.length; i++) {
257
+ const input_dashboards_item = input_dashboards[i];
258
+ let input_dashboards_item_id = input_dashboards_id + '__' + i;
259
+ input_dashboards[i] = ingest$4(input_dashboards_item, {
260
+ fullPath: input_dashboards_item_id,
261
+ propertyName: i,
262
+ parent: {
263
+ data: input,
264
+ key: path.fullPath,
265
+ existing: existing,
266
+ },
267
+ ttl: path.ttl
268
+ }, luvio, store, timestamp);
269
+ }
270
+ return input;
271
+ }
272
+ const select$a = function DashboardCollectionRepresentationSelect() {
273
+ return {
274
+ kind: 'Fragment',
275
+ version: VERSION$3,
276
+ private: [],
277
+ selections: [
278
+ {
279
+ name: 'dashboards',
280
+ kind: 'Link',
281
+ plural: true,
282
+ fragment: select$b()
283
+ }
284
+ ]
285
+ };
286
+ };
287
+ function equals$3(existing, incoming) {
288
+ const existing_dashboards = existing.dashboards;
289
+ const incoming_dashboards = incoming.dashboards;
290
+ const equals_dashboards_items = equalsArray(existing_dashboards, incoming_dashboards, (existing_dashboards_item, incoming_dashboards_item) => {
291
+ if (!(existing_dashboards_item.__ref === incoming_dashboards_item.__ref)) {
292
+ return false;
293
+ }
294
+ });
295
+ if (equals_dashboards_items === false) {
296
+ return false;
297
+ }
298
+ return true;
299
+ }
300
+ const ingest$3 = function DashboardCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
301
+ if (process.env.NODE_ENV !== 'production') {
302
+ const validateError = validate$b(input);
303
+ if (validateError !== null) {
304
+ throw validateError;
305
+ }
306
+ }
307
+ const key = path.fullPath;
308
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
309
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "UnifiedAnalytics", VERSION$3, RepresentationType$3, equals$3);
310
+ return createLink(key);
311
+ };
312
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
313
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
314
+ const rootKey = fullPathFactory();
315
+ rootKeySet.set(rootKey, {
316
+ namespace: keyPrefix,
317
+ representationName: RepresentationType$3,
318
+ mergeable: false
319
+ });
320
+ const input_dashboards_length = input.dashboards.length;
321
+ for (let i = 0; i < input_dashboards_length; i++) {
322
+ getTypeCacheKeys$4(rootKeySet, luvio, input.dashboards[i]);
323
+ }
324
+ }
325
+
326
+ function select$9(luvio, params) {
327
+ return select$a();
328
+ }
329
+ function keyBuilder$b(luvio, params) {
330
+ return keyPrefix + '::DashboardCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
331
+ }
332
+ function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
333
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
334
+ }
335
+ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
336
+ const { body } = response;
337
+ const key = keyBuilder$b(luvio, resourceParams);
338
+ luvio.storeIngest(key, ingest$3, body);
339
+ const snapshot = luvio.storeLookup({
340
+ recordId: key,
341
+ node: select$9(),
342
+ variables: {},
343
+ }, snapshotRefresh);
344
+ if (process.env.NODE_ENV !== 'production') {
345
+ if (snapshot.state !== 'Fulfilled') {
346
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
347
+ }
348
+ }
349
+ deepFreeze(snapshot.data);
350
+ return snapshot;
351
+ }
352
+ function ingestError$3(luvio, params, error, snapshotRefresh) {
353
+ const key = keyBuilder$b(luvio, params);
354
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
355
+ luvio.storeIngestError(key, errorSnapshot);
356
+ return errorSnapshot;
357
+ }
358
+ function createResourceRequest$8(config) {
359
+ const headers = {};
360
+ return {
361
+ baseUri: '/services/data/v62.0',
362
+ basePath: '/unified-analytics/dashboards',
363
+ method: 'get',
364
+ body: null,
365
+ urlParams: {},
366
+ queryParams: config.queryParams,
367
+ headers,
368
+ priority: 'normal',
369
+ };
370
+ }
371
+
372
+ const adapterName$8 = 'getDashboards';
373
+ const getDashboards_ConfigPropertyMetadata = [
374
+ generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
375
+ generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
376
+ ];
377
+ const getDashboards_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getDashboards_ConfigPropertyMetadata);
378
+ const createResourceParams$8 = /*#__PURE__*/ createResourceParams$9(getDashboards_ConfigPropertyMetadata);
379
+ function keyBuilder$a(luvio, config) {
380
+ const resourceParams = createResourceParams$8(config);
381
+ return keyBuilder$b(luvio, resourceParams);
382
+ }
383
+ function typeCheckConfig$8(untrustedConfig) {
384
+ const config = {};
385
+ typeCheckConfig$9(untrustedConfig, config, getDashboards_ConfigPropertyMetadata);
386
+ return config;
387
+ }
388
+ function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
389
+ if (!untrustedIsObject(untrustedConfig)) {
390
+ return null;
391
+ }
392
+ if (process.env.NODE_ENV !== 'production') {
393
+ validateConfig(untrustedConfig, configPropertyNames);
394
+ }
395
+ const config = typeCheckConfig$8(untrustedConfig);
396
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
397
+ return null;
398
+ }
399
+ return config;
400
+ }
401
+ function adapterFragment$3(luvio, config) {
402
+ createResourceParams$8(config);
403
+ return select$9();
404
+ }
405
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
406
+ const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
407
+ config,
408
+ resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
409
+ });
410
+ return luvio.storeBroadcast().then(() => snapshot);
411
+ }
412
+ function onFetchResponseError$3(luvio, config, resourceParams, response) {
413
+ const snapshot = ingestError$3(luvio, resourceParams, response, {
414
+ config,
415
+ resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
416
+ });
417
+ return luvio.storeBroadcast().then(() => snapshot);
418
+ }
419
+ function buildNetworkSnapshot$8(luvio, config, options) {
420
+ const resourceParams = createResourceParams$8(config);
421
+ const request = createResourceRequest$8(resourceParams);
422
+ return luvio.dispatchResourceRequest(request, options)
423
+ .then((response) => {
424
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
425
+ const cache = new StoreKeyMap();
426
+ getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
427
+ return cache;
428
+ });
429
+ }, (response) => {
430
+ return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
431
+ });
432
+ }
433
+ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
434
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
435
+ }
436
+ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
437
+ const { luvio, config } = context;
438
+ const selector = {
439
+ recordId: keyBuilder$a(luvio, config),
440
+ node: adapterFragment$3(luvio, config),
441
+ variables: {},
442
+ };
443
+ const cacheSnapshot = storeLookup(selector, {
444
+ config,
445
+ resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
446
+ });
447
+ return cacheSnapshot;
448
+ }
449
+ const getDashboardsAdapterFactory = (luvio) => function UnifiedAnalytics__getDashboards(untrustedConfig, requestContext) {
450
+ const config = validateAdapterConfig$8(untrustedConfig, getDashboards_ConfigPropertyNames);
451
+ // Invalid or incomplete config
452
+ if (config === null) {
453
+ return null;
454
+ }
455
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
456
+ buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
457
+ };
458
+
459
+ function select$8(luvio, params) {
460
+ return select$b();
461
+ }
462
+ function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
463
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
464
+ }
465
+ function ingestSuccess$5(luvio, resourceParams, response) {
466
+ const { body } = response;
467
+ const key = keyBuilderFromType$2(luvio, body);
468
+ luvio.storeIngest(key, ingest$4, body);
469
+ const snapshot = luvio.storeLookup({
470
+ recordId: key,
471
+ node: select$8(),
472
+ variables: {},
473
+ });
474
+ if (process.env.NODE_ENV !== 'production') {
475
+ if (snapshot.state !== 'Fulfilled') {
476
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
477
+ }
478
+ }
479
+ deepFreeze(snapshot.data);
480
+ return snapshot;
481
+ }
482
+ function createResourceRequest$7(config) {
483
+ const headers = {};
484
+ return {
485
+ baseUri: '/services/data/v62.0',
486
+ basePath: '/unified-analytics/dashboards',
487
+ method: 'post',
488
+ body: config.body,
489
+ urlParams: {},
490
+ queryParams: {},
491
+ headers,
492
+ priority: 'normal',
493
+ };
494
+ }
495
+
496
+ const adapterName$7 = 'createDashboard';
497
+ const createDashboard_ConfigPropertyMetadata = [
498
+ generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
499
+ generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
500
+ generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
501
+ generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
502
+ generateParamConfigMetadata('layouts', true, 2 /* Body */, 4 /* Unsupported */, true),
503
+ generateParamConfigMetadata('widgets', true, 2 /* Body */, 4 /* Unsupported */),
504
+ ];
505
+ const createDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, createDashboard_ConfigPropertyMetadata);
506
+ const createResourceParams$7 = /*#__PURE__*/ createResourceParams$9(createDashboard_ConfigPropertyMetadata);
507
+ function typeCheckConfig$7(untrustedConfig) {
508
+ const config = {};
509
+ typeCheckConfig$9(untrustedConfig, config, createDashboard_ConfigPropertyMetadata);
510
+ const untrustedConfig_layouts = untrustedConfig.layouts;
511
+ if (ArrayIsArray$1(untrustedConfig_layouts)) {
512
+ const untrustedConfig_layouts_array = [];
513
+ for (let i = 0, arrayLength = untrustedConfig_layouts.length; i < arrayLength; i++) {
514
+ const untrustedConfig_layouts_item = untrustedConfig_layouts[i];
515
+ untrustedConfig_layouts_array.push(untrustedConfig_layouts_item);
516
+ }
517
+ config.layouts = untrustedConfig_layouts_array;
518
+ }
519
+ const untrustedConfig_widgets = untrustedConfig.widgets;
520
+ if (untrustedIsObject(untrustedConfig_widgets)) {
521
+ const untrustedConfig_widgets_object = {};
522
+ const untrustedConfig_widgets_keys = Object.keys(untrustedConfig_widgets);
523
+ for (let i = 0, arrayLength = untrustedConfig_widgets_keys.length; i < arrayLength; i++) {
524
+ const key = untrustedConfig_widgets_keys[i];
525
+ const untrustedConfig_widgets_prop = untrustedConfig_widgets[key];
526
+ if (untrustedConfig_widgets_object !== undefined) {
527
+ untrustedConfig_widgets_object[key] = untrustedConfig_widgets_prop;
528
+ }
529
+ }
530
+ if (untrustedConfig_widgets_object !== undefined && Object.keys(untrustedConfig_widgets_object).length >= 0) {
531
+ config.widgets = untrustedConfig_widgets_object;
532
+ }
533
+ }
534
+ return config;
535
+ }
536
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
537
+ if (!untrustedIsObject(untrustedConfig)) {
538
+ return null;
539
+ }
540
+ if (process.env.NODE_ENV !== 'production') {
541
+ validateConfig(untrustedConfig, configPropertyNames);
542
+ }
543
+ const config = typeCheckConfig$7(untrustedConfig);
544
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
545
+ return null;
546
+ }
547
+ return config;
548
+ }
549
+ function buildNetworkSnapshot$7(luvio, config, options) {
550
+ const resourceParams = createResourceParams$7(config);
551
+ const request = createResourceRequest$7(resourceParams);
552
+ return luvio.dispatchResourceRequest(request, options)
553
+ .then((response) => {
554
+ return luvio.handleSuccessResponse(() => {
555
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response);
556
+ return luvio.storeBroadcast().then(() => snapshot);
557
+ }, () => {
558
+ const cache = new StoreKeyMap();
559
+ getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
560
+ return cache;
561
+ });
562
+ }, (response) => {
563
+ deepFreeze(response);
564
+ throw response;
565
+ });
566
+ }
567
+ const createDashboardAdapterFactory = (luvio) => {
568
+ return function createDashboard(untrustedConfig) {
569
+ const config = validateAdapterConfig$7(untrustedConfig, createDashboard_ConfigPropertyNames);
570
+ // Invalid or incomplete config
571
+ if (config === null) {
572
+ throw new Error('Invalid config for "createDashboard"');
573
+ }
574
+ return buildNetworkSnapshot$7(luvio, config);
575
+ };
576
+ };
577
+
578
+ function keyBuilder$9(luvio, params) {
579
+ return keyBuilder$c(luvio, {
580
+ name: params.urlParams.dashboardIdOrApiName
581
+ });
582
+ }
583
+ function getResponseCacheKeys$6(cacheKeyMap, luvio, resourceParams) {
584
+ const key = keyBuilder$9(luvio, resourceParams);
585
+ cacheKeyMap.set(key, {
586
+ namespace: keyPrefix,
587
+ representationName: RepresentationType$4,
588
+ mergeable: false
589
+ });
590
+ }
591
+ function evictSuccess$1(luvio, resourceParams) {
592
+ const key = keyBuilder$9(luvio, resourceParams);
593
+ luvio.storeEvict(key);
594
+ }
595
+ function createResourceRequest$6(config) {
596
+ const headers = {};
597
+ return {
598
+ baseUri: '/services/data/v62.0',
599
+ basePath: '/unified-analytics/dashboards/' + config.urlParams.dashboardIdOrApiName + '',
600
+ method: 'delete',
601
+ body: null,
602
+ urlParams: config.urlParams,
603
+ queryParams: {},
604
+ headers,
605
+ priority: 'normal',
606
+ };
607
+ }
608
+
609
+ const adapterName$6 = 'deleteDashboard';
610
+ const deleteDashboard_ConfigPropertyMetadata = [
611
+ generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
612
+ ];
613
+ const deleteDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, deleteDashboard_ConfigPropertyMetadata);
614
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$9(deleteDashboard_ConfigPropertyMetadata);
615
+ function typeCheckConfig$6(untrustedConfig) {
616
+ const config = {};
617
+ typeCheckConfig$9(untrustedConfig, config, deleteDashboard_ConfigPropertyMetadata);
618
+ return config;
619
+ }
620
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
621
+ if (!untrustedIsObject(untrustedConfig)) {
622
+ return null;
623
+ }
624
+ if (process.env.NODE_ENV !== 'production') {
625
+ validateConfig(untrustedConfig, configPropertyNames);
626
+ }
627
+ const config = typeCheckConfig$6(untrustedConfig);
628
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
629
+ return null;
630
+ }
631
+ return config;
632
+ }
633
+ function buildNetworkSnapshot$6(luvio, config, options) {
634
+ const resourceParams = createResourceParams$6(config);
635
+ const request = createResourceRequest$6(resourceParams);
636
+ return luvio.dispatchResourceRequest(request, options)
637
+ .then(() => {
638
+ return luvio.handleSuccessResponse(() => {
639
+ evictSuccess$1(luvio, resourceParams);
640
+ return luvio.storeBroadcast();
641
+ }, () => {
642
+ const cache = new StoreKeyMap();
643
+ getResponseCacheKeys$6(cache, luvio, resourceParams);
644
+ return cache;
645
+ });
646
+ }, (response) => {
647
+ deepFreeze(response);
648
+ throw response;
649
+ });
650
+ }
651
+ const deleteDashboardAdapterFactory = (luvio) => {
652
+ return function UnifiedAnalyticsdeleteDashboard(untrustedConfig) {
653
+ const config = validateAdapterConfig$6(untrustedConfig, deleteDashboard_ConfigPropertyNames);
654
+ // Invalid or incomplete config
655
+ if (config === null) {
656
+ throw new Error(`Invalid config for "${adapterName$6}"`);
657
+ }
658
+ return buildNetworkSnapshot$6(luvio, config);
659
+ };
660
+ };
661
+
662
+ function select$7(luvio, params) {
663
+ return select$b();
664
+ }
665
+ function keyBuilder$8(luvio, params) {
666
+ return keyBuilder$c(luvio, {
667
+ name: params.urlParams.dashboardIdOrApiName
668
+ });
669
+ }
670
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
671
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
672
+ }
673
+ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
674
+ const { body } = response;
675
+ const key = keyBuilder$8(luvio, resourceParams);
676
+ luvio.storeIngest(key, ingest$4, body);
677
+ const snapshot = luvio.storeLookup({
678
+ recordId: key,
679
+ node: select$7(),
680
+ variables: {},
681
+ }, snapshotRefresh);
682
+ if (process.env.NODE_ENV !== 'production') {
683
+ if (snapshot.state !== 'Fulfilled') {
684
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
685
+ }
686
+ }
687
+ deepFreeze(snapshot.data);
688
+ return snapshot;
689
+ }
690
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
691
+ const key = keyBuilder$8(luvio, params);
692
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
693
+ luvio.storeIngestError(key, errorSnapshot);
694
+ return errorSnapshot;
695
+ }
696
+ function createResourceRequest$5(config) {
697
+ const headers = {};
698
+ return {
699
+ baseUri: '/services/data/v62.0',
700
+ basePath: '/unified-analytics/dashboards/' + config.urlParams.dashboardIdOrApiName + '',
701
+ method: 'get',
702
+ body: null,
703
+ urlParams: config.urlParams,
704
+ queryParams: {},
705
+ headers,
706
+ priority: 'normal',
707
+ };
708
+ }
709
+
710
+ const adapterName$5 = 'getDashboardByName';
711
+ const getDashboardByName_ConfigPropertyMetadata = [
712
+ generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
713
+ ];
714
+ const getDashboardByName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getDashboardByName_ConfigPropertyMetadata);
715
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$9(getDashboardByName_ConfigPropertyMetadata);
716
+ function keyBuilder$7(luvio, config) {
717
+ const resourceParams = createResourceParams$5(config);
718
+ return keyBuilder$8(luvio, resourceParams);
719
+ }
720
+ function typeCheckConfig$5(untrustedConfig) {
721
+ const config = {};
722
+ typeCheckConfig$9(untrustedConfig, config, getDashboardByName_ConfigPropertyMetadata);
723
+ return config;
724
+ }
725
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
726
+ if (!untrustedIsObject(untrustedConfig)) {
727
+ return null;
728
+ }
729
+ if (process.env.NODE_ENV !== 'production') {
730
+ validateConfig(untrustedConfig, configPropertyNames);
731
+ }
732
+ const config = typeCheckConfig$5(untrustedConfig);
733
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
734
+ return null;
735
+ }
736
+ return config;
737
+ }
738
+ function adapterFragment$2(luvio, config) {
739
+ createResourceParams$5(config);
740
+ return select$7();
741
+ }
742
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
743
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
744
+ config,
745
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
746
+ });
747
+ return luvio.storeBroadcast().then(() => snapshot);
748
+ }
749
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
750
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
751
+ config,
752
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
753
+ });
754
+ return luvio.storeBroadcast().then(() => snapshot);
755
+ }
756
+ function buildNetworkSnapshot$5(luvio, config, options) {
757
+ const resourceParams = createResourceParams$5(config);
758
+ const request = createResourceRequest$5(resourceParams);
759
+ return luvio.dispatchResourceRequest(request, options)
760
+ .then((response) => {
761
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
762
+ const cache = new StoreKeyMap();
763
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
764
+ return cache;
765
+ });
766
+ }, (response) => {
767
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
768
+ });
769
+ }
770
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
771
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
772
+ }
773
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
774
+ const { luvio, config } = context;
775
+ const selector = {
776
+ recordId: keyBuilder$7(luvio, config),
777
+ node: adapterFragment$2(luvio, config),
778
+ variables: {},
779
+ };
780
+ const cacheSnapshot = storeLookup(selector, {
781
+ config,
782
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
783
+ });
784
+ return cacheSnapshot;
785
+ }
786
+ const getDashboardByNameAdapterFactory = (luvio) => function UnifiedAnalytics__getDashboardByName(untrustedConfig, requestContext) {
787
+ const config = validateAdapterConfig$5(untrustedConfig, getDashboardByName_ConfigPropertyNames);
788
+ // Invalid or incomplete config
789
+ if (config === null) {
790
+ return null;
791
+ }
792
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
793
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
794
+ };
795
+
796
+ function select$6(luvio, params) {
797
+ return select$b();
798
+ }
799
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
800
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
801
+ }
802
+ function ingestSuccess$3(luvio, resourceParams, response) {
803
+ const { body } = response;
804
+ const key = keyBuilderFromType$2(luvio, body);
805
+ luvio.storeIngest(key, ingest$4, body);
806
+ const snapshot = luvio.storeLookup({
807
+ recordId: key,
808
+ node: select$6(),
809
+ variables: {},
810
+ });
811
+ if (process.env.NODE_ENV !== 'production') {
812
+ if (snapshot.state !== 'Fulfilled') {
813
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
814
+ }
815
+ }
816
+ deepFreeze(snapshot.data);
817
+ return snapshot;
818
+ }
819
+ function createResourceRequest$4(config) {
820
+ const headers = {};
821
+ return {
822
+ baseUri: '/services/data/v62.0',
823
+ basePath: '/unified-analytics/dashboards/' + config.urlParams.dashboardIdOrApiName + '',
824
+ method: 'patch',
825
+ body: config.body,
826
+ urlParams: config.urlParams,
827
+ queryParams: {},
828
+ headers,
829
+ priority: 'normal',
830
+ };
831
+ }
832
+
833
+ const adapterName$4 = 'updateDashboard';
834
+ const updateDashboard_ConfigPropertyMetadata = [
835
+ generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
836
+ generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
837
+ generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
838
+ generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
839
+ generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
840
+ generateParamConfigMetadata('layouts', true, 2 /* Body */, 4 /* Unsupported */, true),
841
+ generateParamConfigMetadata('widgets', true, 2 /* Body */, 4 /* Unsupported */),
842
+ ];
843
+ const updateDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, updateDashboard_ConfigPropertyMetadata);
844
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$9(updateDashboard_ConfigPropertyMetadata);
845
+ function typeCheckConfig$4(untrustedConfig) {
846
+ const config = {};
847
+ typeCheckConfig$9(untrustedConfig, config, updateDashboard_ConfigPropertyMetadata);
848
+ const untrustedConfig_layouts = untrustedConfig.layouts;
849
+ if (ArrayIsArray$1(untrustedConfig_layouts)) {
850
+ const untrustedConfig_layouts_array = [];
851
+ for (let i = 0, arrayLength = untrustedConfig_layouts.length; i < arrayLength; i++) {
852
+ const untrustedConfig_layouts_item = untrustedConfig_layouts[i];
853
+ untrustedConfig_layouts_array.push(untrustedConfig_layouts_item);
854
+ }
855
+ config.layouts = untrustedConfig_layouts_array;
856
+ }
857
+ const untrustedConfig_widgets = untrustedConfig.widgets;
858
+ if (untrustedIsObject(untrustedConfig_widgets)) {
859
+ const untrustedConfig_widgets_object = {};
860
+ const untrustedConfig_widgets_keys = Object.keys(untrustedConfig_widgets);
861
+ for (let i = 0, arrayLength = untrustedConfig_widgets_keys.length; i < arrayLength; i++) {
862
+ const key = untrustedConfig_widgets_keys[i];
863
+ const untrustedConfig_widgets_prop = untrustedConfig_widgets[key];
864
+ if (untrustedConfig_widgets_object !== undefined) {
865
+ untrustedConfig_widgets_object[key] = untrustedConfig_widgets_prop;
866
+ }
867
+ }
868
+ if (untrustedConfig_widgets_object !== undefined && Object.keys(untrustedConfig_widgets_object).length >= 0) {
869
+ config.widgets = untrustedConfig_widgets_object;
870
+ }
871
+ }
872
+ return config;
873
+ }
874
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
875
+ if (!untrustedIsObject(untrustedConfig)) {
876
+ return null;
877
+ }
878
+ if (process.env.NODE_ENV !== 'production') {
879
+ validateConfig(untrustedConfig, configPropertyNames);
880
+ }
881
+ const config = typeCheckConfig$4(untrustedConfig);
882
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
883
+ return null;
884
+ }
885
+ return config;
886
+ }
887
+ function buildNetworkSnapshot$4(luvio, config, options) {
888
+ const resourceParams = createResourceParams$4(config);
889
+ const request = createResourceRequest$4(resourceParams);
890
+ return luvio.dispatchResourceRequest(request, options)
891
+ .then((response) => {
892
+ return luvio.handleSuccessResponse(() => {
893
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response);
894
+ return luvio.storeBroadcast().then(() => snapshot);
895
+ }, () => {
896
+ const cache = new StoreKeyMap();
897
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
898
+ return cache;
899
+ });
900
+ }, (response) => {
901
+ deepFreeze(response);
902
+ throw response;
903
+ });
904
+ }
905
+ const updateDashboardAdapterFactory = (luvio) => {
906
+ return function updateDashboard(untrustedConfig) {
907
+ const config = validateAdapterConfig$4(untrustedConfig, updateDashboard_ConfigPropertyNames);
908
+ // Invalid or incomplete config
909
+ if (config === null) {
910
+ throw new Error('Invalid config for "updateDashboard"');
911
+ }
912
+ return buildNetworkSnapshot$4(luvio, config);
913
+ };
914
+ };
915
+
916
+ function validate$a(obj, path = 'BaseAnalyticsRepresentation') {
97
917
  const v_error = (() => {
98
918
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
99
919
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -128,8 +948,8 @@ function validate$i(obj, path = 'BaseAnalyticsRepresentation') {
128
948
  return v_error === undefined ? null : v_error;
129
949
  }
130
950
 
131
- function validate$h(obj, path = 'AnalyticsUserRepresentation') {
132
- const validateBaseAnalyticsRepresentation_validateError = validate$i(obj, path);
951
+ function validate$9(obj, path = 'AnalyticsUserRepresentation') {
952
+ const validateBaseAnalyticsRepresentation_validateError = validate$a(obj, path);
133
953
  if (validateBaseAnalyticsRepresentation_validateError !== null) {
134
954
  return validateBaseAnalyticsRepresentation_validateError;
135
955
  }
@@ -169,134 +989,15 @@ function validate$h(obj, path = 'AnalyticsUserRepresentation') {
169
989
  return v_error === undefined ? null : v_error;
170
990
  }
171
991
 
172
- function validate$g(obj, path = 'DashboardPageWidgetRepresentation') {
173
- const validateBaseAnalyticsRepresentation_validateError = validate$i(obj, path);
174
- if (validateBaseAnalyticsRepresentation_validateError !== null) {
175
- return validateBaseAnalyticsRepresentation_validateError;
176
- }
177
- const v_error = (() => {
178
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
179
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
180
- }
181
- const obj_colspan = obj.colspan;
182
- const path_colspan = path + '.colspan';
183
- if (typeof obj_colspan !== 'number' || (typeof obj_colspan === 'number' && Math.floor(obj_colspan) !== obj_colspan)) {
184
- return new TypeError('Expected "integer" but received "' + typeof obj_colspan + '" (at "' + path_colspan + '")');
185
- }
186
- const obj_column = obj.column;
187
- const path_column = path + '.column';
188
- if (typeof obj_column !== 'number' || (typeof obj_column === 'number' && Math.floor(obj_column) !== obj_column)) {
189
- return new TypeError('Expected "integer" but received "' + typeof obj_column + '" (at "' + path_column + '")');
190
- }
191
- const obj_row = obj.row;
192
- const path_row = path + '.row';
193
- if (typeof obj_row !== 'number' || (typeof obj_row === 'number' && Math.floor(obj_row) !== obj_row)) {
194
- return new TypeError('Expected "integer" but received "' + typeof obj_row + '" (at "' + path_row + '")');
195
- }
196
- const obj_rowspan = obj.rowspan;
197
- const path_rowspan = path + '.rowspan';
198
- if (typeof obj_rowspan !== 'number' || (typeof obj_rowspan === 'number' && Math.floor(obj_rowspan) !== obj_rowspan)) {
199
- return new TypeError('Expected "integer" but received "' + typeof obj_rowspan + '" (at "' + path_rowspan + '")');
200
- }
201
- })();
202
- return v_error === undefined ? null : v_error;
203
- }
204
-
205
- function validate$f(obj, path = 'DashboardLayoutPageRepresentation') {
206
- const validateBaseAnalyticsRepresentation_validateError = validate$i(obj, path);
207
- if (validateBaseAnalyticsRepresentation_validateError !== null) {
208
- return validateBaseAnalyticsRepresentation_validateError;
209
- }
210
- const v_error = (() => {
211
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
212
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
213
- }
214
- if (obj.navigationHidden !== undefined) {
215
- const obj_navigationHidden = obj.navigationHidden;
216
- const path_navigationHidden = path + '.navigationHidden';
217
- if (typeof obj_navigationHidden !== 'boolean') {
218
- return new TypeError('Expected "boolean" but received "' + typeof obj_navigationHidden + '" (at "' + path_navigationHidden + '")');
219
- }
220
- }
221
- const obj_widgets = obj.widgets;
222
- const path_widgets = path + '.widgets';
223
- if (!ArrayIsArray(obj_widgets)) {
224
- return new TypeError('Expected "array" but received "' + typeof obj_widgets + '" (at "' + path_widgets + '")');
225
- }
226
- for (let i = 0; i < obj_widgets.length; i++) {
227
- const obj_widgets_item = obj_widgets[i];
228
- const path_widgets_item = path_widgets + '[' + i + ']';
229
- const referencepath_widgets_itemValidationError = validate$g(obj_widgets_item, path_widgets_item);
230
- if (referencepath_widgets_itemValidationError !== null) {
231
- let message = 'Object doesn\'t match DashboardPageWidgetRepresentation (at "' + path_widgets_item + '")\n';
232
- message += referencepath_widgets_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
233
- return new TypeError(message);
234
- }
235
- }
236
- })();
237
- return v_error === undefined ? null : v_error;
238
- }
239
-
240
- function validate$e(obj, path = 'DashboardLayoutRepresentation') {
241
- const validateBaseAnalyticsRepresentation_validateError = validate$i(obj, path);
242
- if (validateBaseAnalyticsRepresentation_validateError !== null) {
243
- return validateBaseAnalyticsRepresentation_validateError;
244
- }
245
- const v_error = (() => {
246
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
247
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
248
- }
249
- const obj_pages = obj.pages;
250
- const path_pages = path + '.pages';
251
- if (!ArrayIsArray(obj_pages)) {
252
- return new TypeError('Expected "array" but received "' + typeof obj_pages + '" (at "' + path_pages + '")');
253
- }
254
- for (let i = 0; i < obj_pages.length; i++) {
255
- const obj_pages_item = obj_pages[i];
256
- const path_pages_item = path_pages + '[' + i + ']';
257
- const referencepath_pages_itemValidationError = validate$f(obj_pages_item, path_pages_item);
258
- if (referencepath_pages_itemValidationError !== null) {
259
- let message = 'Object doesn\'t match DashboardLayoutPageRepresentation (at "' + path_pages_item + '")\n';
260
- message += referencepath_pages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
261
- return new TypeError(message);
262
- }
263
- }
264
- })();
265
- return v_error === undefined ? null : v_error;
266
- }
267
-
268
- function validate$d(obj, path = 'AnalyticsWidgetRepresentation') {
269
- const validateBaseAnalyticsRepresentation_validateError = validate$i(obj, path);
270
- if (validateBaseAnalyticsRepresentation_validateError !== null) {
271
- return validateBaseAnalyticsRepresentation_validateError;
272
- }
273
- const v_error = (() => {
274
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
275
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
276
- }
277
- const obj_parameters = obj.parameters;
278
- const path_parameters = path + '.parameters';
279
- if (obj_parameters === undefined) {
280
- return new TypeError('Expected "defined" but received "' + typeof obj_parameters + '" (at "' + path_parameters + '")');
281
- }
282
- const obj_type = obj.type;
283
- const path_type = path + '.type';
284
- if (typeof obj_type !== 'string') {
285
- return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
286
- }
287
- })();
288
- return v_error === undefined ? null : v_error;
289
- }
290
-
291
- const VERSION$2 = "0f0931d08d785620d6d9fe5956fcf344";
292
- function validate$c(obj, path = 'DashboardRepresentation') {
992
+ const VERSION$2 = "13e8e39beeffee6e3f13ac9a24b8e8be";
993
+ function validate$8(obj, path = 'AnalyticsVisualizationRepresentation') {
293
994
  const v_error = (() => {
294
995
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
295
996
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
296
997
  }
297
998
  const obj_createdBy = obj.createdBy;
298
999
  const path_createdBy = path + '.createdBy';
299
- const referencepath_createdByValidationError = validate$h(obj_createdBy, path_createdBy);
1000
+ const referencepath_createdByValidationError = validate$9(obj_createdBy, path_createdBy);
300
1001
  if (referencepath_createdByValidationError !== null) {
301
1002
  let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_createdBy + '")\n';
302
1003
  message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -307,6 +1008,11 @@ function validate$c(obj, path = 'DashboardRepresentation') {
307
1008
  if (typeof obj_createdDate !== 'string') {
308
1009
  return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
309
1010
  }
1011
+ const obj_dataSource = obj.dataSource;
1012
+ const path_dataSource = path + '.dataSource';
1013
+ if (typeof obj_dataSource !== 'string') {
1014
+ return new TypeError('Expected "string" but received "' + typeof obj_dataSource + '" (at "' + path_dataSource + '")');
1015
+ }
310
1016
  if (obj.description !== undefined) {
311
1017
  const obj_description = obj.description;
312
1018
  const path_description = path + '.description';
@@ -327,79 +1033,42 @@ function validate$c(obj, path = 'DashboardRepresentation') {
327
1033
  if (obj.lastModifiedBy !== undefined) {
328
1034
  const obj_lastModifiedBy = obj.lastModifiedBy;
329
1035
  const path_lastModifiedBy = path + '.lastModifiedBy';
330
- const referencepath_lastModifiedByValidationError = validate$h(obj_lastModifiedBy, path_lastModifiedBy);
331
- if (referencepath_lastModifiedByValidationError !== null) {
332
- let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_lastModifiedBy + '")\n';
333
- message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
334
- return new TypeError(message);
335
- }
336
- }
337
- if (obj.lastModifiedDate !== undefined) {
338
- const obj_lastModifiedDate = obj.lastModifiedDate;
339
- const path_lastModifiedDate = path + '.lastModifiedDate';
340
- if (typeof obj_lastModifiedDate !== 'string') {
341
- return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
342
- }
343
- }
344
- const obj_layouts = obj.layouts;
345
- const path_layouts = path + '.layouts';
346
- if (!ArrayIsArray(obj_layouts)) {
347
- return new TypeError('Expected "array" but received "' + typeof obj_layouts + '" (at "' + path_layouts + '")');
348
- }
349
- for (let i = 0; i < obj_layouts.length; i++) {
350
- const obj_layouts_item = obj_layouts[i];
351
- const path_layouts_item = path_layouts + '[' + i + ']';
352
- const referencepath_layouts_itemValidationError = validate$e(obj_layouts_item, path_layouts_item);
353
- if (referencepath_layouts_itemValidationError !== null) {
354
- let message = 'Object doesn\'t match DashboardLayoutRepresentation (at "' + path_layouts_item + '")\n';
355
- message += referencepath_layouts_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
356
- return new TypeError(message);
357
- }
358
- }
359
- const obj_name = obj.name;
360
- const path_name = path + '.name';
361
- if (typeof obj_name !== 'string') {
362
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
363
- }
364
- const obj_url = obj.url;
365
- const path_url = path + '.url';
366
- if (typeof obj_url !== 'string') {
367
- return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
368
- }
369
- const obj_widgets = obj.widgets;
370
- const path_widgets = path + '.widgets';
371
- if (typeof obj_widgets !== 'object' || ArrayIsArray(obj_widgets) || obj_widgets === null) {
372
- return new TypeError('Expected "object" but received "' + typeof obj_widgets + '" (at "' + path_widgets + '")');
373
- }
374
- const obj_widgets_keys = ObjectKeys(obj_widgets);
375
- for (let i = 0; i < obj_widgets_keys.length; i++) {
376
- const key = obj_widgets_keys[i];
377
- const obj_widgets_prop = obj_widgets[key];
378
- const path_widgets_prop = path_widgets + '["' + key + '"]';
379
- const referencepath_widgets_propValidationError = validate$d(obj_widgets_prop, path_widgets_prop);
380
- if (referencepath_widgets_propValidationError !== null) {
381
- let message = 'Object doesn\'t match AnalyticsWidgetRepresentation (at "' + path_widgets_prop + '")\n';
382
- message += referencepath_widgets_propValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1036
+ const referencepath_lastModifiedByValidationError = validate$9(obj_lastModifiedBy, path_lastModifiedBy);
1037
+ if (referencepath_lastModifiedByValidationError !== null) {
1038
+ let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_lastModifiedBy + '")\n';
1039
+ message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
383
1040
  return new TypeError(message);
384
1041
  }
385
1042
  }
1043
+ if (obj.lastModifiedDate !== undefined) {
1044
+ const obj_lastModifiedDate = obj.lastModifiedDate;
1045
+ const path_lastModifiedDate = path + '.lastModifiedDate';
1046
+ if (typeof obj_lastModifiedDate !== 'string') {
1047
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
1048
+ }
1049
+ }
1050
+ const obj_name = obj.name;
1051
+ const path_name = path + '.name';
1052
+ if (typeof obj_name !== 'string') {
1053
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1054
+ }
386
1055
  })();
387
1056
  return v_error === undefined ? null : v_error;
388
1057
  }
389
- const RepresentationType$2 = 'DashboardRepresentation';
390
- function keyBuilder$5(luvio, config) {
1058
+ const RepresentationType$2 = 'AnalyticsVisualizationRepresentation';
1059
+ function keyBuilder$6(luvio, config) {
391
1060
  return keyPrefix + '::' + RepresentationType$2 + ':' + config.name;
392
1061
  }
393
1062
  function keyBuilderFromType$1(luvio, object) {
394
1063
  const keyParams = {
395
1064
  name: object.name
396
1065
  };
397
- return keyBuilder$5(luvio, keyParams);
1066
+ return keyBuilder$6(luvio, keyParams);
398
1067
  }
399
1068
  function normalize$2(input, existing, path, luvio, store, timestamp) {
400
1069
  return input;
401
1070
  }
402
- const select$6 = function DashboardRepresentationSelect() {
1071
+ const select$5 = function AnalyticsVisualizationRepresentationSelect() {
403
1072
  return {
404
1073
  kind: 'Fragment',
405
1074
  version: VERSION$2,
@@ -413,15 +1082,15 @@ function equals$2(existing, incoming) {
413
1082
  }
414
1083
  return true;
415
1084
  }
416
- const ingest$2 = function DashboardRepresentationIngest(input, path, luvio, store, timestamp) {
1085
+ const ingest$2 = function AnalyticsVisualizationRepresentationIngest(input, path, luvio, store, timestamp) {
417
1086
  if (process.env.NODE_ENV !== 'production') {
418
- const validateError = validate$c(input);
1087
+ const validateError = validate$8(input);
419
1088
  if (validateError !== null) {
420
1089
  throw validateError;
421
1090
  }
422
1091
  }
423
1092
  const key = keyBuilderFromType$1(luvio, input);
424
- const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
1093
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
425
1094
  ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "UnifiedAnalytics", VERSION$2, RepresentationType$2, equals$2);
426
1095
  return createLink(key);
427
1096
  };
@@ -435,36 +1104,36 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
435
1104
  });
436
1105
  }
437
1106
 
438
- const VERSION$1 = "962823130e6a9315240ef0e0f0c5f757";
439
- function validate$b(obj, path = 'DashboardCollectionRepresentation') {
1107
+ const VERSION$1 = "342da25bfe5e13c7f4ccbc8aa0980a4f";
1108
+ function validate$7(obj, path = 'AnalyticsVisualizationCollectionRepresentation') {
440
1109
  const v_error = (() => {
441
1110
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
442
1111
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
443
1112
  }
444
- const obj_dashboards = obj.dashboards;
445
- const path_dashboards = path + '.dashboards';
446
- if (!ArrayIsArray(obj_dashboards)) {
447
- return new TypeError('Expected "array" but received "' + typeof obj_dashboards + '" (at "' + path_dashboards + '")');
1113
+ const obj_visualizations = obj.visualizations;
1114
+ const path_visualizations = path + '.visualizations';
1115
+ if (!ArrayIsArray(obj_visualizations)) {
1116
+ return new TypeError('Expected "array" but received "' + typeof obj_visualizations + '" (at "' + path_visualizations + '")');
448
1117
  }
449
- for (let i = 0; i < obj_dashboards.length; i++) {
450
- const obj_dashboards_item = obj_dashboards[i];
451
- const path_dashboards_item = path_dashboards + '[' + i + ']';
452
- if (typeof obj_dashboards_item !== 'object') {
453
- return new TypeError('Expected "object" but received "' + typeof obj_dashboards_item + '" (at "' + path_dashboards_item + '")');
1118
+ for (let i = 0; i < obj_visualizations.length; i++) {
1119
+ const obj_visualizations_item = obj_visualizations[i];
1120
+ const path_visualizations_item = path_visualizations + '[' + i + ']';
1121
+ if (typeof obj_visualizations_item !== 'object') {
1122
+ return new TypeError('Expected "object" but received "' + typeof obj_visualizations_item + '" (at "' + path_visualizations_item + '")');
454
1123
  }
455
1124
  }
456
1125
  })();
457
1126
  return v_error === undefined ? null : v_error;
458
1127
  }
459
- const RepresentationType$1 = 'DashboardCollectionRepresentation';
1128
+ const RepresentationType$1 = 'AnalyticsVisualizationCollectionRepresentation';
460
1129
  function normalize$1(input, existing, path, luvio, store, timestamp) {
461
- const input_dashboards = input.dashboards;
462
- const input_dashboards_id = path.fullPath + '__dashboards';
463
- for (let i = 0; i < input_dashboards.length; i++) {
464
- const input_dashboards_item = input_dashboards[i];
465
- let input_dashboards_item_id = input_dashboards_id + '__' + i;
466
- input_dashboards[i] = ingest$2(input_dashboards_item, {
467
- fullPath: input_dashboards_item_id,
1130
+ const input_visualizations = input.visualizations;
1131
+ const input_visualizations_id = path.fullPath + '__visualizations';
1132
+ for (let i = 0; i < input_visualizations.length; i++) {
1133
+ const input_visualizations_item = input_visualizations[i];
1134
+ let input_visualizations_item_id = input_visualizations_id + '__' + i;
1135
+ input_visualizations[i] = ingest$2(input_visualizations_item, {
1136
+ fullPath: input_visualizations_item_id,
468
1137
  propertyName: i,
469
1138
  parent: {
470
1139
  data: input,
@@ -476,43 +1145,43 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
476
1145
  }
477
1146
  return input;
478
1147
  }
479
- const select$5 = function DashboardCollectionRepresentationSelect() {
1148
+ const select$4 = function AnalyticsVisualizationCollectionRepresentationSelect() {
480
1149
  return {
481
1150
  kind: 'Fragment',
482
1151
  version: VERSION$1,
483
1152
  private: [],
484
1153
  selections: [
485
1154
  {
486
- name: 'dashboards',
1155
+ name: 'visualizations',
487
1156
  kind: 'Link',
488
1157
  plural: true,
489
- fragment: select$6()
1158
+ fragment: select$5()
490
1159
  }
491
1160
  ]
492
1161
  };
493
1162
  };
494
1163
  function equals$1(existing, incoming) {
495
- const existing_dashboards = existing.dashboards;
496
- const incoming_dashboards = incoming.dashboards;
497
- const equals_dashboards_items = equalsArray(existing_dashboards, incoming_dashboards, (existing_dashboards_item, incoming_dashboards_item) => {
498
- if (!(existing_dashboards_item.__ref === incoming_dashboards_item.__ref)) {
1164
+ const existing_visualizations = existing.visualizations;
1165
+ const incoming_visualizations = incoming.visualizations;
1166
+ const equals_visualizations_items = equalsArray(existing_visualizations, incoming_visualizations, (existing_visualizations_item, incoming_visualizations_item) => {
1167
+ if (!(existing_visualizations_item.__ref === incoming_visualizations_item.__ref)) {
499
1168
  return false;
500
1169
  }
501
1170
  });
502
- if (equals_dashboards_items === false) {
1171
+ if (equals_visualizations_items === false) {
503
1172
  return false;
504
1173
  }
505
1174
  return true;
506
1175
  }
507
- const ingest$1 = function DashboardCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
1176
+ const ingest$1 = function AnalyticsVisualizationCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
508
1177
  if (process.env.NODE_ENV !== 'production') {
509
- const validateError = validate$b(input);
1178
+ const validateError = validate$7(input);
510
1179
  if (validateError !== null) {
511
1180
  throw validateError;
512
1181
  }
513
1182
  }
514
1183
  const key = path.fullPath;
515
- const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
1184
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
516
1185
  ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "UnifiedAnalytics", VERSION$1, RepresentationType$1, equals$1);
517
1186
  return createLink(key);
518
1187
  };
@@ -524,28 +1193,28 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
524
1193
  representationName: RepresentationType$1,
525
1194
  mergeable: false
526
1195
  });
527
- const input_dashboards_length = input.dashboards.length;
528
- for (let i = 0; i < input_dashboards_length; i++) {
529
- getTypeCacheKeys$2(rootKeySet, luvio, input.dashboards[i]);
1196
+ const input_visualizations_length = input.visualizations.length;
1197
+ for (let i = 0; i < input_visualizations_length; i++) {
1198
+ getTypeCacheKeys$2(rootKeySet, luvio, input.visualizations[i]);
530
1199
  }
531
1200
  }
532
1201
 
533
- function select$4(luvio, params) {
534
- return select$5();
1202
+ function select$3(luvio, params) {
1203
+ return select$4();
535
1204
  }
536
- function keyBuilder$4(luvio, params) {
537
- return keyPrefix + '::DashboardCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
1205
+ function keyBuilder$5(luvio, params) {
1206
+ return keyPrefix + '::AnalyticsVisualizationCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
538
1207
  }
539
1208
  function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
540
- getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
1209
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
541
1210
  }
542
- function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
1211
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
543
1212
  const { body } = response;
544
- const key = keyBuilder$4(luvio, resourceParams);
1213
+ const key = keyBuilder$5(luvio, resourceParams);
545
1214
  luvio.storeIngest(key, ingest$1, body);
546
1215
  const snapshot = luvio.storeLookup({
547
1216
  recordId: key,
548
- node: select$4(),
1217
+ node: select$3(),
549
1218
  variables: {},
550
1219
  }, snapshotRefresh);
551
1220
  if (process.env.NODE_ENV !== 'production') {
@@ -557,7 +1226,7 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
557
1226
  return snapshot;
558
1227
  }
559
1228
  function ingestError$1(luvio, params, error, snapshotRefresh) {
560
- const key = keyBuilder$4(luvio, params);
1229
+ const key = keyBuilder$5(luvio, params);
561
1230
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
562
1231
  luvio.storeIngestError(key, errorSnapshot);
563
1232
  return errorSnapshot;
@@ -566,7 +1235,7 @@ function createResourceRequest$3(config) {
566
1235
  const headers = {};
567
1236
  return {
568
1237
  baseUri: '/services/data/v62.0',
569
- basePath: '/unified-analytics/dashboards',
1238
+ basePath: '/unified-analytics/visualizations',
570
1239
  method: 'get',
571
1240
  body: null,
572
1241
  urlParams: {},
@@ -576,20 +1245,20 @@ function createResourceRequest$3(config) {
576
1245
  };
577
1246
  }
578
1247
 
579
- const adapterName$3 = 'getDashboards';
580
- const getDashboards_ConfigPropertyMetadata = [
1248
+ const adapterName$3 = 'getVisualizations';
1249
+ const getVisualizations_ConfigPropertyMetadata = [
581
1250
  generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
582
1251
  generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
583
1252
  ];
584
- const getDashboards_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getDashboards_ConfigPropertyMetadata);
585
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(getDashboards_ConfigPropertyMetadata);
586
- function keyBuilder$3(luvio, config) {
1253
+ const getVisualizations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getVisualizations_ConfigPropertyMetadata);
1254
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$9(getVisualizations_ConfigPropertyMetadata);
1255
+ function keyBuilder$4(luvio, config) {
587
1256
  const resourceParams = createResourceParams$3(config);
588
- return keyBuilder$4(luvio, resourceParams);
1257
+ return keyBuilder$5(luvio, resourceParams);
589
1258
  }
590
1259
  function typeCheckConfig$3(untrustedConfig) {
591
1260
  const config = {};
592
- typeCheckConfig$4(untrustedConfig, config, getDashboards_ConfigPropertyMetadata);
1261
+ typeCheckConfig$9(untrustedConfig, config, getVisualizations_ConfigPropertyMetadata);
593
1262
  return config;
594
1263
  }
595
1264
  function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
@@ -607,10 +1276,10 @@ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
607
1276
  }
608
1277
  function adapterFragment$1(luvio, config) {
609
1278
  createResourceParams$3(config);
610
- return select$4();
1279
+ return select$3();
611
1280
  }
612
1281
  function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
613
- const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
1282
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
614
1283
  config,
615
1284
  resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
616
1285
  });
@@ -638,12 +1307,12 @@ function buildNetworkSnapshot$3(luvio, config, options) {
638
1307
  });
639
1308
  }
640
1309
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
641
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
1310
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
642
1311
  }
643
1312
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
644
1313
  const { luvio, config } = context;
645
1314
  const selector = {
646
- recordId: keyBuilder$3(luvio, config),
1315
+ recordId: keyBuilder$4(luvio, config),
647
1316
  node: adapterFragment$1(luvio, config),
648
1317
  variables: {},
649
1318
  };
@@ -653,8 +1322,8 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
653
1322
  });
654
1323
  return cacheSnapshot;
655
1324
  }
656
- const getDashboardsAdapterFactory = (luvio) => function UnifiedAnalytics__getDashboards(untrustedConfig, requestContext) {
657
- const config = validateAdapterConfig$3(untrustedConfig, getDashboards_ConfigPropertyNames);
1325
+ const getVisualizationsAdapterFactory = (luvio) => function UnifiedAnalytics__getVisualizations(untrustedConfig, requestContext) {
1326
+ const config = validateAdapterConfig$3(untrustedConfig, getVisualizations_ConfigPropertyNames);
658
1327
  // Invalid or incomplete config
659
1328
  if (config === null) {
660
1329
  return null;
@@ -663,300 +1332,46 @@ const getDashboardsAdapterFactory = (luvio) => function UnifiedAnalytics__getDas
663
1332
  buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
664
1333
  };
665
1334
 
666
- function validate$a(obj, path = 'DashboardPageWidgetInputRepresentation') {
667
- const v_error = (() => {
668
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
669
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
670
- }
671
- const obj_colspan = obj.colspan;
672
- const path_colspan = path + '.colspan';
673
- if (typeof obj_colspan !== 'number' || (typeof obj_colspan === 'number' && Math.floor(obj_colspan) !== obj_colspan)) {
674
- return new TypeError('Expected "integer" but received "' + typeof obj_colspan + '" (at "' + path_colspan + '")');
675
- }
676
- const obj_column = obj.column;
677
- const path_column = path + '.column';
678
- if (typeof obj_column !== 'number' || (typeof obj_column === 'number' && Math.floor(obj_column) !== obj_column)) {
679
- return new TypeError('Expected "integer" but received "' + typeof obj_column + '" (at "' + path_column + '")');
680
- }
681
- if (obj.description !== undefined) {
682
- const obj_description = obj.description;
683
- const path_description = path + '.description';
684
- if (typeof obj_description !== 'string') {
685
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
686
- }
687
- }
688
- if (obj.id !== undefined) {
689
- const obj_id = obj.id;
690
- const path_id = path + '.id';
691
- if (typeof obj_id !== 'string') {
692
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
693
- }
694
- }
695
- if (obj.label !== undefined) {
696
- const obj_label = obj.label;
697
- const path_label = path + '.label';
698
- if (typeof obj_label !== 'string') {
699
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
700
- }
701
- }
702
- if (obj.name !== undefined) {
703
- const obj_name = obj.name;
704
- const path_name = path + '.name';
705
- if (typeof obj_name !== 'string') {
706
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
707
- }
708
- }
709
- const obj_row = obj.row;
710
- const path_row = path + '.row';
711
- if (typeof obj_row !== 'number' || (typeof obj_row === 'number' && Math.floor(obj_row) !== obj_row)) {
712
- return new TypeError('Expected "integer" but received "' + typeof obj_row + '" (at "' + path_row + '")');
713
- }
714
- const obj_rowspan = obj.rowspan;
715
- const path_rowspan = path + '.rowspan';
716
- if (typeof obj_rowspan !== 'number' || (typeof obj_rowspan === 'number' && Math.floor(obj_rowspan) !== obj_rowspan)) {
717
- return new TypeError('Expected "integer" but received "' + typeof obj_rowspan + '" (at "' + path_rowspan + '")');
718
- }
719
- })();
720
- return v_error === undefined ? null : v_error;
721
- }
722
-
723
- function validate$9(obj, path = 'DashboardLayoutPageInputRepresentation') {
724
- const v_error = (() => {
725
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
726
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
727
- }
728
- if (obj.description !== undefined) {
729
- const obj_description = obj.description;
730
- const path_description = path + '.description';
731
- if (typeof obj_description !== 'string') {
732
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
733
- }
734
- }
735
- if (obj.id !== undefined) {
736
- const obj_id = obj.id;
737
- const path_id = path + '.id';
738
- if (typeof obj_id !== 'string') {
739
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
740
- }
741
- }
742
- const obj_label = obj.label;
743
- const path_label = path + '.label';
744
- if (typeof obj_label !== 'string') {
745
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
746
- }
747
- if (obj.name !== undefined) {
748
- const obj_name = obj.name;
749
- const path_name = path + '.name';
750
- if (typeof obj_name !== 'string') {
751
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
752
- }
753
- }
754
- if (obj.navigationHidden !== undefined) {
755
- const obj_navigationHidden = obj.navigationHidden;
756
- const path_navigationHidden = path + '.navigationHidden';
757
- if (typeof obj_navigationHidden !== 'boolean') {
758
- return new TypeError('Expected "boolean" but received "' + typeof obj_navigationHidden + '" (at "' + path_navigationHidden + '")');
759
- }
760
- }
761
- const obj_widgets = obj.widgets;
762
- const path_widgets = path + '.widgets';
763
- if (!ArrayIsArray(obj_widgets)) {
764
- return new TypeError('Expected "array" but received "' + typeof obj_widgets + '" (at "' + path_widgets + '")');
765
- }
766
- for (let i = 0; i < obj_widgets.length; i++) {
767
- const obj_widgets_item = obj_widgets[i];
768
- const path_widgets_item = path_widgets + '[' + i + ']';
769
- const referencepath_widgets_itemValidationError = validate$a(obj_widgets_item, path_widgets_item);
770
- if (referencepath_widgets_itemValidationError !== null) {
771
- let message = 'Object doesn\'t match DashboardPageWidgetInputRepresentation (at "' + path_widgets_item + '")\n';
772
- message += referencepath_widgets_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
773
- return new TypeError(message);
774
- }
775
- }
776
- })();
777
- return v_error === undefined ? null : v_error;
778
- }
779
-
780
- function validate$8(obj, path = 'DashboardLayoutInputRepresentation') {
781
- const v_error = (() => {
782
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
783
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
784
- }
785
- if (obj.description !== undefined) {
786
- const obj_description = obj.description;
787
- const path_description = path + '.description';
788
- if (typeof obj_description !== 'string') {
789
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
790
- }
791
- }
792
- if (obj.id !== undefined) {
793
- const obj_id = obj.id;
794
- const path_id = path + '.id';
795
- if (typeof obj_id !== 'string') {
796
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
797
- }
798
- }
799
- if (obj.label !== undefined) {
800
- const obj_label = obj.label;
801
- const path_label = path + '.label';
802
- if (typeof obj_label !== 'string') {
803
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
804
- }
805
- }
806
- if (obj.name !== undefined) {
807
- const obj_name = obj.name;
808
- const path_name = path + '.name';
809
- if (typeof obj_name !== 'string') {
810
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
811
- }
812
- }
813
- const obj_pages = obj.pages;
814
- const path_pages = path + '.pages';
815
- if (!ArrayIsArray(obj_pages)) {
816
- return new TypeError('Expected "array" but received "' + typeof obj_pages + '" (at "' + path_pages + '")');
817
- }
818
- for (let i = 0; i < obj_pages.length; i++) {
819
- const obj_pages_item = obj_pages[i];
820
- const path_pages_item = path_pages + '[' + i + ']';
821
- const referencepath_pages_itemValidationError = validate$9(obj_pages_item, path_pages_item);
822
- if (referencepath_pages_itemValidationError !== null) {
823
- let message = 'Object doesn\'t match DashboardLayoutPageInputRepresentation (at "' + path_pages_item + '")\n';
824
- message += referencepath_pages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
825
- return new TypeError(message);
826
- }
827
- }
828
- })();
829
- return v_error === undefined ? null : v_error;
830
- }
831
-
832
- function validate$7(obj, path = 'AnalyticsWidgetInputRepresentation') {
833
- const v_error = (() => {
834
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
835
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
836
- }
837
- if (obj.description !== undefined) {
838
- const obj_description = obj.description;
839
- const path_description = path + '.description';
840
- if (typeof obj_description !== 'string') {
841
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
842
- }
843
- }
844
- if (obj.id !== undefined) {
845
- const obj_id = obj.id;
846
- const path_id = path + '.id';
847
- if (typeof obj_id !== 'string') {
848
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
849
- }
850
- }
851
- if (obj.label !== undefined) {
852
- const obj_label = obj.label;
853
- const path_label = path + '.label';
854
- if (typeof obj_label !== 'string') {
855
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
856
- }
857
- }
858
- if (obj.name !== undefined) {
859
- const obj_name = obj.name;
860
- const path_name = path + '.name';
861
- if (typeof obj_name !== 'string') {
862
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
863
- }
864
- }
865
- const obj_parameters = obj.parameters;
866
- const path_parameters = path + '.parameters';
867
- if (obj_parameters === undefined) {
868
- return new TypeError('Expected "defined" but received "' + typeof obj_parameters + '" (at "' + path_parameters + '")');
869
- }
870
- const obj_type = obj.type;
871
- const path_type = path + '.type';
872
- if (typeof obj_type !== 'string') {
873
- return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
874
- }
875
- })();
876
- return v_error === undefined ? null : v_error;
877
- }
878
-
879
- function select$3(luvio, params) {
880
- return select$6();
881
- }
882
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
883
- getTypeCacheKeys$2(storeKeyMap, luvio, response);
1335
+ function keyBuilder$3(luvio, params) {
1336
+ return keyBuilder$6(luvio, {
1337
+ name: params.urlParams.visualizationIdOrApiName
1338
+ });
884
1339
  }
885
- function ingestSuccess$2(luvio, resourceParams, response) {
886
- const { body } = response;
887
- const key = keyBuilderFromType$1(luvio, body);
888
- luvio.storeIngest(key, ingest$2, body);
889
- const snapshot = luvio.storeLookup({
890
- recordId: key,
891
- node: select$3(),
892
- variables: {},
1340
+ function getResponseCacheKeys$2(cacheKeyMap, luvio, resourceParams) {
1341
+ const key = keyBuilder$3(luvio, resourceParams);
1342
+ cacheKeyMap.set(key, {
1343
+ namespace: keyPrefix,
1344
+ representationName: RepresentationType$2,
1345
+ mergeable: false
893
1346
  });
894
- if (process.env.NODE_ENV !== 'production') {
895
- if (snapshot.state !== 'Fulfilled') {
896
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
897
- }
898
- }
899
- deepFreeze(snapshot.data);
900
- return snapshot;
1347
+ }
1348
+ function evictSuccess(luvio, resourceParams) {
1349
+ const key = keyBuilder$3(luvio, resourceParams);
1350
+ luvio.storeEvict(key);
901
1351
  }
902
1352
  function createResourceRequest$2(config) {
903
1353
  const headers = {};
904
1354
  return {
905
1355
  baseUri: '/services/data/v62.0',
906
- basePath: '/unified-analytics/dashboards',
907
- method: 'post',
908
- body: config.body,
909
- urlParams: {},
1356
+ basePath: '/unified-analytics/visualizations/' + config.urlParams.visualizationIdOrApiName + '',
1357
+ method: 'delete',
1358
+ body: null,
1359
+ urlParams: config.urlParams,
910
1360
  queryParams: {},
911
1361
  headers,
912
1362
  priority: 'normal',
913
1363
  };
914
1364
  }
915
1365
 
916
- const adapterName$2 = 'createDashboard';
917
- const createDashboard_ConfigPropertyMetadata = [
918
- generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
919
- generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
920
- generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
921
- generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
922
- generateParamConfigMetadata('layouts', true, 2 /* Body */, 4 /* Unsupported */, true),
923
- generateParamConfigMetadata('widgets', true, 2 /* Body */, 4 /* Unsupported */),
1366
+ const adapterName$2 = 'deleteVisualization';
1367
+ const deleteVisualization_ConfigPropertyMetadata = [
1368
+ generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
924
1369
  ];
925
- const createDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createDashboard_ConfigPropertyMetadata);
926
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$4(createDashboard_ConfigPropertyMetadata);
1370
+ const deleteVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, deleteVisualization_ConfigPropertyMetadata);
1371
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$9(deleteVisualization_ConfigPropertyMetadata);
927
1372
  function typeCheckConfig$2(untrustedConfig) {
928
1373
  const config = {};
929
- typeCheckConfig$4(untrustedConfig, config, createDashboard_ConfigPropertyMetadata);
930
- const untrustedConfig_layouts = untrustedConfig.layouts;
931
- if (ArrayIsArray$1(untrustedConfig_layouts)) {
932
- const untrustedConfig_layouts_array = [];
933
- for (let i = 0, arrayLength = untrustedConfig_layouts.length; i < arrayLength; i++) {
934
- const untrustedConfig_layouts_item = untrustedConfig_layouts[i];
935
- const referenceDashboardLayoutInputRepresentationValidationError = validate$8(untrustedConfig_layouts_item);
936
- if (referenceDashboardLayoutInputRepresentationValidationError === null) {
937
- untrustedConfig_layouts_array.push(untrustedConfig_layouts_item);
938
- }
939
- }
940
- config.layouts = untrustedConfig_layouts_array;
941
- }
942
- const untrustedConfig_widgets = untrustedConfig.widgets;
943
- if (untrustedIsObject(untrustedConfig_widgets)) {
944
- const untrustedConfig_widgets_object = {};
945
- const untrustedConfig_widgets_keys = Object.keys(untrustedConfig_widgets);
946
- for (let i = 0, arrayLength = untrustedConfig_widgets_keys.length; i < arrayLength; i++) {
947
- const key = untrustedConfig_widgets_keys[i];
948
- const untrustedConfig_widgets_prop = untrustedConfig_widgets[key];
949
- const referenceAnalyticsWidgetInputRepresentationValidationError = validate$7(untrustedConfig_widgets_prop);
950
- if (referenceAnalyticsWidgetInputRepresentationValidationError === null) {
951
- if (untrustedConfig_widgets_object !== undefined) {
952
- untrustedConfig_widgets_object[key] = untrustedConfig_widgets_prop;
953
- }
954
- }
955
- }
956
- if (untrustedConfig_widgets_object !== undefined && Object.keys(untrustedConfig_widgets_object).length >= 0) {
957
- config.widgets = untrustedConfig_widgets_object;
958
- }
959
- }
1374
+ typeCheckConfig$9(untrustedConfig, config, deleteVisualization_ConfigPropertyMetadata);
960
1375
  return config;
961
1376
  }
962
1377
  function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
@@ -976,13 +1391,13 @@ function buildNetworkSnapshot$2(luvio, config, options) {
976
1391
  const resourceParams = createResourceParams$2(config);
977
1392
  const request = createResourceRequest$2(resourceParams);
978
1393
  return luvio.dispatchResourceRequest(request, options)
979
- .then((response) => {
1394
+ .then(() => {
980
1395
  return luvio.handleSuccessResponse(() => {
981
- const snapshot = ingestSuccess$2(luvio, resourceParams, response);
982
- return luvio.storeBroadcast().then(() => snapshot);
1396
+ evictSuccess(luvio, resourceParams);
1397
+ return luvio.storeBroadcast();
983
1398
  }, () => {
984
1399
  const cache = new StoreKeyMap();
985
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1400
+ getResponseCacheKeys$2(cache, luvio, resourceParams);
986
1401
  return cache;
987
1402
  });
988
1403
  }, (response) => {
@@ -990,23 +1405,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
990
1405
  throw response;
991
1406
  });
992
1407
  }
993
- const createDashboardAdapterFactory = (luvio) => {
994
- return function createDashboard(untrustedConfig) {
995
- const config = validateAdapterConfig$2(untrustedConfig, createDashboard_ConfigPropertyNames);
1408
+ const deleteVisualizationAdapterFactory = (luvio) => {
1409
+ return function UnifiedAnalyticsdeleteVisualization(untrustedConfig) {
1410
+ const config = validateAdapterConfig$2(untrustedConfig, deleteVisualization_ConfigPropertyNames);
996
1411
  // Invalid or incomplete config
997
1412
  if (config === null) {
998
- throw new Error('Invalid config for "createDashboard"');
1413
+ throw new Error(`Invalid config for "${adapterName$2}"`);
999
1414
  }
1000
1415
  return buildNetworkSnapshot$2(luvio, config);
1001
1416
  };
1002
1417
  };
1003
1418
 
1004
1419
  function select$2(luvio, params) {
1005
- return select$6();
1420
+ return select$5();
1006
1421
  }
1007
1422
  function keyBuilder$2(luvio, params) {
1008
- return keyBuilder$5(luvio, {
1009
- name: params.urlParams.dashboardIdOrApiName
1423
+ return keyBuilder$6(luvio, {
1424
+ name: params.urlParams.visualizationIdOrApiName
1010
1425
  });
1011
1426
  }
1012
1427
  function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
@@ -1039,7 +1454,7 @@ function createResourceRequest$1(config) {
1039
1454
  const headers = {};
1040
1455
  return {
1041
1456
  baseUri: '/services/data/v62.0',
1042
- basePath: '/unified-analytics/dashboards/' + config.urlParams.dashboardIdOrApiName + '',
1457
+ basePath: '/unified-analytics/visualizations/' + config.urlParams.visualizationIdOrApiName + '',
1043
1458
  method: 'get',
1044
1459
  body: null,
1045
1460
  urlParams: config.urlParams,
@@ -1049,19 +1464,19 @@ function createResourceRequest$1(config) {
1049
1464
  };
1050
1465
  }
1051
1466
 
1052
- const adapterName$1 = 'getDashboardByName';
1053
- const getDashboardByName_ConfigPropertyMetadata = [
1054
- generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
1467
+ const adapterName$1 = 'getVisualization';
1468
+ const getVisualization_ConfigPropertyMetadata = [
1469
+ generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
1055
1470
  ];
1056
- const getDashboardByName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getDashboardByName_ConfigPropertyMetadata);
1057
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$4(getDashboardByName_ConfigPropertyMetadata);
1471
+ const getVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getVisualization_ConfigPropertyMetadata);
1472
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$9(getVisualization_ConfigPropertyMetadata);
1058
1473
  function keyBuilder$1(luvio, config) {
1059
1474
  const resourceParams = createResourceParams$1(config);
1060
1475
  return keyBuilder$2(luvio, resourceParams);
1061
1476
  }
1062
1477
  function typeCheckConfig$1(untrustedConfig) {
1063
1478
  const config = {};
1064
- typeCheckConfig$4(untrustedConfig, config, getDashboardByName_ConfigPropertyMetadata);
1479
+ typeCheckConfig$9(untrustedConfig, config, getVisualization_ConfigPropertyMetadata);
1065
1480
  return config;
1066
1481
  }
1067
1482
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -1110,7 +1525,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
1110
1525
  });
1111
1526
  }
1112
1527
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1113
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1528
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1114
1529
  }
1115
1530
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
1116
1531
  const { luvio, config } = context;
@@ -1125,8 +1540,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
1125
1540
  });
1126
1541
  return cacheSnapshot;
1127
1542
  }
1128
- const getDashboardByNameAdapterFactory = (luvio) => function UnifiedAnalytics__getDashboardByName(untrustedConfig, requestContext) {
1129
- const config = validateAdapterConfig$1(untrustedConfig, getDashboardByName_ConfigPropertyNames);
1543
+ const getVisualizationAdapterFactory = (luvio) => function UnifiedAnalytics__getVisualization(untrustedConfig, requestContext) {
1544
+ const config = validateAdapterConfig$1(untrustedConfig, getVisualization_ConfigPropertyNames);
1130
1545
  // Invalid or incomplete config
1131
1546
  if (config === null) {
1132
1547
  return null;
@@ -1799,7 +2214,7 @@ const getListViewAnalyticsLibrary_ConfigPropertyMetadata = [
1799
2214
  generateParamConfigMetadata('input_collection', true, 2 /* Body */, 4 /* Unsupported */),
1800
2215
  ];
1801
2216
  const getListViewAnalyticsLibrary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getListViewAnalyticsLibrary_ConfigPropertyMetadata);
1802
- const createResourceParams = /*#__PURE__*/ createResourceParams$4(getListViewAnalyticsLibrary_ConfigPropertyMetadata);
2217
+ const createResourceParams = /*#__PURE__*/ createResourceParams$9(getListViewAnalyticsLibrary_ConfigPropertyMetadata);
1803
2218
  function typeCheckConfig(untrustedConfig) {
1804
2219
  const config = {};
1805
2220
  const untrustedConfig_input_collection = untrustedConfig.input_collection;
@@ -1851,4 +2266,4 @@ const getListViewAnalyticsLibraryAdapterFactory = (luvio) => {
1851
2266
  };
1852
2267
  };
1853
2268
 
1854
- export { createDashboardAdapterFactory, getDashboardByNameAdapterFactory, getDashboardsAdapterFactory, getListViewAnalyticsLibraryAdapterFactory };
2269
+ export { createDashboardAdapterFactory, deleteDashboardAdapterFactory, deleteVisualizationAdapterFactory, getDashboardByNameAdapterFactory, getDashboardsAdapterFactory, getListViewAnalyticsLibraryAdapterFactory, getVisualizationAdapterFactory, getVisualizationsAdapterFactory, updateDashboardAdapterFactory };