@salesforce/lds-adapters-analytics-unifiedanalytics 1.292.0 → 1.293.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 (22) hide show
  1. package/dist/es/es2018/analytics-unifiedanalytics.js +1179 -498
  2. package/dist/es/es2018/types/src/generated/adapters/createWorkspace.d.ts +18 -0
  3. package/dist/es/es2018/types/src/generated/adapters/getWorkspaces.d.ts +28 -0
  4. package/dist/es/es2018/types/src/generated/adapters/queryAssets.d.ts +20 -0
  5. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -0
  6. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +5 -1
  7. package/dist/es/es2018/types/src/generated/resources/getUnifiedAnalyticsWorkspaces.d.ts +16 -0
  8. package/dist/es/es2018/types/src/generated/resources/getUnifiedAnalyticsWorkspacesByWorkspaceIdOrApiName.d.ts +15 -0
  9. package/dist/es/es2018/types/src/generated/resources/postUnifiedAnalyticsAssetsQuery.d.ts +17 -0
  10. package/dist/es/es2018/types/src/generated/resources/postUnifiedAnalyticsWorkspaces.d.ts +15 -0
  11. package/dist/es/es2018/types/src/generated/types/AnalyticsAssetsQueryInputRepresentation.d.ts +43 -0
  12. package/dist/es/es2018/types/src/generated/types/AnalyticsAssetsQueryResultsItemRepresentation.d.ts +46 -0
  13. package/dist/es/es2018/types/src/generated/types/AnalyticsAssetsQueryResultsRepresentation.d.ts +48 -0
  14. package/dist/es/es2018/types/src/generated/types/AnalyticsAssetsQueryResultsWorkspaceRepresentation.d.ts +26 -0
  15. package/dist/es/es2018/types/src/generated/types/BaseAnalyticsAssetRepresentation.d.ts +37 -0
  16. package/dist/es/es2018/types/src/generated/types/WorkspaceCollectionRepresentation.d.ts +38 -0
  17. package/dist/es/es2018/types/src/generated/types/WorkspaceInputRepresentation.d.ts +37 -0
  18. package/dist/es/es2018/types/src/generated/types/WorkspaceRepresentation.d.ts +56 -0
  19. package/package.json +3 -3
  20. package/sfdc/index.js +1510 -815
  21. package/src/raml/api.raml +325 -115
  22. package/src/raml/luvio.raml +22 -0
@@ -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$4, typeCheckConfig as typeCheckConfig$9, StoreKeyMap, createResourceParams as createResourceParams$9 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$c, typeCheckConfig as typeCheckConfig$c, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$5 } 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,347 @@ function createLink(ref) {
93
93
  };
94
94
  }
95
95
 
96
- const VERSION$4 = "4a961b470a805882e90c05020d119eea";
96
+ function validate$h(obj, path = 'BaseAnalyticsRepresentation') {
97
+ const v_error = (() => {
98
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
99
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
100
+ }
101
+ if (obj.description !== undefined) {
102
+ const obj_description = obj.description;
103
+ const path_description = path + '.description';
104
+ if (typeof obj_description !== 'string') {
105
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
106
+ }
107
+ }
108
+ const obj_id = obj.id;
109
+ const path_id = path + '.id';
110
+ if (typeof obj_id !== 'string') {
111
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
112
+ }
113
+ if (obj.label !== undefined) {
114
+ const obj_label = obj.label;
115
+ const path_label = path + '.label';
116
+ if (typeof obj_label !== 'string') {
117
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
118
+ }
119
+ }
120
+ if (obj.name !== undefined) {
121
+ const obj_name = obj.name;
122
+ const path_name = path + '.name';
123
+ if (typeof obj_name !== 'string') {
124
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
125
+ }
126
+ }
127
+ })();
128
+ return v_error === undefined ? null : v_error;
129
+ }
130
+
131
+ function validate$g(obj, path = 'AnalyticsUserRepresentation') {
132
+ const validateBaseAnalyticsRepresentation_validateError = validate$h(obj, path);
133
+ if (validateBaseAnalyticsRepresentation_validateError !== null) {
134
+ return validateBaseAnalyticsRepresentation_validateError;
135
+ }
136
+ const v_error = (() => {
137
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
138
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
139
+ }
140
+ if (obj.profilePhotoUrl !== undefined) {
141
+ const obj_profilePhotoUrl = obj.profilePhotoUrl;
142
+ const path_profilePhotoUrl = path + '.profilePhotoUrl';
143
+ let obj_profilePhotoUrl_union0 = null;
144
+ const obj_profilePhotoUrl_union0_error = (() => {
145
+ if (typeof obj_profilePhotoUrl !== 'string') {
146
+ return new TypeError('Expected "string" but received "' + typeof obj_profilePhotoUrl + '" (at "' + path_profilePhotoUrl + '")');
147
+ }
148
+ })();
149
+ if (obj_profilePhotoUrl_union0_error != null) {
150
+ obj_profilePhotoUrl_union0 = obj_profilePhotoUrl_union0_error.message;
151
+ }
152
+ let obj_profilePhotoUrl_union1 = null;
153
+ const obj_profilePhotoUrl_union1_error = (() => {
154
+ if (obj_profilePhotoUrl !== null) {
155
+ return new TypeError('Expected "null" but received "' + typeof obj_profilePhotoUrl + '" (at "' + path_profilePhotoUrl + '")');
156
+ }
157
+ })();
158
+ if (obj_profilePhotoUrl_union1_error != null) {
159
+ obj_profilePhotoUrl_union1 = obj_profilePhotoUrl_union1_error.message;
160
+ }
161
+ if (obj_profilePhotoUrl_union0 && obj_profilePhotoUrl_union1) {
162
+ let message = 'Object doesn\'t match union (at "' + path_profilePhotoUrl + '")';
163
+ message += '\n' + obj_profilePhotoUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
164
+ message += '\n' + obj_profilePhotoUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
165
+ return new TypeError(message);
166
+ }
167
+ }
168
+ })();
169
+ return v_error === undefined ? null : v_error;
170
+ }
171
+
172
+ function validate$f(obj, path = 'AnalyticsAssetsQueryResultsWorkspaceRepresentation') {
173
+ const validateBaseAnalyticsRepresentation_validateError = validate$h(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
+ })();
182
+ return v_error === undefined ? null : v_error;
183
+ }
184
+
185
+ function validate$e(obj, path = 'AnalyticsAssetsQueryResultsItemRepresentation') {
186
+ const validateBaseAnalyticsRepresentation_validateError = validate$h(obj, path);
187
+ if (validateBaseAnalyticsRepresentation_validateError !== null) {
188
+ return validateBaseAnalyticsRepresentation_validateError;
189
+ }
190
+ const v_error = (() => {
191
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
192
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
193
+ }
194
+ const obj_assetType = obj.assetType;
195
+ const path_assetType = path + '.assetType';
196
+ if (typeof obj_assetType !== 'string') {
197
+ return new TypeError('Expected "string" but received "' + typeof obj_assetType + '" (at "' + path_assetType + '")');
198
+ }
199
+ const obj_createdBy = obj.createdBy;
200
+ const path_createdBy = path + '.createdBy';
201
+ const referencepath_createdByValidationError = validate$g(obj_createdBy, path_createdBy);
202
+ if (referencepath_createdByValidationError !== null) {
203
+ let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_createdBy + '")\n';
204
+ message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
205
+ return new TypeError(message);
206
+ }
207
+ const obj_createdDate = obj.createdDate;
208
+ const path_createdDate = path + '.createdDate';
209
+ if (typeof obj_createdDate !== 'string') {
210
+ return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
211
+ }
212
+ const obj_lastModifiedBy = obj.lastModifiedBy;
213
+ const path_lastModifiedBy = path + '.lastModifiedBy';
214
+ const referencepath_lastModifiedByValidationError = validate$g(obj_lastModifiedBy, path_lastModifiedBy);
215
+ if (referencepath_lastModifiedByValidationError !== null) {
216
+ let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_lastModifiedBy + '")\n';
217
+ message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
218
+ return new TypeError(message);
219
+ }
220
+ const obj_lastModifiedDate = obj.lastModifiedDate;
221
+ const path_lastModifiedDate = path + '.lastModifiedDate';
222
+ if (typeof obj_lastModifiedDate !== 'string') {
223
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
224
+ }
225
+ const obj_owner = obj.owner;
226
+ const path_owner = path + '.owner';
227
+ const referencepath_ownerValidationError = validate$g(obj_owner, path_owner);
228
+ if (referencepath_ownerValidationError !== null) {
229
+ let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_owner + '")\n';
230
+ message += referencepath_ownerValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
231
+ return new TypeError(message);
232
+ }
233
+ const obj_workspace = obj.workspace;
234
+ const path_workspace = path + '.workspace';
235
+ const referencepath_workspaceValidationError = validate$f(obj_workspace, path_workspace);
236
+ if (referencepath_workspaceValidationError !== null) {
237
+ let message = 'Object doesn\'t match AnalyticsAssetsQueryResultsWorkspaceRepresentation (at "' + path_workspace + '")\n';
238
+ message += referencepath_workspaceValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
239
+ return new TypeError(message);
240
+ }
241
+ })();
242
+ return v_error === undefined ? null : v_error;
243
+ }
244
+
245
+ const TTL$1 = 500;
246
+ const VERSION$7 = "ed60d9cca169a3e5ed897c67d11a23db";
247
+ function validate$d(obj, path = 'AnalyticsAssetsQueryResultsRepresentation') {
248
+ const v_error = (() => {
249
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
250
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
251
+ }
252
+ const obj_items = obj.items;
253
+ const path_items = path + '.items';
254
+ if (!ArrayIsArray(obj_items)) {
255
+ return new TypeError('Expected "array" but received "' + typeof obj_items + '" (at "' + path_items + '")');
256
+ }
257
+ for (let i = 0; i < obj_items.length; i++) {
258
+ const obj_items_item = obj_items[i];
259
+ const path_items_item = path_items + '[' + i + ']';
260
+ const referencepath_items_itemValidationError = validate$e(obj_items_item, path_items_item);
261
+ if (referencepath_items_itemValidationError !== null) {
262
+ let message = 'Object doesn\'t match AnalyticsAssetsQueryResultsItemRepresentation (at "' + path_items_item + '")\n';
263
+ message += referencepath_items_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
264
+ return new TypeError(message);
265
+ }
266
+ }
267
+ const obj_nextOffset = obj.nextOffset;
268
+ const path_nextOffset = path + '.nextOffset';
269
+ if (typeof obj_nextOffset !== 'number' || (typeof obj_nextOffset === 'number' && Math.floor(obj_nextOffset) !== obj_nextOffset)) {
270
+ return new TypeError('Expected "integer" but received "' + typeof obj_nextOffset + '" (at "' + path_nextOffset + '")');
271
+ }
272
+ const obj_queryKey = obj.queryKey;
273
+ const path_queryKey = path + '.queryKey';
274
+ if (typeof obj_queryKey !== 'string') {
275
+ return new TypeError('Expected "string" but received "' + typeof obj_queryKey + '" (at "' + path_queryKey + '")');
276
+ }
277
+ const obj_size = obj.size;
278
+ const path_size = path + '.size';
279
+ if (typeof obj_size !== 'number' || (typeof obj_size === 'number' && Math.floor(obj_size) !== obj_size)) {
280
+ return new TypeError('Expected "integer" but received "' + typeof obj_size + '" (at "' + path_size + '")');
281
+ }
282
+ })();
283
+ return v_error === undefined ? null : v_error;
284
+ }
285
+ const RepresentationType$7 = 'AnalyticsAssetsQueryResultsRepresentation';
286
+ function keyBuilder$g(luvio, config) {
287
+ return keyPrefix + '::' + RepresentationType$7 + ':' + config.searchId;
288
+ }
289
+ function keyBuilderFromType$4(luvio, object) {
290
+ const keyParams = {
291
+ searchId: object.queryKey
292
+ };
293
+ return keyBuilder$g(luvio, keyParams);
294
+ }
295
+ function normalize$7(input, existing, path, luvio, store, timestamp) {
296
+ return input;
297
+ }
298
+ const select$h = function AnalyticsAssetsQueryResultsRepresentationSelect() {
299
+ return {
300
+ kind: 'Fragment',
301
+ version: VERSION$7,
302
+ private: [],
303
+ opaque: true
304
+ };
305
+ };
306
+ function equals$7(existing, incoming) {
307
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
308
+ return false;
309
+ }
310
+ return true;
311
+ }
312
+ const ingest$7 = function AnalyticsAssetsQueryResultsRepresentationIngest(input, path, luvio, store, timestamp) {
313
+ if (process.env.NODE_ENV !== 'production') {
314
+ const validateError = validate$d(input);
315
+ if (validateError !== null) {
316
+ throw validateError;
317
+ }
318
+ }
319
+ const key = keyBuilderFromType$4(luvio, input);
320
+ const ttlToUse = TTL$1;
321
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "UnifiedAnalytics", VERSION$7, RepresentationType$7, equals$7);
322
+ return createLink(key);
323
+ };
324
+ function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
325
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
326
+ const rootKey = keyBuilderFromType$4(luvio, input);
327
+ rootKeySet.set(rootKey, {
328
+ namespace: keyPrefix,
329
+ representationName: RepresentationType$7,
330
+ mergeable: false
331
+ });
332
+ }
333
+
334
+ function select$g(luvio, params) {
335
+ return select$h();
336
+ }
337
+ function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
338
+ getTypeCacheKeys$7(storeKeyMap, luvio, response);
339
+ }
340
+ function ingestSuccess$9(luvio, resourceParams, response) {
341
+ const { body } = response;
342
+ const key = keyBuilderFromType$4(luvio, body);
343
+ luvio.storeIngest(key, ingest$7, body);
344
+ const snapshot = luvio.storeLookup({
345
+ recordId: key,
346
+ node: select$g(),
347
+ variables: {},
348
+ });
349
+ if (process.env.NODE_ENV !== 'production') {
350
+ if (snapshot.state !== 'Fulfilled') {
351
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
352
+ }
353
+ }
354
+ deepFreeze(snapshot.data);
355
+ return snapshot;
356
+ }
357
+ function createResourceRequest$b(config) {
358
+ const headers = {};
359
+ return {
360
+ baseUri: '/services/data/v62.0',
361
+ basePath: '/unified-analytics/assets/query',
362
+ method: 'post',
363
+ body: config.body,
364
+ urlParams: {},
365
+ queryParams: {},
366
+ headers,
367
+ priority: 'normal',
368
+ };
369
+ }
370
+
371
+ const adapterName$b = 'queryAssets';
372
+ const queryAssets_ConfigPropertyMetadata = [
373
+ generateParamConfigMetadata('filters', true, 2 /* Body */, 4 /* Unsupported */),
374
+ generateParamConfigMetadata('limit', true, 2 /* Body */, 3 /* Integer */),
375
+ generateParamConfigMetadata('offset', true, 2 /* Body */, 3 /* Integer */),
376
+ generateParamConfigMetadata('orderBy', true, 2 /* Body */, 0 /* String */),
377
+ generateParamConfigMetadata('searchTerm', true, 2 /* Body */, 0 /* String */),
378
+ generateParamConfigMetadata('sortDirection', true, 2 /* Body */, 0 /* String */),
379
+ ];
380
+ const queryAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, queryAssets_ConfigPropertyMetadata);
381
+ const createResourceParams$b = /*#__PURE__*/ createResourceParams$c(queryAssets_ConfigPropertyMetadata);
382
+ function typeCheckConfig$b(untrustedConfig) {
383
+ const config = {};
384
+ typeCheckConfig$c(untrustedConfig, config, queryAssets_ConfigPropertyMetadata);
385
+ const untrustedConfig_filters = untrustedConfig.filters;
386
+ if (untrustedIsObject(untrustedConfig_filters)) {
387
+ const untrustedConfig_filters_object = {};
388
+ if (untrustedConfig_filters_object !== undefined && Object.keys(untrustedConfig_filters_object).length >= 0) {
389
+ config.filters = untrustedConfig_filters_object;
390
+ }
391
+ }
392
+ return config;
393
+ }
394
+ function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
395
+ if (!untrustedIsObject(untrustedConfig)) {
396
+ return null;
397
+ }
398
+ if (process.env.NODE_ENV !== 'production') {
399
+ validateConfig(untrustedConfig, configPropertyNames);
400
+ }
401
+ const config = typeCheckConfig$b(untrustedConfig);
402
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
403
+ return null;
404
+ }
405
+ return config;
406
+ }
407
+ function buildNetworkSnapshot$b(luvio, config, options) {
408
+ const resourceParams = createResourceParams$b(config);
409
+ const request = createResourceRequest$b(resourceParams);
410
+ return luvio.dispatchResourceRequest(request, options)
411
+ .then((response) => {
412
+ return luvio.handleSuccessResponse(() => {
413
+ const snapshot = ingestSuccess$9(luvio, resourceParams, response);
414
+ return luvio.storeBroadcast().then(() => snapshot);
415
+ }, () => {
416
+ const cache = new StoreKeyMap();
417
+ getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
418
+ return cache;
419
+ });
420
+ }, (response) => {
421
+ deepFreeze(response);
422
+ throw response;
423
+ });
424
+ }
425
+ const queryAssetsAdapterFactory = (luvio) => {
426
+ return function queryAssets(untrustedConfig) {
427
+ const config = validateAdapterConfig$b(untrustedConfig, queryAssets_ConfigPropertyNames);
428
+ // Invalid or incomplete config
429
+ if (config === null) {
430
+ throw new Error('Invalid config for "queryAssets"');
431
+ }
432
+ return buildNetworkSnapshot$b(luvio, config);
433
+ };
434
+ };
435
+
436
+ const VERSION$6 = "4a961b470a805882e90c05020d119eea";
97
437
  function validate$c(obj, path = 'DashboardRepresentation') {
98
438
  const v_error = (() => {
99
439
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -179,56 +519,56 @@ function validate$c(obj, path = 'DashboardRepresentation') {
179
519
  })();
180
520
  return v_error === undefined ? null : v_error;
181
521
  }
182
- const RepresentationType$4 = 'DashboardRepresentation';
183
- function keyBuilder$c(luvio, config) {
184
- return keyPrefix + '::' + RepresentationType$4 + ':' + config.name;
522
+ const RepresentationType$6 = 'DashboardRepresentation';
523
+ function keyBuilder$f(luvio, config) {
524
+ return keyPrefix + '::' + RepresentationType$6 + ':' + config.name;
185
525
  }
186
- function keyBuilderFromType$2(luvio, object) {
526
+ function keyBuilderFromType$3(luvio, object) {
187
527
  const keyParams = {
188
528
  name: object.name
189
529
  };
190
- return keyBuilder$c(luvio, keyParams);
530
+ return keyBuilder$f(luvio, keyParams);
191
531
  }
192
- function normalize$4(input, existing, path, luvio, store, timestamp) {
532
+ function normalize$6(input, existing, path, luvio, store, timestamp) {
193
533
  return input;
194
534
  }
195
- const select$b = function DashboardRepresentationSelect() {
535
+ const select$f = function DashboardRepresentationSelect() {
196
536
  return {
197
537
  kind: 'Fragment',
198
- version: VERSION$4,
538
+ version: VERSION$6,
199
539
  private: [],
200
540
  opaque: true
201
541
  };
202
542
  };
203
- function equals$4(existing, incoming) {
543
+ function equals$6(existing, incoming) {
204
544
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
205
545
  return false;
206
546
  }
207
547
  return true;
208
548
  }
209
- const ingest$4 = function DashboardRepresentationIngest(input, path, luvio, store, timestamp) {
549
+ const ingest$6 = function DashboardRepresentationIngest(input, path, luvio, store, timestamp) {
210
550
  if (process.env.NODE_ENV !== 'production') {
211
551
  const validateError = validate$c(input);
212
552
  if (validateError !== null) {
213
553
  throw validateError;
214
554
  }
215
555
  }
216
- const key = keyBuilderFromType$2(luvio, input);
556
+ const key = keyBuilderFromType$3(luvio, input);
217
557
  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);
558
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "UnifiedAnalytics", VERSION$6, RepresentationType$6, equals$6);
219
559
  return createLink(key);
220
560
  };
221
- function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
561
+ function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
222
562
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
223
- const rootKey = keyBuilderFromType$2(luvio, input);
563
+ const rootKey = keyBuilderFromType$3(luvio, input);
224
564
  rootKeySet.set(rootKey, {
225
565
  namespace: keyPrefix,
226
- representationName: RepresentationType$4,
566
+ representationName: RepresentationType$6,
227
567
  mergeable: false
228
568
  });
229
569
  }
230
570
 
231
- const VERSION$3 = "962823130e6a9315240ef0e0f0c5f757";
571
+ const VERSION$5 = "962823130e6a9315240ef0e0f0c5f757";
232
572
  function validate$b(obj, path = 'DashboardCollectionRepresentation') {
233
573
  const v_error = (() => {
234
574
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -249,14 +589,14 @@ function validate$b(obj, path = 'DashboardCollectionRepresentation') {
249
589
  })();
250
590
  return v_error === undefined ? null : v_error;
251
591
  }
252
- const RepresentationType$3 = 'DashboardCollectionRepresentation';
253
- function normalize$3(input, existing, path, luvio, store, timestamp) {
592
+ const RepresentationType$5 = 'DashboardCollectionRepresentation';
593
+ function normalize$5(input, existing, path, luvio, store, timestamp) {
254
594
  const input_dashboards = input.dashboards;
255
595
  const input_dashboards_id = path.fullPath + '__dashboards';
256
596
  for (let i = 0; i < input_dashboards.length; i++) {
257
597
  const input_dashboards_item = input_dashboards[i];
258
598
  let input_dashboards_item_id = input_dashboards_id + '__' + i;
259
- input_dashboards[i] = ingest$4(input_dashboards_item, {
599
+ input_dashboards[i] = ingest$6(input_dashboards_item, {
260
600
  fullPath: input_dashboards_item_id,
261
601
  propertyName: i,
262
602
  parent: {
@@ -269,22 +609,22 @@ function normalize$3(input, existing, path, luvio, store, timestamp) {
269
609
  }
270
610
  return input;
271
611
  }
272
- const select$a = function DashboardCollectionRepresentationSelect() {
612
+ const select$e = function DashboardCollectionRepresentationSelect() {
273
613
  return {
274
614
  kind: 'Fragment',
275
- version: VERSION$3,
615
+ version: VERSION$5,
276
616
  private: [],
277
617
  selections: [
278
618
  {
279
619
  name: 'dashboards',
280
620
  kind: 'Link',
281
621
  plural: true,
282
- fragment: select$b()
622
+ fragment: select$f()
283
623
  }
284
624
  ]
285
625
  };
286
626
  };
287
- function equals$3(existing, incoming) {
627
+ function equals$5(existing, incoming) {
288
628
  const existing_dashboards = existing.dashboards;
289
629
  const incoming_dashboards = incoming.dashboards;
290
630
  const equals_dashboards_items = equalsArray(existing_dashboards, incoming_dashboards, (existing_dashboards_item, incoming_dashboards_item) => {
@@ -297,7 +637,7 @@ function equals$3(existing, incoming) {
297
637
  }
298
638
  return true;
299
639
  }
300
- const ingest$3 = function DashboardCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
640
+ const ingest$5 = function DashboardCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
301
641
  if (process.env.NODE_ENV !== 'production') {
302
642
  const validateError = validate$b(input);
303
643
  if (validateError !== null) {
@@ -306,39 +646,39 @@ const ingest$3 = function DashboardCollectionRepresentationIngest(input, path, l
306
646
  }
307
647
  const key = path.fullPath;
308
648
  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);
649
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "UnifiedAnalytics", VERSION$5, RepresentationType$5, equals$5);
310
650
  return createLink(key);
311
651
  };
312
- function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
652
+ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
313
653
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
314
654
  const rootKey = fullPathFactory();
315
655
  rootKeySet.set(rootKey, {
316
656
  namespace: keyPrefix,
317
- representationName: RepresentationType$3,
657
+ representationName: RepresentationType$5,
318
658
  mergeable: false
319
659
  });
320
660
  const input_dashboards_length = input.dashboards.length;
321
661
  for (let i = 0; i < input_dashboards_length; i++) {
322
- getTypeCacheKeys$4(rootKeySet, luvio, input.dashboards[i]);
662
+ getTypeCacheKeys$6(rootKeySet, luvio, input.dashboards[i]);
323
663
  }
324
664
  }
325
665
 
326
- function select$9(luvio, params) {
327
- return select$a();
666
+ function select$d(luvio, params) {
667
+ return select$e();
328
668
  }
329
- function keyBuilder$b(luvio, params) {
669
+ function keyBuilder$e(luvio, params) {
330
670
  return keyPrefix + '::DashboardCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
331
671
  }
332
- function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
333
- getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
672
+ function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
673
+ getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$e(luvio, resourceParams));
334
674
  }
335
- function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
675
+ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
336
676
  const { body } = response;
337
- const key = keyBuilder$b(luvio, resourceParams);
338
- luvio.storeIngest(key, ingest$3, body);
677
+ const key = keyBuilder$e(luvio, resourceParams);
678
+ luvio.storeIngest(key, ingest$5, body);
339
679
  const snapshot = luvio.storeLookup({
340
680
  recordId: key,
341
- node: select$9(),
681
+ node: select$d(),
342
682
  variables: {},
343
683
  }, snapshotRefresh);
344
684
  if (process.env.NODE_ENV !== 'production') {
@@ -349,13 +689,13 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
349
689
  deepFreeze(snapshot.data);
350
690
  return snapshot;
351
691
  }
352
- function ingestError$3(luvio, params, error, snapshotRefresh) {
353
- const key = keyBuilder$b(luvio, params);
692
+ function ingestError$4(luvio, params, error, snapshotRefresh) {
693
+ const key = keyBuilder$e(luvio, params);
354
694
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
355
695
  luvio.storeIngestError(key, errorSnapshot);
356
696
  return errorSnapshot;
357
697
  }
358
- function createResourceRequest$8(config) {
698
+ function createResourceRequest$a(config) {
359
699
  const headers = {};
360
700
  return {
361
701
  baseUri: '/services/data/v62.0',
@@ -369,106 +709,106 @@ function createResourceRequest$8(config) {
369
709
  };
370
710
  }
371
711
 
372
- const adapterName$8 = 'getDashboards';
712
+ const adapterName$a = 'getDashboards';
373
713
  const getDashboards_ConfigPropertyMetadata = [
374
714
  generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
375
715
  generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
376
716
  ];
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);
717
+ const getDashboards_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getDashboards_ConfigPropertyMetadata);
718
+ const createResourceParams$a = /*#__PURE__*/ createResourceParams$c(getDashboards_ConfigPropertyMetadata);
719
+ function keyBuilder$d(luvio, config) {
720
+ const resourceParams = createResourceParams$a(config);
721
+ return keyBuilder$e(luvio, resourceParams);
382
722
  }
383
- function typeCheckConfig$8(untrustedConfig) {
723
+ function typeCheckConfig$a(untrustedConfig) {
384
724
  const config = {};
385
- typeCheckConfig$9(untrustedConfig, config, getDashboards_ConfigPropertyMetadata);
725
+ typeCheckConfig$c(untrustedConfig, config, getDashboards_ConfigPropertyMetadata);
386
726
  return config;
387
727
  }
388
- function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
728
+ function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
389
729
  if (!untrustedIsObject(untrustedConfig)) {
390
730
  return null;
391
731
  }
392
732
  if (process.env.NODE_ENV !== 'production') {
393
733
  validateConfig(untrustedConfig, configPropertyNames);
394
734
  }
395
- const config = typeCheckConfig$8(untrustedConfig);
735
+ const config = typeCheckConfig$a(untrustedConfig);
396
736
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
397
737
  return null;
398
738
  }
399
739
  return config;
400
740
  }
401
- function adapterFragment$3(luvio, config) {
402
- createResourceParams$8(config);
403
- return select$9();
741
+ function adapterFragment$4(luvio, config) {
742
+ createResourceParams$a(config);
743
+ return select$d();
404
744
  }
405
- function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
406
- const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
745
+ function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
746
+ const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
407
747
  config,
408
- resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
748
+ resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
409
749
  });
410
750
  return luvio.storeBroadcast().then(() => snapshot);
411
751
  }
412
- function onFetchResponseError$3(luvio, config, resourceParams, response) {
413
- const snapshot = ingestError$3(luvio, resourceParams, response, {
752
+ function onFetchResponseError$4(luvio, config, resourceParams, response) {
753
+ const snapshot = ingestError$4(luvio, resourceParams, response, {
414
754
  config,
415
- resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
755
+ resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
416
756
  });
417
757
  return luvio.storeBroadcast().then(() => snapshot);
418
758
  }
419
- function buildNetworkSnapshot$8(luvio, config, options) {
420
- const resourceParams = createResourceParams$8(config);
421
- const request = createResourceRequest$8(resourceParams);
759
+ function buildNetworkSnapshot$a(luvio, config, options) {
760
+ const resourceParams = createResourceParams$a(config);
761
+ const request = createResourceRequest$a(resourceParams);
422
762
  return luvio.dispatchResourceRequest(request, options)
423
763
  .then((response) => {
424
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
764
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
425
765
  const cache = new StoreKeyMap();
426
- getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
766
+ getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
427
767
  return cache;
428
768
  });
429
769
  }, (response) => {
430
- return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
770
+ return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
431
771
  });
432
772
  }
433
- function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
434
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
773
+ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
774
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
435
775
  }
436
- function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
776
+ function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
437
777
  const { luvio, config } = context;
438
778
  const selector = {
439
- recordId: keyBuilder$a(luvio, config),
440
- node: adapterFragment$3(luvio, config),
779
+ recordId: keyBuilder$d(luvio, config),
780
+ node: adapterFragment$4(luvio, config),
441
781
  variables: {},
442
782
  };
443
783
  const cacheSnapshot = storeLookup(selector, {
444
784
  config,
445
- resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
785
+ resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
446
786
  });
447
787
  return cacheSnapshot;
448
788
  }
449
789
  const getDashboardsAdapterFactory = (luvio) => function UnifiedAnalytics__getDashboards(untrustedConfig, requestContext) {
450
- const config = validateAdapterConfig$8(untrustedConfig, getDashboards_ConfigPropertyNames);
790
+ const config = validateAdapterConfig$a(untrustedConfig, getDashboards_ConfigPropertyNames);
451
791
  // Invalid or incomplete config
452
792
  if (config === null) {
453
793
  return null;
454
794
  }
455
795
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
456
- buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
796
+ buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
457
797
  };
458
798
 
459
- function select$8(luvio, params) {
460
- return select$b();
799
+ function select$c(luvio, params) {
800
+ return select$f();
461
801
  }
462
- function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
463
- getTypeCacheKeys$4(storeKeyMap, luvio, response);
802
+ function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
803
+ getTypeCacheKeys$6(storeKeyMap, luvio, response);
464
804
  }
465
- function ingestSuccess$5(luvio, resourceParams, response) {
805
+ function ingestSuccess$7(luvio, resourceParams, response) {
466
806
  const { body } = response;
467
- const key = keyBuilderFromType$2(luvio, body);
468
- luvio.storeIngest(key, ingest$4, body);
807
+ const key = keyBuilderFromType$3(luvio, body);
808
+ luvio.storeIngest(key, ingest$6, body);
469
809
  const snapshot = luvio.storeLookup({
470
810
  recordId: key,
471
- node: select$8(),
811
+ node: select$c(),
472
812
  variables: {},
473
813
  });
474
814
  if (process.env.NODE_ENV !== 'production') {
@@ -479,7 +819,7 @@ function ingestSuccess$5(luvio, resourceParams, response) {
479
819
  deepFreeze(snapshot.data);
480
820
  return snapshot;
481
821
  }
482
- function createResourceRequest$7(config) {
822
+ function createResourceRequest$9(config) {
483
823
  const headers = {};
484
824
  return {
485
825
  baseUri: '/services/data/v62.0',
@@ -493,7 +833,7 @@ function createResourceRequest$7(config) {
493
833
  };
494
834
  }
495
835
 
496
- const adapterName$7 = 'createDashboard';
836
+ const adapterName$9 = 'createDashboard';
497
837
  const createDashboard_ConfigPropertyMetadata = [
498
838
  generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
499
839
  generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
@@ -502,11 +842,11 @@ const createDashboard_ConfigPropertyMetadata = [
502
842
  generateParamConfigMetadata('layouts', true, 2 /* Body */, 4 /* Unsupported */, true),
503
843
  generateParamConfigMetadata('widgets', true, 2 /* Body */, 4 /* Unsupported */),
504
844
  ];
505
- const createDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, createDashboard_ConfigPropertyMetadata);
506
- const createResourceParams$7 = /*#__PURE__*/ createResourceParams$9(createDashboard_ConfigPropertyMetadata);
507
- function typeCheckConfig$7(untrustedConfig) {
845
+ const createDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, createDashboard_ConfigPropertyMetadata);
846
+ const createResourceParams$9 = /*#__PURE__*/ createResourceParams$c(createDashboard_ConfigPropertyMetadata);
847
+ function typeCheckConfig$9(untrustedConfig) {
508
848
  const config = {};
509
- typeCheckConfig$9(untrustedConfig, config, createDashboard_ConfigPropertyMetadata);
849
+ typeCheckConfig$c(untrustedConfig, config, createDashboard_ConfigPropertyMetadata);
510
850
  const untrustedConfig_layouts = untrustedConfig.layouts;
511
851
  if (ArrayIsArray$1(untrustedConfig_layouts)) {
512
852
  const untrustedConfig_layouts_array = [];
@@ -533,30 +873,30 @@ function typeCheckConfig$7(untrustedConfig) {
533
873
  }
534
874
  return config;
535
875
  }
536
- function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
876
+ function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
537
877
  if (!untrustedIsObject(untrustedConfig)) {
538
878
  return null;
539
879
  }
540
880
  if (process.env.NODE_ENV !== 'production') {
541
881
  validateConfig(untrustedConfig, configPropertyNames);
542
882
  }
543
- const config = typeCheckConfig$7(untrustedConfig);
883
+ const config = typeCheckConfig$9(untrustedConfig);
544
884
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
545
885
  return null;
546
886
  }
547
887
  return config;
548
888
  }
549
- function buildNetworkSnapshot$7(luvio, config, options) {
550
- const resourceParams = createResourceParams$7(config);
551
- const request = createResourceRequest$7(resourceParams);
889
+ function buildNetworkSnapshot$9(luvio, config, options) {
890
+ const resourceParams = createResourceParams$9(config);
891
+ const request = createResourceRequest$9(resourceParams);
552
892
  return luvio.dispatchResourceRequest(request, options)
553
893
  .then((response) => {
554
894
  return luvio.handleSuccessResponse(() => {
555
- const snapshot = ingestSuccess$5(luvio, resourceParams, response);
895
+ const snapshot = ingestSuccess$7(luvio, resourceParams, response);
556
896
  return luvio.storeBroadcast().then(() => snapshot);
557
897
  }, () => {
558
898
  const cache = new StoreKeyMap();
559
- getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
899
+ getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
560
900
  return cache;
561
901
  });
562
902
  }, (response) => {
@@ -566,33 +906,33 @@ function buildNetworkSnapshot$7(luvio, config, options) {
566
906
  }
567
907
  const createDashboardAdapterFactory = (luvio) => {
568
908
  return function createDashboard(untrustedConfig) {
569
- const config = validateAdapterConfig$7(untrustedConfig, createDashboard_ConfigPropertyNames);
909
+ const config = validateAdapterConfig$9(untrustedConfig, createDashboard_ConfigPropertyNames);
570
910
  // Invalid or incomplete config
571
911
  if (config === null) {
572
912
  throw new Error('Invalid config for "createDashboard"');
573
913
  }
574
- return buildNetworkSnapshot$7(luvio, config);
914
+ return buildNetworkSnapshot$9(luvio, config);
575
915
  };
576
916
  };
577
917
 
578
- function keyBuilder$9(luvio, params) {
579
- return keyBuilder$c(luvio, {
918
+ function keyBuilder$c(luvio, params) {
919
+ return keyBuilder$f(luvio, {
580
920
  name: params.urlParams.dashboardIdOrApiName
581
921
  });
582
922
  }
583
- function getResponseCacheKeys$6(cacheKeyMap, luvio, resourceParams) {
584
- const key = keyBuilder$9(luvio, resourceParams);
923
+ function getResponseCacheKeys$8(cacheKeyMap, luvio, resourceParams) {
924
+ const key = keyBuilder$c(luvio, resourceParams);
585
925
  cacheKeyMap.set(key, {
586
926
  namespace: keyPrefix,
587
- representationName: RepresentationType$4,
927
+ representationName: RepresentationType$6,
588
928
  mergeable: false
589
929
  });
590
930
  }
591
931
  function evictSuccess$1(luvio, resourceParams) {
592
- const key = keyBuilder$9(luvio, resourceParams);
932
+ const key = keyBuilder$c(luvio, resourceParams);
593
933
  luvio.storeEvict(key);
594
934
  }
595
- function createResourceRequest$6(config) {
935
+ function createResourceRequest$8(config) {
596
936
  const headers = {};
597
937
  return {
598
938
  baseUri: '/services/data/v62.0',
@@ -606,33 +946,33 @@ function createResourceRequest$6(config) {
606
946
  };
607
947
  }
608
948
 
609
- const adapterName$6 = 'deleteDashboard';
949
+ const adapterName$8 = 'deleteDashboard';
610
950
  const deleteDashboard_ConfigPropertyMetadata = [
611
951
  generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
612
952
  ];
613
- const deleteDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, deleteDashboard_ConfigPropertyMetadata);
614
- const createResourceParams$6 = /*#__PURE__*/ createResourceParams$9(deleteDashboard_ConfigPropertyMetadata);
615
- function typeCheckConfig$6(untrustedConfig) {
953
+ const deleteDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, deleteDashboard_ConfigPropertyMetadata);
954
+ const createResourceParams$8 = /*#__PURE__*/ createResourceParams$c(deleteDashboard_ConfigPropertyMetadata);
955
+ function typeCheckConfig$8(untrustedConfig) {
616
956
  const config = {};
617
- typeCheckConfig$9(untrustedConfig, config, deleteDashboard_ConfigPropertyMetadata);
957
+ typeCheckConfig$c(untrustedConfig, config, deleteDashboard_ConfigPropertyMetadata);
618
958
  return config;
619
959
  }
620
- function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
960
+ function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
621
961
  if (!untrustedIsObject(untrustedConfig)) {
622
962
  return null;
623
963
  }
624
964
  if (process.env.NODE_ENV !== 'production') {
625
965
  validateConfig(untrustedConfig, configPropertyNames);
626
966
  }
627
- const config = typeCheckConfig$6(untrustedConfig);
967
+ const config = typeCheckConfig$8(untrustedConfig);
628
968
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
629
969
  return null;
630
970
  }
631
971
  return config;
632
972
  }
633
- function buildNetworkSnapshot$6(luvio, config, options) {
634
- const resourceParams = createResourceParams$6(config);
635
- const request = createResourceRequest$6(resourceParams);
973
+ function buildNetworkSnapshot$8(luvio, config, options) {
974
+ const resourceParams = createResourceParams$8(config);
975
+ const request = createResourceRequest$8(resourceParams);
636
976
  return luvio.dispatchResourceRequest(request, options)
637
977
  .then(() => {
638
978
  return luvio.handleSuccessResponse(() => {
@@ -640,7 +980,7 @@ function buildNetworkSnapshot$6(luvio, config, options) {
640
980
  return luvio.storeBroadcast();
641
981
  }, () => {
642
982
  const cache = new StoreKeyMap();
643
- getResponseCacheKeys$6(cache, luvio, resourceParams);
983
+ getResponseCacheKeys$8(cache, luvio, resourceParams);
644
984
  return cache;
645
985
  });
646
986
  }, (response) => {
@@ -650,33 +990,33 @@ function buildNetworkSnapshot$6(luvio, config, options) {
650
990
  }
651
991
  const deleteDashboardAdapterFactory = (luvio) => {
652
992
  return function UnifiedAnalyticsdeleteDashboard(untrustedConfig) {
653
- const config = validateAdapterConfig$6(untrustedConfig, deleteDashboard_ConfigPropertyNames);
993
+ const config = validateAdapterConfig$8(untrustedConfig, deleteDashboard_ConfigPropertyNames);
654
994
  // Invalid or incomplete config
655
995
  if (config === null) {
656
- throw new Error(`Invalid config for "${adapterName$6}"`);
996
+ throw new Error(`Invalid config for "${adapterName$8}"`);
657
997
  }
658
- return buildNetworkSnapshot$6(luvio, config);
998
+ return buildNetworkSnapshot$8(luvio, config);
659
999
  };
660
1000
  };
661
1001
 
662
- function select$7(luvio, params) {
663
- return select$b();
1002
+ function select$b(luvio, params) {
1003
+ return select$f();
664
1004
  }
665
- function keyBuilder$8(luvio, params) {
666
- return keyBuilder$c(luvio, {
1005
+ function keyBuilder$b(luvio, params) {
1006
+ return keyBuilder$f(luvio, {
667
1007
  name: params.urlParams.dashboardIdOrApiName
668
1008
  });
669
1009
  }
670
- function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
671
- getTypeCacheKeys$4(storeKeyMap, luvio, response);
1010
+ function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
1011
+ getTypeCacheKeys$6(storeKeyMap, luvio, response);
672
1012
  }
673
- function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
1013
+ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
674
1014
  const { body } = response;
675
- const key = keyBuilder$8(luvio, resourceParams);
676
- luvio.storeIngest(key, ingest$4, body);
1015
+ const key = keyBuilder$b(luvio, resourceParams);
1016
+ luvio.storeIngest(key, ingest$6, body);
677
1017
  const snapshot = luvio.storeLookup({
678
1018
  recordId: key,
679
- node: select$7(),
1019
+ node: select$b(),
680
1020
  variables: {},
681
1021
  }, snapshotRefresh);
682
1022
  if (process.env.NODE_ENV !== 'production') {
@@ -687,13 +1027,13 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
687
1027
  deepFreeze(snapshot.data);
688
1028
  return snapshot;
689
1029
  }
690
- function ingestError$2(luvio, params, error, snapshotRefresh) {
691
- const key = keyBuilder$8(luvio, params);
1030
+ function ingestError$3(luvio, params, error, snapshotRefresh) {
1031
+ const key = keyBuilder$b(luvio, params);
692
1032
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
693
1033
  luvio.storeIngestError(key, errorSnapshot);
694
1034
  return errorSnapshot;
695
1035
  }
696
- function createResourceRequest$5(config) {
1036
+ function createResourceRequest$7(config) {
697
1037
  const headers = {};
698
1038
  return {
699
1039
  baseUri: '/services/data/v62.0',
@@ -707,105 +1047,105 @@ function createResourceRequest$5(config) {
707
1047
  };
708
1048
  }
709
1049
 
710
- const adapterName$5 = 'getDashboardByName';
1050
+ const adapterName$7 = 'getDashboardByName';
711
1051
  const getDashboardByName_ConfigPropertyMetadata = [
712
1052
  generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
713
1053
  ];
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);
1054
+ const getDashboardByName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getDashboardByName_ConfigPropertyMetadata);
1055
+ const createResourceParams$7 = /*#__PURE__*/ createResourceParams$c(getDashboardByName_ConfigPropertyMetadata);
1056
+ function keyBuilder$a(luvio, config) {
1057
+ const resourceParams = createResourceParams$7(config);
1058
+ return keyBuilder$b(luvio, resourceParams);
719
1059
  }
720
- function typeCheckConfig$5(untrustedConfig) {
1060
+ function typeCheckConfig$7(untrustedConfig) {
721
1061
  const config = {};
722
- typeCheckConfig$9(untrustedConfig, config, getDashboardByName_ConfigPropertyMetadata);
1062
+ typeCheckConfig$c(untrustedConfig, config, getDashboardByName_ConfigPropertyMetadata);
723
1063
  return config;
724
1064
  }
725
- function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
1065
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
726
1066
  if (!untrustedIsObject(untrustedConfig)) {
727
1067
  return null;
728
1068
  }
729
1069
  if (process.env.NODE_ENV !== 'production') {
730
1070
  validateConfig(untrustedConfig, configPropertyNames);
731
1071
  }
732
- const config = typeCheckConfig$5(untrustedConfig);
1072
+ const config = typeCheckConfig$7(untrustedConfig);
733
1073
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
734
1074
  return null;
735
1075
  }
736
1076
  return config;
737
1077
  }
738
- function adapterFragment$2(luvio, config) {
739
- createResourceParams$5(config);
740
- return select$7();
1078
+ function adapterFragment$3(luvio, config) {
1079
+ createResourceParams$7(config);
1080
+ return select$b();
741
1081
  }
742
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
743
- const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
1082
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
1083
+ const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
744
1084
  config,
745
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1085
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
746
1086
  });
747
1087
  return luvio.storeBroadcast().then(() => snapshot);
748
1088
  }
749
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
750
- const snapshot = ingestError$2(luvio, resourceParams, response, {
1089
+ function onFetchResponseError$3(luvio, config, resourceParams, response) {
1090
+ const snapshot = ingestError$3(luvio, resourceParams, response, {
751
1091
  config,
752
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1092
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
753
1093
  });
754
1094
  return luvio.storeBroadcast().then(() => snapshot);
755
1095
  }
756
- function buildNetworkSnapshot$5(luvio, config, options) {
757
- const resourceParams = createResourceParams$5(config);
758
- const request = createResourceRequest$5(resourceParams);
1096
+ function buildNetworkSnapshot$7(luvio, config, options) {
1097
+ const resourceParams = createResourceParams$7(config);
1098
+ const request = createResourceRequest$7(resourceParams);
759
1099
  return luvio.dispatchResourceRequest(request, options)
760
1100
  .then((response) => {
761
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1101
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
762
1102
  const cache = new StoreKeyMap();
763
- getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
1103
+ getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
764
1104
  return cache;
765
1105
  });
766
1106
  }, (response) => {
767
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
1107
+ return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
768
1108
  });
769
1109
  }
770
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
771
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
1110
+ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
1111
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
772
1112
  }
773
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1113
+ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
774
1114
  const { luvio, config } = context;
775
1115
  const selector = {
776
- recordId: keyBuilder$7(luvio, config),
777
- node: adapterFragment$2(luvio, config),
1116
+ recordId: keyBuilder$a(luvio, config),
1117
+ node: adapterFragment$3(luvio, config),
778
1118
  variables: {},
779
1119
  };
780
1120
  const cacheSnapshot = storeLookup(selector, {
781
1121
  config,
782
- resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1122
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
783
1123
  });
784
1124
  return cacheSnapshot;
785
1125
  }
786
1126
  const getDashboardByNameAdapterFactory = (luvio) => function UnifiedAnalytics__getDashboardByName(untrustedConfig, requestContext) {
787
- const config = validateAdapterConfig$5(untrustedConfig, getDashboardByName_ConfigPropertyNames);
1127
+ const config = validateAdapterConfig$7(untrustedConfig, getDashboardByName_ConfigPropertyNames);
788
1128
  // Invalid or incomplete config
789
1129
  if (config === null) {
790
1130
  return null;
791
1131
  }
792
1132
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
793
- buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1133
+ buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
794
1134
  };
795
1135
 
796
- function select$6(luvio, params) {
797
- return select$b();
1136
+ function select$a(luvio, params) {
1137
+ return select$f();
798
1138
  }
799
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
800
- getTypeCacheKeys$4(storeKeyMap, luvio, response);
1139
+ function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
1140
+ getTypeCacheKeys$6(storeKeyMap, luvio, response);
801
1141
  }
802
- function ingestSuccess$3(luvio, resourceParams, response) {
1142
+ function ingestSuccess$5(luvio, resourceParams, response) {
803
1143
  const { body } = response;
804
- const key = keyBuilderFromType$2(luvio, body);
805
- luvio.storeIngest(key, ingest$4, body);
1144
+ const key = keyBuilderFromType$3(luvio, body);
1145
+ luvio.storeIngest(key, ingest$6, body);
806
1146
  const snapshot = luvio.storeLookup({
807
1147
  recordId: key,
808
- node: select$6(),
1148
+ node: select$a(),
809
1149
  variables: {},
810
1150
  });
811
1151
  if (process.env.NODE_ENV !== 'production') {
@@ -816,7 +1156,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
816
1156
  deepFreeze(snapshot.data);
817
1157
  return snapshot;
818
1158
  }
819
- function createResourceRequest$4(config) {
1159
+ function createResourceRequest$6(config) {
820
1160
  const headers = {};
821
1161
  return {
822
1162
  baseUri: '/services/data/v62.0',
@@ -830,7 +1170,7 @@ function createResourceRequest$4(config) {
830
1170
  };
831
1171
  }
832
1172
 
833
- const adapterName$4 = 'updateDashboard';
1173
+ const adapterName$6 = 'updateDashboard';
834
1174
  const updateDashboard_ConfigPropertyMetadata = [
835
1175
  generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
836
1176
  generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
@@ -840,11 +1180,11 @@ const updateDashboard_ConfigPropertyMetadata = [
840
1180
  generateParamConfigMetadata('layouts', true, 2 /* Body */, 4 /* Unsupported */, true),
841
1181
  generateParamConfigMetadata('widgets', true, 2 /* Body */, 4 /* Unsupported */),
842
1182
  ];
843
- const updateDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, updateDashboard_ConfigPropertyMetadata);
844
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$9(updateDashboard_ConfigPropertyMetadata);
845
- function typeCheckConfig$4(untrustedConfig) {
1183
+ const updateDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, updateDashboard_ConfigPropertyMetadata);
1184
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$c(updateDashboard_ConfigPropertyMetadata);
1185
+ function typeCheckConfig$6(untrustedConfig) {
846
1186
  const config = {};
847
- typeCheckConfig$9(untrustedConfig, config, updateDashboard_ConfigPropertyMetadata);
1187
+ typeCheckConfig$c(untrustedConfig, config, updateDashboard_ConfigPropertyMetadata);
848
1188
  const untrustedConfig_layouts = untrustedConfig.layouts;
849
1189
  if (ArrayIsArray$1(untrustedConfig_layouts)) {
850
1190
  const untrustedConfig_layouts_array = [];
@@ -871,30 +1211,30 @@ function typeCheckConfig$4(untrustedConfig) {
871
1211
  }
872
1212
  return config;
873
1213
  }
874
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1214
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
875
1215
  if (!untrustedIsObject(untrustedConfig)) {
876
1216
  return null;
877
1217
  }
878
1218
  if (process.env.NODE_ENV !== 'production') {
879
1219
  validateConfig(untrustedConfig, configPropertyNames);
880
1220
  }
881
- const config = typeCheckConfig$4(untrustedConfig);
1221
+ const config = typeCheckConfig$6(untrustedConfig);
882
1222
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
883
1223
  return null;
884
1224
  }
885
1225
  return config;
886
1226
  }
887
- function buildNetworkSnapshot$4(luvio, config, options) {
888
- const resourceParams = createResourceParams$4(config);
889
- const request = createResourceRequest$4(resourceParams);
1227
+ function buildNetworkSnapshot$6(luvio, config, options) {
1228
+ const resourceParams = createResourceParams$6(config);
1229
+ const request = createResourceRequest$6(resourceParams);
890
1230
  return luvio.dispatchResourceRequest(request, options)
891
1231
  .then((response) => {
892
1232
  return luvio.handleSuccessResponse(() => {
893
- const snapshot = ingestSuccess$3(luvio, resourceParams, response);
1233
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response);
894
1234
  return luvio.storeBroadcast().then(() => snapshot);
895
1235
  }, () => {
896
1236
  const cache = new StoreKeyMap();
897
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
1237
+ getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
898
1238
  return cache;
899
1239
  });
900
1240
  }, (response) => {
@@ -904,20 +1244,39 @@ function buildNetworkSnapshot$4(luvio, config, options) {
904
1244
  }
905
1245
  const updateDashboardAdapterFactory = (luvio) => {
906
1246
  return function updateDashboard(untrustedConfig) {
907
- const config = validateAdapterConfig$4(untrustedConfig, updateDashboard_ConfigPropertyNames);
1247
+ const config = validateAdapterConfig$6(untrustedConfig, updateDashboard_ConfigPropertyNames);
908
1248
  // Invalid or incomplete config
909
1249
  if (config === null) {
910
1250
  throw new Error('Invalid config for "updateDashboard"');
911
1251
  }
912
- return buildNetworkSnapshot$4(luvio, config);
1252
+ return buildNetworkSnapshot$6(luvio, config);
913
1253
  };
914
1254
  };
915
1255
 
916
- function validate$a(obj, path = 'BaseAnalyticsRepresentation') {
1256
+ const VERSION$4 = "13e8e39beeffee6e3f13ac9a24b8e8be";
1257
+ function validate$a(obj, path = 'AnalyticsVisualizationRepresentation') {
917
1258
  const v_error = (() => {
918
1259
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
919
1260
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
920
1261
  }
1262
+ const obj_createdBy = obj.createdBy;
1263
+ const path_createdBy = path + '.createdBy';
1264
+ const referencepath_createdByValidationError = validate$g(obj_createdBy, path_createdBy);
1265
+ if (referencepath_createdByValidationError !== null) {
1266
+ let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_createdBy + '")\n';
1267
+ message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1268
+ return new TypeError(message);
1269
+ }
1270
+ const obj_createdDate = obj.createdDate;
1271
+ const path_createdDate = path + '.createdDate';
1272
+ if (typeof obj_createdDate !== 'string') {
1273
+ return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
1274
+ }
1275
+ const obj_dataSource = obj.dataSource;
1276
+ const path_dataSource = path + '.dataSource';
1277
+ if (typeof obj_dataSource !== 'string') {
1278
+ return new TypeError('Expected "string" but received "' + typeof obj_dataSource + '" (at "' + path_dataSource + '")');
1279
+ }
921
1280
  if (obj.description !== undefined) {
922
1281
  const obj_description = obj.description;
923
1282
  const path_description = path + '.description';
@@ -930,95 +1289,554 @@ function validate$a(obj, path = 'BaseAnalyticsRepresentation') {
930
1289
  if (typeof obj_id !== 'string') {
931
1290
  return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
932
1291
  }
933
- if (obj.label !== undefined) {
934
- const obj_label = obj.label;
935
- const path_label = path + '.label';
936
- if (typeof obj_label !== 'string') {
937
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1292
+ const obj_label = obj.label;
1293
+ const path_label = path + '.label';
1294
+ if (typeof obj_label !== 'string') {
1295
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1296
+ }
1297
+ if (obj.lastModifiedBy !== undefined) {
1298
+ const obj_lastModifiedBy = obj.lastModifiedBy;
1299
+ const path_lastModifiedBy = path + '.lastModifiedBy';
1300
+ const referencepath_lastModifiedByValidationError = validate$g(obj_lastModifiedBy, path_lastModifiedBy);
1301
+ if (referencepath_lastModifiedByValidationError !== null) {
1302
+ let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_lastModifiedBy + '")\n';
1303
+ message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1304
+ return new TypeError(message);
938
1305
  }
939
1306
  }
940
- if (obj.name !== undefined) {
941
- const obj_name = obj.name;
942
- const path_name = path + '.name';
943
- if (typeof obj_name !== 'string') {
944
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1307
+ if (obj.lastModifiedDate !== undefined) {
1308
+ const obj_lastModifiedDate = obj.lastModifiedDate;
1309
+ const path_lastModifiedDate = path + '.lastModifiedDate';
1310
+ if (typeof obj_lastModifiedDate !== 'string') {
1311
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
945
1312
  }
946
1313
  }
1314
+ const obj_name = obj.name;
1315
+ const path_name = path + '.name';
1316
+ if (typeof obj_name !== 'string') {
1317
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1318
+ }
947
1319
  })();
948
1320
  return v_error === undefined ? null : v_error;
949
1321
  }
950
-
951
- function validate$9(obj, path = 'AnalyticsUserRepresentation') {
952
- const validateBaseAnalyticsRepresentation_validateError = validate$a(obj, path);
953
- if (validateBaseAnalyticsRepresentation_validateError !== null) {
954
- return validateBaseAnalyticsRepresentation_validateError;
1322
+ const RepresentationType$4 = 'AnalyticsVisualizationRepresentation';
1323
+ function keyBuilder$9(luvio, config) {
1324
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.name;
1325
+ }
1326
+ function keyBuilderFromType$2(luvio, object) {
1327
+ const keyParams = {
1328
+ name: object.name
1329
+ };
1330
+ return keyBuilder$9(luvio, keyParams);
1331
+ }
1332
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
1333
+ return input;
1334
+ }
1335
+ const select$9 = function AnalyticsVisualizationRepresentationSelect() {
1336
+ return {
1337
+ kind: 'Fragment',
1338
+ version: VERSION$4,
1339
+ private: [],
1340
+ opaque: true
1341
+ };
1342
+ };
1343
+ function equals$4(existing, incoming) {
1344
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1345
+ return false;
955
1346
  }
1347
+ return true;
1348
+ }
1349
+ const ingest$4 = function AnalyticsVisualizationRepresentationIngest(input, path, luvio, store, timestamp) {
1350
+ if (process.env.NODE_ENV !== 'production') {
1351
+ const validateError = validate$a(input);
1352
+ if (validateError !== null) {
1353
+ throw validateError;
1354
+ }
1355
+ }
1356
+ const key = keyBuilderFromType$2(luvio, input);
1357
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
1358
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "UnifiedAnalytics", VERSION$4, RepresentationType$4, equals$4);
1359
+ return createLink(key);
1360
+ };
1361
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
1362
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1363
+ const rootKey = keyBuilderFromType$2(luvio, input);
1364
+ rootKeySet.set(rootKey, {
1365
+ namespace: keyPrefix,
1366
+ representationName: RepresentationType$4,
1367
+ mergeable: false
1368
+ });
1369
+ }
1370
+
1371
+ const VERSION$3 = "342da25bfe5e13c7f4ccbc8aa0980a4f";
1372
+ function validate$9(obj, path = 'AnalyticsVisualizationCollectionRepresentation') {
956
1373
  const v_error = (() => {
957
1374
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
958
1375
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
959
1376
  }
960
- if (obj.profilePhotoUrl !== undefined) {
961
- const obj_profilePhotoUrl = obj.profilePhotoUrl;
962
- const path_profilePhotoUrl = path + '.profilePhotoUrl';
963
- let obj_profilePhotoUrl_union0 = null;
964
- const obj_profilePhotoUrl_union0_error = (() => {
965
- if (typeof obj_profilePhotoUrl !== 'string') {
966
- return new TypeError('Expected "string" but received "' + typeof obj_profilePhotoUrl + '" (at "' + path_profilePhotoUrl + '")');
967
- }
968
- })();
969
- if (obj_profilePhotoUrl_union0_error != null) {
970
- obj_profilePhotoUrl_union0 = obj_profilePhotoUrl_union0_error.message;
971
- }
972
- let obj_profilePhotoUrl_union1 = null;
973
- const obj_profilePhotoUrl_union1_error = (() => {
974
- if (obj_profilePhotoUrl !== null) {
975
- return new TypeError('Expected "null" but received "' + typeof obj_profilePhotoUrl + '" (at "' + path_profilePhotoUrl + '")');
976
- }
977
- })();
978
- if (obj_profilePhotoUrl_union1_error != null) {
979
- obj_profilePhotoUrl_union1 = obj_profilePhotoUrl_union1_error.message;
980
- }
981
- if (obj_profilePhotoUrl_union0 && obj_profilePhotoUrl_union1) {
982
- let message = 'Object doesn\'t match union (at "' + path_profilePhotoUrl + '")';
983
- message += '\n' + obj_profilePhotoUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
984
- message += '\n' + obj_profilePhotoUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
985
- return new TypeError(message);
1377
+ const obj_visualizations = obj.visualizations;
1378
+ const path_visualizations = path + '.visualizations';
1379
+ if (!ArrayIsArray(obj_visualizations)) {
1380
+ return new TypeError('Expected "array" but received "' + typeof obj_visualizations + '" (at "' + path_visualizations + '")');
1381
+ }
1382
+ for (let i = 0; i < obj_visualizations.length; i++) {
1383
+ const obj_visualizations_item = obj_visualizations[i];
1384
+ const path_visualizations_item = path_visualizations + '[' + i + ']';
1385
+ if (typeof obj_visualizations_item !== 'object') {
1386
+ return new TypeError('Expected "object" but received "' + typeof obj_visualizations_item + '" (at "' + path_visualizations_item + '")');
986
1387
  }
987
1388
  }
988
1389
  })();
989
1390
  return v_error === undefined ? null : v_error;
990
1391
  }
1392
+ const RepresentationType$3 = 'AnalyticsVisualizationCollectionRepresentation';
1393
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
1394
+ const input_visualizations = input.visualizations;
1395
+ const input_visualizations_id = path.fullPath + '__visualizations';
1396
+ for (let i = 0; i < input_visualizations.length; i++) {
1397
+ const input_visualizations_item = input_visualizations[i];
1398
+ let input_visualizations_item_id = input_visualizations_id + '__' + i;
1399
+ input_visualizations[i] = ingest$4(input_visualizations_item, {
1400
+ fullPath: input_visualizations_item_id,
1401
+ propertyName: i,
1402
+ parent: {
1403
+ data: input,
1404
+ key: path.fullPath,
1405
+ existing: existing,
1406
+ },
1407
+ ttl: path.ttl
1408
+ }, luvio, store, timestamp);
1409
+ }
1410
+ return input;
1411
+ }
1412
+ const select$8 = function AnalyticsVisualizationCollectionRepresentationSelect() {
1413
+ return {
1414
+ kind: 'Fragment',
1415
+ version: VERSION$3,
1416
+ private: [],
1417
+ selections: [
1418
+ {
1419
+ name: 'visualizations',
1420
+ kind: 'Link',
1421
+ plural: true,
1422
+ fragment: select$9()
1423
+ }
1424
+ ]
1425
+ };
1426
+ };
1427
+ function equals$3(existing, incoming) {
1428
+ const existing_visualizations = existing.visualizations;
1429
+ const incoming_visualizations = incoming.visualizations;
1430
+ const equals_visualizations_items = equalsArray(existing_visualizations, incoming_visualizations, (existing_visualizations_item, incoming_visualizations_item) => {
1431
+ if (!(existing_visualizations_item.__ref === incoming_visualizations_item.__ref)) {
1432
+ return false;
1433
+ }
1434
+ });
1435
+ if (equals_visualizations_items === false) {
1436
+ return false;
1437
+ }
1438
+ return true;
1439
+ }
1440
+ const ingest$3 = function AnalyticsVisualizationCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
1441
+ if (process.env.NODE_ENV !== 'production') {
1442
+ const validateError = validate$9(input);
1443
+ if (validateError !== null) {
1444
+ throw validateError;
1445
+ }
1446
+ }
1447
+ const key = path.fullPath;
1448
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
1449
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "UnifiedAnalytics", VERSION$3, RepresentationType$3, equals$3);
1450
+ return createLink(key);
1451
+ };
1452
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
1453
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1454
+ const rootKey = fullPathFactory();
1455
+ rootKeySet.set(rootKey, {
1456
+ namespace: keyPrefix,
1457
+ representationName: RepresentationType$3,
1458
+ mergeable: false
1459
+ });
1460
+ const input_visualizations_length = input.visualizations.length;
1461
+ for (let i = 0; i < input_visualizations_length; i++) {
1462
+ getTypeCacheKeys$4(rootKeySet, luvio, input.visualizations[i]);
1463
+ }
1464
+ }
991
1465
 
992
- const VERSION$2 = "13e8e39beeffee6e3f13ac9a24b8e8be";
993
- function validate$8(obj, path = 'AnalyticsVisualizationRepresentation') {
1466
+ function select$7(luvio, params) {
1467
+ return select$8();
1468
+ }
1469
+ function keyBuilder$8(luvio, params) {
1470
+ return keyPrefix + '::AnalyticsVisualizationCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
1471
+ }
1472
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
1473
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
1474
+ }
1475
+ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
1476
+ const { body } = response;
1477
+ const key = keyBuilder$8(luvio, resourceParams);
1478
+ luvio.storeIngest(key, ingest$3, body);
1479
+ const snapshot = luvio.storeLookup({
1480
+ recordId: key,
1481
+ node: select$7(),
1482
+ variables: {},
1483
+ }, snapshotRefresh);
1484
+ if (process.env.NODE_ENV !== 'production') {
1485
+ if (snapshot.state !== 'Fulfilled') {
1486
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1487
+ }
1488
+ }
1489
+ deepFreeze(snapshot.data);
1490
+ return snapshot;
1491
+ }
1492
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
1493
+ const key = keyBuilder$8(luvio, params);
1494
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1495
+ luvio.storeIngestError(key, errorSnapshot);
1496
+ return errorSnapshot;
1497
+ }
1498
+ function createResourceRequest$5(config) {
1499
+ const headers = {};
1500
+ return {
1501
+ baseUri: '/services/data/v62.0',
1502
+ basePath: '/unified-analytics/visualizations',
1503
+ method: 'get',
1504
+ body: null,
1505
+ urlParams: {},
1506
+ queryParams: config.queryParams,
1507
+ headers,
1508
+ priority: 'normal',
1509
+ };
1510
+ }
1511
+
1512
+ const adapterName$5 = 'getVisualizations';
1513
+ const getVisualizations_ConfigPropertyMetadata = [
1514
+ generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
1515
+ generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
1516
+ ];
1517
+ const getVisualizations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getVisualizations_ConfigPropertyMetadata);
1518
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$c(getVisualizations_ConfigPropertyMetadata);
1519
+ function keyBuilder$7(luvio, config) {
1520
+ const resourceParams = createResourceParams$5(config);
1521
+ return keyBuilder$8(luvio, resourceParams);
1522
+ }
1523
+ function typeCheckConfig$5(untrustedConfig) {
1524
+ const config = {};
1525
+ typeCheckConfig$c(untrustedConfig, config, getVisualizations_ConfigPropertyMetadata);
1526
+ return config;
1527
+ }
1528
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
1529
+ if (!untrustedIsObject(untrustedConfig)) {
1530
+ return null;
1531
+ }
1532
+ if (process.env.NODE_ENV !== 'production') {
1533
+ validateConfig(untrustedConfig, configPropertyNames);
1534
+ }
1535
+ const config = typeCheckConfig$5(untrustedConfig);
1536
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1537
+ return null;
1538
+ }
1539
+ return config;
1540
+ }
1541
+ function adapterFragment$2(luvio, config) {
1542
+ createResourceParams$5(config);
1543
+ return select$7();
1544
+ }
1545
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1546
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
1547
+ config,
1548
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1549
+ });
1550
+ return luvio.storeBroadcast().then(() => snapshot);
1551
+ }
1552
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
1553
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
1554
+ config,
1555
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1556
+ });
1557
+ return luvio.storeBroadcast().then(() => snapshot);
1558
+ }
1559
+ function buildNetworkSnapshot$5(luvio, config, options) {
1560
+ const resourceParams = createResourceParams$5(config);
1561
+ const request = createResourceRequest$5(resourceParams);
1562
+ return luvio.dispatchResourceRequest(request, options)
1563
+ .then((response) => {
1564
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1565
+ const cache = new StoreKeyMap();
1566
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
1567
+ return cache;
1568
+ });
1569
+ }, (response) => {
1570
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
1571
+ });
1572
+ }
1573
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1574
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
1575
+ }
1576
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1577
+ const { luvio, config } = context;
1578
+ const selector = {
1579
+ recordId: keyBuilder$7(luvio, config),
1580
+ node: adapterFragment$2(luvio, config),
1581
+ variables: {},
1582
+ };
1583
+ const cacheSnapshot = storeLookup(selector, {
1584
+ config,
1585
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1586
+ });
1587
+ return cacheSnapshot;
1588
+ }
1589
+ const getVisualizationsAdapterFactory = (luvio) => function UnifiedAnalytics__getVisualizations(untrustedConfig, requestContext) {
1590
+ const config = validateAdapterConfig$5(untrustedConfig, getVisualizations_ConfigPropertyNames);
1591
+ // Invalid or incomplete config
1592
+ if (config === null) {
1593
+ return null;
1594
+ }
1595
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1596
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1597
+ };
1598
+
1599
+ function keyBuilder$6(luvio, params) {
1600
+ return keyBuilder$9(luvio, {
1601
+ name: params.urlParams.visualizationIdOrApiName
1602
+ });
1603
+ }
1604
+ function getResponseCacheKeys$4(cacheKeyMap, luvio, resourceParams) {
1605
+ const key = keyBuilder$6(luvio, resourceParams);
1606
+ cacheKeyMap.set(key, {
1607
+ namespace: keyPrefix,
1608
+ representationName: RepresentationType$4,
1609
+ mergeable: false
1610
+ });
1611
+ }
1612
+ function evictSuccess(luvio, resourceParams) {
1613
+ const key = keyBuilder$6(luvio, resourceParams);
1614
+ luvio.storeEvict(key);
1615
+ }
1616
+ function createResourceRequest$4(config) {
1617
+ const headers = {};
1618
+ return {
1619
+ baseUri: '/services/data/v62.0',
1620
+ basePath: '/unified-analytics/visualizations/' + config.urlParams.visualizationIdOrApiName + '',
1621
+ method: 'delete',
1622
+ body: null,
1623
+ urlParams: config.urlParams,
1624
+ queryParams: {},
1625
+ headers,
1626
+ priority: 'normal',
1627
+ };
1628
+ }
1629
+
1630
+ const adapterName$4 = 'deleteVisualization';
1631
+ const deleteVisualization_ConfigPropertyMetadata = [
1632
+ generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
1633
+ ];
1634
+ const deleteVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, deleteVisualization_ConfigPropertyMetadata);
1635
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$c(deleteVisualization_ConfigPropertyMetadata);
1636
+ function typeCheckConfig$4(untrustedConfig) {
1637
+ const config = {};
1638
+ typeCheckConfig$c(untrustedConfig, config, deleteVisualization_ConfigPropertyMetadata);
1639
+ return config;
1640
+ }
1641
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1642
+ if (!untrustedIsObject(untrustedConfig)) {
1643
+ return null;
1644
+ }
1645
+ if (process.env.NODE_ENV !== 'production') {
1646
+ validateConfig(untrustedConfig, configPropertyNames);
1647
+ }
1648
+ const config = typeCheckConfig$4(untrustedConfig);
1649
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1650
+ return null;
1651
+ }
1652
+ return config;
1653
+ }
1654
+ function buildNetworkSnapshot$4(luvio, config, options) {
1655
+ const resourceParams = createResourceParams$4(config);
1656
+ const request = createResourceRequest$4(resourceParams);
1657
+ return luvio.dispatchResourceRequest(request, options)
1658
+ .then(() => {
1659
+ return luvio.handleSuccessResponse(() => {
1660
+ evictSuccess(luvio, resourceParams);
1661
+ return luvio.storeBroadcast();
1662
+ }, () => {
1663
+ const cache = new StoreKeyMap();
1664
+ getResponseCacheKeys$4(cache, luvio, resourceParams);
1665
+ return cache;
1666
+ });
1667
+ }, (response) => {
1668
+ deepFreeze(response);
1669
+ throw response;
1670
+ });
1671
+ }
1672
+ const deleteVisualizationAdapterFactory = (luvio) => {
1673
+ return function UnifiedAnalyticsdeleteVisualization(untrustedConfig) {
1674
+ const config = validateAdapterConfig$4(untrustedConfig, deleteVisualization_ConfigPropertyNames);
1675
+ // Invalid or incomplete config
1676
+ if (config === null) {
1677
+ throw new Error(`Invalid config for "${adapterName$4}"`);
1678
+ }
1679
+ return buildNetworkSnapshot$4(luvio, config);
1680
+ };
1681
+ };
1682
+
1683
+ function select$6(luvio, params) {
1684
+ return select$9();
1685
+ }
1686
+ function keyBuilder$5(luvio, params) {
1687
+ return keyBuilder$9(luvio, {
1688
+ name: params.urlParams.visualizationIdOrApiName
1689
+ });
1690
+ }
1691
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1692
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
1693
+ }
1694
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
1695
+ const { body } = response;
1696
+ const key = keyBuilder$5(luvio, resourceParams);
1697
+ luvio.storeIngest(key, ingest$4, body);
1698
+ const snapshot = luvio.storeLookup({
1699
+ recordId: key,
1700
+ node: select$6(),
1701
+ variables: {},
1702
+ }, snapshotRefresh);
1703
+ if (process.env.NODE_ENV !== 'production') {
1704
+ if (snapshot.state !== 'Fulfilled') {
1705
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1706
+ }
1707
+ }
1708
+ deepFreeze(snapshot.data);
1709
+ return snapshot;
1710
+ }
1711
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
1712
+ const key = keyBuilder$5(luvio, params);
1713
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1714
+ luvio.storeIngestError(key, errorSnapshot);
1715
+ return errorSnapshot;
1716
+ }
1717
+ function createResourceRequest$3(config) {
1718
+ const headers = {};
1719
+ return {
1720
+ baseUri: '/services/data/v62.0',
1721
+ basePath: '/unified-analytics/visualizations/' + config.urlParams.visualizationIdOrApiName + '',
1722
+ method: 'get',
1723
+ body: null,
1724
+ urlParams: config.urlParams,
1725
+ queryParams: {},
1726
+ headers,
1727
+ priority: 'normal',
1728
+ };
1729
+ }
1730
+
1731
+ const adapterName$3 = 'getVisualization';
1732
+ const getVisualization_ConfigPropertyMetadata = [
1733
+ generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
1734
+ ];
1735
+ const getVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getVisualization_ConfigPropertyMetadata);
1736
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$c(getVisualization_ConfigPropertyMetadata);
1737
+ function keyBuilder$4(luvio, config) {
1738
+ const resourceParams = createResourceParams$3(config);
1739
+ return keyBuilder$5(luvio, resourceParams);
1740
+ }
1741
+ function typeCheckConfig$3(untrustedConfig) {
1742
+ const config = {};
1743
+ typeCheckConfig$c(untrustedConfig, config, getVisualization_ConfigPropertyMetadata);
1744
+ return config;
1745
+ }
1746
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
1747
+ if (!untrustedIsObject(untrustedConfig)) {
1748
+ return null;
1749
+ }
1750
+ if (process.env.NODE_ENV !== 'production') {
1751
+ validateConfig(untrustedConfig, configPropertyNames);
1752
+ }
1753
+ const config = typeCheckConfig$3(untrustedConfig);
1754
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1755
+ return null;
1756
+ }
1757
+ return config;
1758
+ }
1759
+ function adapterFragment$1(luvio, config) {
1760
+ createResourceParams$3(config);
1761
+ return select$6();
1762
+ }
1763
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1764
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
1765
+ config,
1766
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1767
+ });
1768
+ return luvio.storeBroadcast().then(() => snapshot);
1769
+ }
1770
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
1771
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
1772
+ config,
1773
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1774
+ });
1775
+ return luvio.storeBroadcast().then(() => snapshot);
1776
+ }
1777
+ function buildNetworkSnapshot$3(luvio, config, options) {
1778
+ const resourceParams = createResourceParams$3(config);
1779
+ const request = createResourceRequest$3(resourceParams);
1780
+ return luvio.dispatchResourceRequest(request, options)
1781
+ .then((response) => {
1782
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1783
+ const cache = new StoreKeyMap();
1784
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
1785
+ return cache;
1786
+ });
1787
+ }, (response) => {
1788
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1789
+ });
1790
+ }
1791
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1792
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
1793
+ }
1794
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1795
+ const { luvio, config } = context;
1796
+ const selector = {
1797
+ recordId: keyBuilder$4(luvio, config),
1798
+ node: adapterFragment$1(luvio, config),
1799
+ variables: {},
1800
+ };
1801
+ const cacheSnapshot = storeLookup(selector, {
1802
+ config,
1803
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1804
+ });
1805
+ return cacheSnapshot;
1806
+ }
1807
+ const getVisualizationAdapterFactory = (luvio) => function UnifiedAnalytics__getVisualization(untrustedConfig, requestContext) {
1808
+ const config = validateAdapterConfig$3(untrustedConfig, getVisualization_ConfigPropertyNames);
1809
+ // Invalid or incomplete config
1810
+ if (config === null) {
1811
+ return null;
1812
+ }
1813
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1814
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1815
+ };
1816
+
1817
+ const VERSION$2 = "bb71c0bf5563bfa6de1fe757209f3722";
1818
+ function validate$8(obj, path = 'WorkspaceRepresentation') {
994
1819
  const v_error = (() => {
995
1820
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
996
1821
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
997
1822
  }
998
1823
  const obj_createdBy = obj.createdBy;
999
1824
  const path_createdBy = path + '.createdBy';
1000
- const referencepath_createdByValidationError = validate$9(obj_createdBy, path_createdBy);
1825
+ const referencepath_createdByValidationError = validate$g(obj_createdBy, path_createdBy);
1001
1826
  if (referencepath_createdByValidationError !== null) {
1002
1827
  let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_createdBy + '")\n';
1003
1828
  message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1004
1829
  return new TypeError(message);
1005
1830
  }
1006
1831
  const obj_createdDate = obj.createdDate;
1007
- const path_createdDate = path + '.createdDate';
1008
- if (typeof obj_createdDate !== 'string') {
1009
- return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
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 + '")');
1832
+ const path_createdDate = path + '.createdDate';
1833
+ if (typeof obj_createdDate !== 'string') {
1834
+ return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
1015
1835
  }
1016
- if (obj.description !== undefined) {
1017
- const obj_description = obj.description;
1018
- const path_description = path + '.description';
1019
- if (typeof obj_description !== 'string') {
1020
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1021
- }
1836
+ const obj_description = obj.description;
1837
+ const path_description = path + '.description';
1838
+ if (typeof obj_description !== 'string') {
1839
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1022
1840
  }
1023
1841
  const obj_id = obj.id;
1024
1842
  const path_id = path + '.id';
@@ -1030,45 +1848,33 @@ function validate$8(obj, path = 'AnalyticsVisualizationRepresentation') {
1030
1848
  if (typeof obj_label !== 'string') {
1031
1849
  return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1032
1850
  }
1033
- if (obj.lastModifiedBy !== undefined) {
1034
- const obj_lastModifiedBy = obj.lastModifiedBy;
1035
- const path_lastModifiedBy = path + '.lastModifiedBy';
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');
1040
- return new TypeError(message);
1041
- }
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
1851
  const obj_name = obj.name;
1051
1852
  const path_name = path + '.name';
1052
1853
  if (typeof obj_name !== 'string') {
1053
1854
  return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1054
1855
  }
1856
+ const obj_url = obj.url;
1857
+ const path_url = path + '.url';
1858
+ if (typeof obj_url !== 'string') {
1859
+ return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
1860
+ }
1055
1861
  })();
1056
1862
  return v_error === undefined ? null : v_error;
1057
1863
  }
1058
- const RepresentationType$2 = 'AnalyticsVisualizationRepresentation';
1059
- function keyBuilder$6(luvio, config) {
1864
+ const RepresentationType$2 = 'WorkspaceRepresentation';
1865
+ function keyBuilder$3(luvio, config) {
1060
1866
  return keyPrefix + '::' + RepresentationType$2 + ':' + config.name;
1061
1867
  }
1062
1868
  function keyBuilderFromType$1(luvio, object) {
1063
1869
  const keyParams = {
1064
1870
  name: object.name
1065
1871
  };
1066
- return keyBuilder$6(luvio, keyParams);
1872
+ return keyBuilder$3(luvio, keyParams);
1067
1873
  }
1068
1874
  function normalize$2(input, existing, path, luvio, store, timestamp) {
1069
1875
  return input;
1070
1876
  }
1071
- const select$5 = function AnalyticsVisualizationRepresentationSelect() {
1877
+ const select$5 = function WorkspaceRepresentationSelect() {
1072
1878
  return {
1073
1879
  kind: 'Fragment',
1074
1880
  version: VERSION$2,
@@ -1082,7 +1888,7 @@ function equals$2(existing, incoming) {
1082
1888
  }
1083
1889
  return true;
1084
1890
  }
1085
- const ingest$2 = function AnalyticsVisualizationRepresentationIngest(input, path, luvio, store, timestamp) {
1891
+ const ingest$2 = function WorkspaceRepresentationIngest(input, path, luvio, store, timestamp) {
1086
1892
  if (process.env.NODE_ENV !== 'production') {
1087
1893
  const validateError = validate$8(input);
1088
1894
  if (validateError !== null) {
@@ -1104,36 +1910,36 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1104
1910
  });
1105
1911
  }
1106
1912
 
1107
- const VERSION$1 = "342da25bfe5e13c7f4ccbc8aa0980a4f";
1108
- function validate$7(obj, path = 'AnalyticsVisualizationCollectionRepresentation') {
1913
+ const VERSION$1 = "25327d65bf7ad14ee671ec5a1642b193";
1914
+ function validate$7(obj, path = 'WorkspaceCollectionRepresentation') {
1109
1915
  const v_error = (() => {
1110
1916
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1111
1917
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1112
1918
  }
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 + '")');
1919
+ const obj_workspaces = obj.workspaces;
1920
+ const path_workspaces = path + '.workspaces';
1921
+ if (!ArrayIsArray(obj_workspaces)) {
1922
+ return new TypeError('Expected "array" but received "' + typeof obj_workspaces + '" (at "' + path_workspaces + '")');
1117
1923
  }
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 + '")');
1924
+ for (let i = 0; i < obj_workspaces.length; i++) {
1925
+ const obj_workspaces_item = obj_workspaces[i];
1926
+ const path_workspaces_item = path_workspaces + '[' + i + ']';
1927
+ if (typeof obj_workspaces_item !== 'object') {
1928
+ return new TypeError('Expected "object" but received "' + typeof obj_workspaces_item + '" (at "' + path_workspaces_item + '")');
1123
1929
  }
1124
1930
  }
1125
1931
  })();
1126
1932
  return v_error === undefined ? null : v_error;
1127
1933
  }
1128
- const RepresentationType$1 = 'AnalyticsVisualizationCollectionRepresentation';
1934
+ const RepresentationType$1 = 'WorkspaceCollectionRepresentation';
1129
1935
  function normalize$1(input, existing, path, luvio, store, timestamp) {
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,
1936
+ const input_workspaces = input.workspaces;
1937
+ const input_workspaces_id = path.fullPath + '__workspaces';
1938
+ for (let i = 0; i < input_workspaces.length; i++) {
1939
+ const input_workspaces_item = input_workspaces[i];
1940
+ let input_workspaces_item_id = input_workspaces_id + '__' + i;
1941
+ input_workspaces[i] = ingest$2(input_workspaces_item, {
1942
+ fullPath: input_workspaces_item_id,
1137
1943
  propertyName: i,
1138
1944
  parent: {
1139
1945
  data: input,
@@ -1145,14 +1951,14 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
1145
1951
  }
1146
1952
  return input;
1147
1953
  }
1148
- const select$4 = function AnalyticsVisualizationCollectionRepresentationSelect() {
1954
+ const select$4 = function WorkspaceCollectionRepresentationSelect() {
1149
1955
  return {
1150
1956
  kind: 'Fragment',
1151
1957
  version: VERSION$1,
1152
1958
  private: [],
1153
1959
  selections: [
1154
1960
  {
1155
- name: 'visualizations',
1961
+ name: 'workspaces',
1156
1962
  kind: 'Link',
1157
1963
  plural: true,
1158
1964
  fragment: select$5()
@@ -1161,19 +1967,19 @@ const select$4 = function AnalyticsVisualizationCollectionRepresentationSelect()
1161
1967
  };
1162
1968
  };
1163
1969
  function equals$1(existing, incoming) {
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)) {
1970
+ const existing_workspaces = existing.workspaces;
1971
+ const incoming_workspaces = incoming.workspaces;
1972
+ const equals_workspaces_items = equalsArray(existing_workspaces, incoming_workspaces, (existing_workspaces_item, incoming_workspaces_item) => {
1973
+ if (!(existing_workspaces_item.__ref === incoming_workspaces_item.__ref)) {
1168
1974
  return false;
1169
1975
  }
1170
1976
  });
1171
- if (equals_visualizations_items === false) {
1977
+ if (equals_workspaces_items === false) {
1172
1978
  return false;
1173
1979
  }
1174
1980
  return true;
1175
1981
  }
1176
- const ingest$1 = function AnalyticsVisualizationCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
1982
+ const ingest$1 = function WorkspaceCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
1177
1983
  if (process.env.NODE_ENV !== 'production') {
1178
1984
  const validateError = validate$7(input);
1179
1985
  if (validateError !== null) {
@@ -1193,24 +1999,24 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1193
1999
  representationName: RepresentationType$1,
1194
2000
  mergeable: false
1195
2001
  });
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]);
2002
+ const input_workspaces_length = input.workspaces.length;
2003
+ for (let i = 0; i < input_workspaces_length; i++) {
2004
+ getTypeCacheKeys$2(rootKeySet, luvio, input.workspaces[i]);
1199
2005
  }
1200
2006
  }
1201
2007
 
1202
2008
  function select$3(luvio, params) {
1203
2009
  return select$4();
1204
2010
  }
1205
- function keyBuilder$5(luvio, params) {
1206
- return keyPrefix + '::AnalyticsVisualizationCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
2011
+ function keyBuilder$2(luvio, params) {
2012
+ return keyPrefix + '::WorkspaceCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
1207
2013
  }
1208
- function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1209
- getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
2014
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
2015
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$2(luvio, resourceParams));
1210
2016
  }
1211
2017
  function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1212
2018
  const { body } = response;
1213
- const key = keyBuilder$5(luvio, resourceParams);
2019
+ const key = keyBuilder$2(luvio, resourceParams);
1214
2020
  luvio.storeIngest(key, ingest$1, body);
1215
2021
  const snapshot = luvio.storeLookup({
1216
2022
  recordId: key,
@@ -1225,17 +2031,17 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1225
2031
  deepFreeze(snapshot.data);
1226
2032
  return snapshot;
1227
2033
  }
1228
- function ingestError$1(luvio, params, error, snapshotRefresh) {
1229
- const key = keyBuilder$5(luvio, params);
2034
+ function ingestError(luvio, params, error, snapshotRefresh) {
2035
+ const key = keyBuilder$2(luvio, params);
1230
2036
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1231
2037
  luvio.storeIngestError(key, errorSnapshot);
1232
2038
  return errorSnapshot;
1233
2039
  }
1234
- function createResourceRequest$3(config) {
2040
+ function createResourceRequest$2(config) {
1235
2041
  const headers = {};
1236
2042
  return {
1237
2043
  baseUri: '/services/data/v62.0',
1238
- basePath: '/unified-analytics/visualizations',
2044
+ basePath: '/unified-analytics/workspaces',
1239
2045
  method: 'get',
1240
2046
  body: null,
1241
2047
  urlParams: {},
@@ -1245,197 +2051,108 @@ function createResourceRequest$3(config) {
1245
2051
  };
1246
2052
  }
1247
2053
 
1248
- const adapterName$3 = 'getVisualizations';
1249
- const getVisualizations_ConfigPropertyMetadata = [
2054
+ const adapterName$2 = 'getWorkspaces';
2055
+ const getWorkspaces_ConfigPropertyMetadata = [
1250
2056
  generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
1251
2057
  generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
1252
2058
  ];
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) {
1256
- const resourceParams = createResourceParams$3(config);
1257
- return keyBuilder$5(luvio, resourceParams);
2059
+ const getWorkspaces_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getWorkspaces_ConfigPropertyMetadata);
2060
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$c(getWorkspaces_ConfigPropertyMetadata);
2061
+ function keyBuilder$1(luvio, config) {
2062
+ const resourceParams = createResourceParams$2(config);
2063
+ return keyBuilder$2(luvio, resourceParams);
1258
2064
  }
1259
- function typeCheckConfig$3(untrustedConfig) {
2065
+ function typeCheckConfig$2(untrustedConfig) {
1260
2066
  const config = {};
1261
- typeCheckConfig$9(untrustedConfig, config, getVisualizations_ConfigPropertyMetadata);
2067
+ typeCheckConfig$c(untrustedConfig, config, getWorkspaces_ConfigPropertyMetadata);
1262
2068
  return config;
1263
2069
  }
1264
- function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
2070
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1265
2071
  if (!untrustedIsObject(untrustedConfig)) {
1266
2072
  return null;
1267
2073
  }
1268
2074
  if (process.env.NODE_ENV !== 'production') {
1269
2075
  validateConfig(untrustedConfig, configPropertyNames);
1270
2076
  }
1271
- const config = typeCheckConfig$3(untrustedConfig);
2077
+ const config = typeCheckConfig$2(untrustedConfig);
1272
2078
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1273
2079
  return null;
1274
2080
  }
1275
2081
  return config;
1276
2082
  }
1277
- function adapterFragment$1(luvio, config) {
1278
- createResourceParams$3(config);
2083
+ function adapterFragment(luvio, config) {
2084
+ createResourceParams$2(config);
1279
2085
  return select$3();
1280
2086
  }
1281
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
2087
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1282
2088
  const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1283
2089
  config,
1284
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
2090
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1285
2091
  });
1286
2092
  return luvio.storeBroadcast().then(() => snapshot);
1287
2093
  }
1288
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
1289
- const snapshot = ingestError$1(luvio, resourceParams, response, {
2094
+ function onFetchResponseError(luvio, config, resourceParams, response) {
2095
+ const snapshot = ingestError(luvio, resourceParams, response, {
1290
2096
  config,
1291
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
2097
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1292
2098
  });
1293
2099
  return luvio.storeBroadcast().then(() => snapshot);
1294
2100
  }
1295
- function buildNetworkSnapshot$3(luvio, config, options) {
1296
- const resourceParams = createResourceParams$3(config);
1297
- const request = createResourceRequest$3(resourceParams);
2101
+ function buildNetworkSnapshot$2(luvio, config, options) {
2102
+ const resourceParams = createResourceParams$2(config);
2103
+ const request = createResourceRequest$2(resourceParams);
1298
2104
  return luvio.dispatchResourceRequest(request, options)
1299
2105
  .then((response) => {
1300
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
2106
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
1301
2107
  const cache = new StoreKeyMap();
1302
- getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
2108
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1303
2109
  return cache;
1304
2110
  });
1305
2111
  }, (response) => {
1306
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
2112
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1307
2113
  });
1308
2114
  }
1309
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1310
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
2115
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2116
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1311
2117
  }
1312
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
2118
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
1313
2119
  const { luvio, config } = context;
1314
2120
  const selector = {
1315
- recordId: keyBuilder$4(luvio, config),
1316
- node: adapterFragment$1(luvio, config),
2121
+ recordId: keyBuilder$1(luvio, config),
2122
+ node: adapterFragment(luvio, config),
1317
2123
  variables: {},
1318
2124
  };
1319
2125
  const cacheSnapshot = storeLookup(selector, {
1320
2126
  config,
1321
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
2127
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1322
2128
  });
1323
2129
  return cacheSnapshot;
1324
2130
  }
1325
- const getVisualizationsAdapterFactory = (luvio) => function UnifiedAnalytics__getVisualizations(untrustedConfig, requestContext) {
1326
- const config = validateAdapterConfig$3(untrustedConfig, getVisualizations_ConfigPropertyNames);
2131
+ const getWorkspacesAdapterFactory = (luvio) => function UnifiedAnalytics__getWorkspaces(untrustedConfig, requestContext) {
2132
+ const config = validateAdapterConfig$2(untrustedConfig, getWorkspaces_ConfigPropertyNames);
1327
2133
  // Invalid or incomplete config
1328
2134
  if (config === null) {
1329
2135
  return null;
1330
2136
  }
1331
2137
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1332
- buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1333
- };
1334
-
1335
- function keyBuilder$3(luvio, params) {
1336
- return keyBuilder$6(luvio, {
1337
- name: params.urlParams.visualizationIdOrApiName
1338
- });
1339
- }
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
1346
- });
1347
- }
1348
- function evictSuccess(luvio, resourceParams) {
1349
- const key = keyBuilder$3(luvio, resourceParams);
1350
- luvio.storeEvict(key);
1351
- }
1352
- function createResourceRequest$2(config) {
1353
- const headers = {};
1354
- return {
1355
- baseUri: '/services/data/v62.0',
1356
- basePath: '/unified-analytics/visualizations/' + config.urlParams.visualizationIdOrApiName + '',
1357
- method: 'delete',
1358
- body: null,
1359
- urlParams: config.urlParams,
1360
- queryParams: {},
1361
- headers,
1362
- priority: 'normal',
1363
- };
1364
- }
1365
-
1366
- const adapterName$2 = 'deleteVisualization';
1367
- const deleteVisualization_ConfigPropertyMetadata = [
1368
- generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
1369
- ];
1370
- const deleteVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, deleteVisualization_ConfigPropertyMetadata);
1371
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$9(deleteVisualization_ConfigPropertyMetadata);
1372
- function typeCheckConfig$2(untrustedConfig) {
1373
- const config = {};
1374
- typeCheckConfig$9(untrustedConfig, config, deleteVisualization_ConfigPropertyMetadata);
1375
- return config;
1376
- }
1377
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1378
- if (!untrustedIsObject(untrustedConfig)) {
1379
- return null;
1380
- }
1381
- if (process.env.NODE_ENV !== 'production') {
1382
- validateConfig(untrustedConfig, configPropertyNames);
1383
- }
1384
- const config = typeCheckConfig$2(untrustedConfig);
1385
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
1386
- return null;
1387
- }
1388
- return config;
1389
- }
1390
- function buildNetworkSnapshot$2(luvio, config, options) {
1391
- const resourceParams = createResourceParams$2(config);
1392
- const request = createResourceRequest$2(resourceParams);
1393
- return luvio.dispatchResourceRequest(request, options)
1394
- .then(() => {
1395
- return luvio.handleSuccessResponse(() => {
1396
- evictSuccess(luvio, resourceParams);
1397
- return luvio.storeBroadcast();
1398
- }, () => {
1399
- const cache = new StoreKeyMap();
1400
- getResponseCacheKeys$2(cache, luvio, resourceParams);
1401
- return cache;
1402
- });
1403
- }, (response) => {
1404
- deepFreeze(response);
1405
- throw response;
1406
- });
1407
- }
1408
- const deleteVisualizationAdapterFactory = (luvio) => {
1409
- return function UnifiedAnalyticsdeleteVisualization(untrustedConfig) {
1410
- const config = validateAdapterConfig$2(untrustedConfig, deleteVisualization_ConfigPropertyNames);
1411
- // Invalid or incomplete config
1412
- if (config === null) {
1413
- throw new Error(`Invalid config for "${adapterName$2}"`);
1414
- }
1415
- return buildNetworkSnapshot$2(luvio, config);
1416
- };
2138
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1417
2139
  };
1418
2140
 
1419
2141
  function select$2(luvio, params) {
1420
2142
  return select$5();
1421
2143
  }
1422
- function keyBuilder$2(luvio, params) {
1423
- return keyBuilder$6(luvio, {
1424
- name: params.urlParams.visualizationIdOrApiName
1425
- });
1426
- }
1427
2144
  function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1428
2145
  getTypeCacheKeys$2(storeKeyMap, luvio, response);
1429
2146
  }
1430
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
2147
+ function ingestSuccess$1(luvio, resourceParams, response) {
1431
2148
  const { body } = response;
1432
- const key = keyBuilder$2(luvio, resourceParams);
2149
+ const key = keyBuilderFromType$1(luvio, body);
1433
2150
  luvio.storeIngest(key, ingest$2, body);
1434
2151
  const snapshot = luvio.storeLookup({
1435
2152
  recordId: key,
1436
2153
  node: select$2(),
1437
2154
  variables: {},
1438
- }, snapshotRefresh);
2155
+ });
1439
2156
  if (process.env.NODE_ENV !== 'production') {
1440
2157
  if (snapshot.state !== 'Fulfilled') {
1441
2158
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
@@ -1444,39 +2161,32 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1444
2161
  deepFreeze(snapshot.data);
1445
2162
  return snapshot;
1446
2163
  }
1447
- function ingestError(luvio, params, error, snapshotRefresh) {
1448
- const key = keyBuilder$2(luvio, params);
1449
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1450
- luvio.storeIngestError(key, errorSnapshot);
1451
- return errorSnapshot;
1452
- }
1453
2164
  function createResourceRequest$1(config) {
1454
2165
  const headers = {};
1455
2166
  return {
1456
2167
  baseUri: '/services/data/v62.0',
1457
- basePath: '/unified-analytics/visualizations/' + config.urlParams.visualizationIdOrApiName + '',
1458
- method: 'get',
1459
- body: null,
1460
- urlParams: config.urlParams,
2168
+ basePath: '/unified-analytics/workspaces',
2169
+ method: 'post',
2170
+ body: config.body,
2171
+ urlParams: {},
1461
2172
  queryParams: {},
1462
2173
  headers,
1463
2174
  priority: 'normal',
1464
2175
  };
1465
2176
  }
1466
2177
 
1467
- const adapterName$1 = 'getVisualization';
1468
- const getVisualization_ConfigPropertyMetadata = [
1469
- generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
2178
+ const adapterName$1 = 'createWorkspace';
2179
+ const createWorkspace_ConfigPropertyMetadata = [
2180
+ generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
2181
+ generateParamConfigMetadata('id', true, 2 /* Body */, 0 /* String */),
2182
+ generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
2183
+ generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
1470
2184
  ];
1471
- const getVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getVisualization_ConfigPropertyMetadata);
1472
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$9(getVisualization_ConfigPropertyMetadata);
1473
- function keyBuilder$1(luvio, config) {
1474
- const resourceParams = createResourceParams$1(config);
1475
- return keyBuilder$2(luvio, resourceParams);
1476
- }
2185
+ const createWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, createWorkspace_ConfigPropertyMetadata);
2186
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$c(createWorkspace_ConfigPropertyMetadata);
1477
2187
  function typeCheckConfig$1(untrustedConfig) {
1478
2188
  const config = {};
1479
- typeCheckConfig$9(untrustedConfig, config, getVisualization_ConfigPropertyMetadata);
2189
+ typeCheckConfig$c(untrustedConfig, config, createWorkspace_ConfigPropertyMetadata);
1480
2190
  return config;
1481
2191
  }
1482
2192
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -1492,62 +2202,33 @@ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1492
2202
  }
1493
2203
  return config;
1494
2204
  }
1495
- function adapterFragment(luvio, config) {
1496
- createResourceParams$1(config);
1497
- return select$2();
1498
- }
1499
- function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1500
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1501
- config,
1502
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1503
- });
1504
- return luvio.storeBroadcast().then(() => snapshot);
1505
- }
1506
- function onFetchResponseError(luvio, config, resourceParams, response) {
1507
- const snapshot = ingestError(luvio, resourceParams, response, {
1508
- config,
1509
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1510
- });
1511
- return luvio.storeBroadcast().then(() => snapshot);
1512
- }
1513
2205
  function buildNetworkSnapshot$1(luvio, config, options) {
1514
2206
  const resourceParams = createResourceParams$1(config);
1515
2207
  const request = createResourceRequest$1(resourceParams);
1516
2208
  return luvio.dispatchResourceRequest(request, options)
1517
2209
  .then((response) => {
1518
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
2210
+ return luvio.handleSuccessResponse(() => {
2211
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
2212
+ return luvio.storeBroadcast().then(() => snapshot);
2213
+ }, () => {
1519
2214
  const cache = new StoreKeyMap();
1520
2215
  getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1521
2216
  return cache;
1522
2217
  });
1523
2218
  }, (response) => {
1524
- return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
2219
+ deepFreeze(response);
2220
+ throw response;
1525
2221
  });
1526
2222
  }
1527
- function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1528
- return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1529
- }
1530
- function buildCachedSnapshotCachePolicy(context, storeLookup) {
1531
- const { luvio, config } = context;
1532
- const selector = {
1533
- recordId: keyBuilder$1(luvio, config),
1534
- node: adapterFragment(luvio, config),
1535
- variables: {},
2223
+ const createWorkspaceAdapterFactory = (luvio) => {
2224
+ return function createWorkspace(untrustedConfig) {
2225
+ const config = validateAdapterConfig$1(untrustedConfig, createWorkspace_ConfigPropertyNames);
2226
+ // Invalid or incomplete config
2227
+ if (config === null) {
2228
+ throw new Error('Invalid config for "createWorkspace"');
2229
+ }
2230
+ return buildNetworkSnapshot$1(luvio, config);
1536
2231
  };
1537
- const cacheSnapshot = storeLookup(selector, {
1538
- config,
1539
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1540
- });
1541
- return cacheSnapshot;
1542
- }
1543
- const getVisualizationAdapterFactory = (luvio) => function UnifiedAnalytics__getVisualization(untrustedConfig, requestContext) {
1544
- const config = validateAdapterConfig$1(untrustedConfig, getVisualization_ConfigPropertyNames);
1545
- // Invalid or incomplete config
1546
- if (config === null) {
1547
- return null;
1548
- }
1549
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1550
- buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1551
2232
  };
1552
2233
 
1553
2234
  function validate$6(obj, path = 'LibraryAssetsPreviewInputRepresentation') {
@@ -2214,7 +2895,7 @@ const getListViewAnalyticsLibrary_ConfigPropertyMetadata = [
2214
2895
  generateParamConfigMetadata('input_collection', true, 2 /* Body */, 4 /* Unsupported */),
2215
2896
  ];
2216
2897
  const getListViewAnalyticsLibrary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getListViewAnalyticsLibrary_ConfigPropertyMetadata);
2217
- const createResourceParams = /*#__PURE__*/ createResourceParams$9(getListViewAnalyticsLibrary_ConfigPropertyMetadata);
2898
+ const createResourceParams = /*#__PURE__*/ createResourceParams$c(getListViewAnalyticsLibrary_ConfigPropertyMetadata);
2218
2899
  function typeCheckConfig(untrustedConfig) {
2219
2900
  const config = {};
2220
2901
  const untrustedConfig_input_collection = untrustedConfig.input_collection;
@@ -2266,4 +2947,4 @@ const getListViewAnalyticsLibraryAdapterFactory = (luvio) => {
2266
2947
  };
2267
2948
  };
2268
2949
 
2269
- export { createDashboardAdapterFactory, deleteDashboardAdapterFactory, deleteVisualizationAdapterFactory, getDashboardByNameAdapterFactory, getDashboardsAdapterFactory, getListViewAnalyticsLibraryAdapterFactory, getVisualizationAdapterFactory, getVisualizationsAdapterFactory, updateDashboardAdapterFactory };
2950
+ export { createDashboardAdapterFactory, createWorkspaceAdapterFactory, deleteDashboardAdapterFactory, deleteVisualizationAdapterFactory, getDashboardByNameAdapterFactory, getDashboardsAdapterFactory, getListViewAnalyticsLibraryAdapterFactory, getVisualizationAdapterFactory, getVisualizationsAdapterFactory, getWorkspacesAdapterFactory, queryAssetsAdapterFactory, updateDashboardAdapterFactory };