@salesforce/lds-adapters-analytics-unifiedanalytics 1.294.0 → 1.296.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.
- package/dist/es/es2018/analytics-unifiedanalytics.js +767 -473
- package/dist/es/es2018/types/src/generated/adapters/getUnifiedAnalyticsLibraryAssets.d.ts +21 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/resources/postUnifiedAnalyticsLibraryAssetsQuery.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/types/AnalyticsLibraryAssetCollectionOutputRepresentation.d.ts +45 -0
- package/dist/es/es2018/types/src/generated/types/AnalyticsLibraryCollectionQueryInputRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/AnalyticsLibraryDashboardTemplateRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/AnalyticsLibraryImageRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/BaseAnalyticsLibraryAssetRepresentation.d.ts +40 -0
- package/package.json +3 -3
- package/sfdc/index.js +601 -304
- package/src/raml/api.raml +96 -0
- package/src/raml/luvio.raml +9 -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, StoreKeyMap, createResourceParams as createResourceParams$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$d, typeCheckConfig as typeCheckConfig$d, 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,7 @@ function createLink(ref) {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
function validate$
|
|
96
|
+
function validate$j(obj, path = 'BaseAnalyticsRepresentation') {
|
|
97
97
|
const v_error = (() => {
|
|
98
98
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
99
99
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -128,8 +128,8 @@ function validate$h(obj, path = 'BaseAnalyticsRepresentation') {
|
|
|
128
128
|
return v_error === undefined ? null : v_error;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
function validate$
|
|
132
|
-
const validateBaseAnalyticsRepresentation_validateError = validate$
|
|
131
|
+
function validate$i(obj, path = 'AnalyticsUserRepresentation') {
|
|
132
|
+
const validateBaseAnalyticsRepresentation_validateError = validate$j(obj, path);
|
|
133
133
|
if (validateBaseAnalyticsRepresentation_validateError !== null) {
|
|
134
134
|
return validateBaseAnalyticsRepresentation_validateError;
|
|
135
135
|
}
|
|
@@ -169,8 +169,8 @@ function validate$g(obj, path = 'AnalyticsUserRepresentation') {
|
|
|
169
169
|
return v_error === undefined ? null : v_error;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
function validate$
|
|
173
|
-
const validateBaseAnalyticsRepresentation_validateError = validate$
|
|
172
|
+
function validate$h(obj, path = 'AnalyticsAssetsQueryResultsWorkspaceRepresentation') {
|
|
173
|
+
const validateBaseAnalyticsRepresentation_validateError = validate$j(obj, path);
|
|
174
174
|
if (validateBaseAnalyticsRepresentation_validateError !== null) {
|
|
175
175
|
return validateBaseAnalyticsRepresentation_validateError;
|
|
176
176
|
}
|
|
@@ -182,8 +182,8 @@ function validate$f(obj, path = 'AnalyticsAssetsQueryResultsWorkspaceRepresentat
|
|
|
182
182
|
return v_error === undefined ? null : v_error;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
function validate$
|
|
186
|
-
const validateBaseAnalyticsRepresentation_validateError = validate$
|
|
185
|
+
function validate$g(obj, path = 'AnalyticsAssetsQueryResultsItemRepresentation') {
|
|
186
|
+
const validateBaseAnalyticsRepresentation_validateError = validate$j(obj, path);
|
|
187
187
|
if (validateBaseAnalyticsRepresentation_validateError !== null) {
|
|
188
188
|
return validateBaseAnalyticsRepresentation_validateError;
|
|
189
189
|
}
|
|
@@ -198,7 +198,7 @@ function validate$e(obj, path = 'AnalyticsAssetsQueryResultsItemRepresentation')
|
|
|
198
198
|
}
|
|
199
199
|
const obj_createdBy = obj.createdBy;
|
|
200
200
|
const path_createdBy = path + '.createdBy';
|
|
201
|
-
const referencepath_createdByValidationError = validate$
|
|
201
|
+
const referencepath_createdByValidationError = validate$i(obj_createdBy, path_createdBy);
|
|
202
202
|
if (referencepath_createdByValidationError !== null) {
|
|
203
203
|
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_createdBy + '")\n';
|
|
204
204
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -211,7 +211,7 @@ function validate$e(obj, path = 'AnalyticsAssetsQueryResultsItemRepresentation')
|
|
|
211
211
|
}
|
|
212
212
|
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
213
213
|
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
214
|
-
const referencepath_lastModifiedByValidationError = validate$
|
|
214
|
+
const referencepath_lastModifiedByValidationError = validate$i(obj_lastModifiedBy, path_lastModifiedBy);
|
|
215
215
|
if (referencepath_lastModifiedByValidationError !== null) {
|
|
216
216
|
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
217
217
|
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -224,7 +224,7 @@ function validate$e(obj, path = 'AnalyticsAssetsQueryResultsItemRepresentation')
|
|
|
224
224
|
}
|
|
225
225
|
const obj_owner = obj.owner;
|
|
226
226
|
const path_owner = path + '.owner';
|
|
227
|
-
const referencepath_ownerValidationError = validate$
|
|
227
|
+
const referencepath_ownerValidationError = validate$i(obj_owner, path_owner);
|
|
228
228
|
if (referencepath_ownerValidationError !== null) {
|
|
229
229
|
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_owner + '")\n';
|
|
230
230
|
message += referencepath_ownerValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -232,7 +232,7 @@ function validate$e(obj, path = 'AnalyticsAssetsQueryResultsItemRepresentation')
|
|
|
232
232
|
}
|
|
233
233
|
const obj_workspace = obj.workspace;
|
|
234
234
|
const path_workspace = path + '.workspace';
|
|
235
|
-
const referencepath_workspaceValidationError = validate$
|
|
235
|
+
const referencepath_workspaceValidationError = validate$h(obj_workspace, path_workspace);
|
|
236
236
|
if (referencepath_workspaceValidationError !== null) {
|
|
237
237
|
let message = 'Object doesn\'t match AnalyticsAssetsQueryResultsWorkspaceRepresentation (at "' + path_workspace + '")\n';
|
|
238
238
|
message += referencepath_workspaceValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -242,9 +242,9 @@ function validate$e(obj, path = 'AnalyticsAssetsQueryResultsItemRepresentation')
|
|
|
242
242
|
return v_error === undefined ? null : v_error;
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
const TTL$
|
|
246
|
-
const VERSION$
|
|
247
|
-
function validate$
|
|
245
|
+
const TTL$2 = 500;
|
|
246
|
+
const VERSION$8 = "ed60d9cca169a3e5ed897c67d11a23db";
|
|
247
|
+
function validate$f(obj, path = 'AnalyticsAssetsQueryResultsRepresentation') {
|
|
248
248
|
const v_error = (() => {
|
|
249
249
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
250
250
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -257,7 +257,7 @@ function validate$d(obj, path = 'AnalyticsAssetsQueryResultsRepresentation') {
|
|
|
257
257
|
for (let i = 0; i < obj_items.length; i++) {
|
|
258
258
|
const obj_items_item = obj_items[i];
|
|
259
259
|
const path_items_item = path_items + '[' + i + ']';
|
|
260
|
-
const referencepath_items_itemValidationError = validate$
|
|
260
|
+
const referencepath_items_itemValidationError = validate$g(obj_items_item, path_items_item);
|
|
261
261
|
if (referencepath_items_itemValidationError !== null) {
|
|
262
262
|
let message = 'Object doesn\'t match AnalyticsAssetsQueryResultsItemRepresentation (at "' + path_items_item + '")\n';
|
|
263
263
|
message += referencepath_items_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -282,68 +282,68 @@ function validate$d(obj, path = 'AnalyticsAssetsQueryResultsRepresentation') {
|
|
|
282
282
|
})();
|
|
283
283
|
return v_error === undefined ? null : v_error;
|
|
284
284
|
}
|
|
285
|
-
const RepresentationType$
|
|
286
|
-
function keyBuilder$
|
|
287
|
-
return keyPrefix + '::' + RepresentationType$
|
|
285
|
+
const RepresentationType$8 = 'AnalyticsAssetsQueryResultsRepresentation';
|
|
286
|
+
function keyBuilder$h(luvio, config) {
|
|
287
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + config.searchId;
|
|
288
288
|
}
|
|
289
|
-
function keyBuilderFromType$
|
|
289
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
290
290
|
const keyParams = {
|
|
291
291
|
searchId: object.queryKey
|
|
292
292
|
};
|
|
293
|
-
return keyBuilder$
|
|
293
|
+
return keyBuilder$h(luvio, keyParams);
|
|
294
294
|
}
|
|
295
|
-
function normalize$
|
|
295
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
296
296
|
return input;
|
|
297
297
|
}
|
|
298
|
-
const select$
|
|
298
|
+
const select$j = function AnalyticsAssetsQueryResultsRepresentationSelect() {
|
|
299
299
|
return {
|
|
300
300
|
kind: 'Fragment',
|
|
301
|
-
version: VERSION$
|
|
301
|
+
version: VERSION$8,
|
|
302
302
|
private: [],
|
|
303
303
|
opaque: true
|
|
304
304
|
};
|
|
305
305
|
};
|
|
306
|
-
function equals$
|
|
306
|
+
function equals$8(existing, incoming) {
|
|
307
307
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
308
308
|
return false;
|
|
309
309
|
}
|
|
310
310
|
return true;
|
|
311
311
|
}
|
|
312
|
-
const ingest$
|
|
312
|
+
const ingest$8 = function AnalyticsAssetsQueryResultsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
313
313
|
if (process.env.NODE_ENV !== 'production') {
|
|
314
|
-
const validateError = validate$
|
|
314
|
+
const validateError = validate$f(input);
|
|
315
315
|
if (validateError !== null) {
|
|
316
316
|
throw validateError;
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
const key = keyBuilderFromType$
|
|
320
|
-
const ttlToUse = TTL$
|
|
321
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
319
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
320
|
+
const ttlToUse = TTL$2;
|
|
321
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "UnifiedAnalytics", VERSION$8, RepresentationType$8, equals$8);
|
|
322
322
|
return createLink(key);
|
|
323
323
|
};
|
|
324
|
-
function getTypeCacheKeys$
|
|
324
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
325
325
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
326
|
-
const rootKey = keyBuilderFromType$
|
|
326
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
327
327
|
rootKeySet.set(rootKey, {
|
|
328
328
|
namespace: keyPrefix,
|
|
329
|
-
representationName: RepresentationType$
|
|
329
|
+
representationName: RepresentationType$8,
|
|
330
330
|
mergeable: false
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
function select$
|
|
335
|
-
return select$
|
|
334
|
+
function select$i(luvio, params) {
|
|
335
|
+
return select$j();
|
|
336
336
|
}
|
|
337
|
-
function getResponseCacheKeys$
|
|
338
|
-
getTypeCacheKeys$
|
|
337
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
338
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
339
339
|
}
|
|
340
|
-
function ingestSuccess$
|
|
340
|
+
function ingestSuccess$a(luvio, resourceParams, response) {
|
|
341
341
|
const { body } = response;
|
|
342
|
-
const key = keyBuilderFromType$
|
|
343
|
-
luvio.storeIngest(key, ingest$
|
|
342
|
+
const key = keyBuilderFromType$5(luvio, body);
|
|
343
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
344
344
|
const snapshot = luvio.storeLookup({
|
|
345
345
|
recordId: key,
|
|
346
|
-
node: select$
|
|
346
|
+
node: select$i(),
|
|
347
347
|
variables: {},
|
|
348
348
|
});
|
|
349
349
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -354,7 +354,7 @@ function ingestSuccess$9(luvio, resourceParams, response) {
|
|
|
354
354
|
deepFreeze(snapshot.data);
|
|
355
355
|
return snapshot;
|
|
356
356
|
}
|
|
357
|
-
function createResourceRequest$
|
|
357
|
+
function createResourceRequest$c(config) {
|
|
358
358
|
const headers = {};
|
|
359
359
|
return {
|
|
360
360
|
baseUri: '/services/data/v62.0',
|
|
@@ -368,7 +368,7 @@ function createResourceRequest$b(config) {
|
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
const adapterName$
|
|
371
|
+
const adapterName$c = 'queryAssets';
|
|
372
372
|
const queryAssets_ConfigPropertyMetadata = [
|
|
373
373
|
generateParamConfigMetadata('filters', true, 2 /* Body */, 4 /* Unsupported */),
|
|
374
374
|
generateParamConfigMetadata('limit', true, 2 /* Body */, 3 /* Integer */),
|
|
@@ -377,11 +377,11 @@ const queryAssets_ConfigPropertyMetadata = [
|
|
|
377
377
|
generateParamConfigMetadata('searchTerm', true, 2 /* Body */, 0 /* String */),
|
|
378
378
|
generateParamConfigMetadata('sortDirection', true, 2 /* Body */, 0 /* String */),
|
|
379
379
|
];
|
|
380
|
-
const queryAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
381
|
-
const createResourceParams$
|
|
382
|
-
function typeCheckConfig$
|
|
380
|
+
const queryAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, queryAssets_ConfigPropertyMetadata);
|
|
381
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$d(queryAssets_ConfigPropertyMetadata);
|
|
382
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
383
383
|
const config = {};
|
|
384
|
-
typeCheckConfig$
|
|
384
|
+
typeCheckConfig$d(untrustedConfig, config, queryAssets_ConfigPropertyMetadata);
|
|
385
385
|
const untrustedConfig_filters = untrustedConfig.filters;
|
|
386
386
|
if (untrustedIsObject(untrustedConfig_filters)) {
|
|
387
387
|
const untrustedConfig_filters_object = {};
|
|
@@ -391,30 +391,30 @@ function typeCheckConfig$b(untrustedConfig) {
|
|
|
391
391
|
}
|
|
392
392
|
return config;
|
|
393
393
|
}
|
|
394
|
-
function validateAdapterConfig$
|
|
394
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
395
395
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
396
396
|
return null;
|
|
397
397
|
}
|
|
398
398
|
if (process.env.NODE_ENV !== 'production') {
|
|
399
399
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
400
400
|
}
|
|
401
|
-
const config = typeCheckConfig$
|
|
401
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
402
402
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
403
403
|
return null;
|
|
404
404
|
}
|
|
405
405
|
return config;
|
|
406
406
|
}
|
|
407
|
-
function buildNetworkSnapshot$
|
|
408
|
-
const resourceParams = createResourceParams$
|
|
409
|
-
const request = createResourceRequest$
|
|
407
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
408
|
+
const resourceParams = createResourceParams$c(config);
|
|
409
|
+
const request = createResourceRequest$c(resourceParams);
|
|
410
410
|
return luvio.dispatchResourceRequest(request, options)
|
|
411
411
|
.then((response) => {
|
|
412
412
|
return luvio.handleSuccessResponse(() => {
|
|
413
|
-
const snapshot = ingestSuccess$
|
|
413
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response);
|
|
414
414
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
415
415
|
}, () => {
|
|
416
416
|
const cache = new StoreKeyMap();
|
|
417
|
-
getResponseCacheKeys$
|
|
417
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
418
418
|
return cache;
|
|
419
419
|
});
|
|
420
420
|
}, (response) => {
|
|
@@ -424,17 +424,17 @@ function buildNetworkSnapshot$b(luvio, config, options) {
|
|
|
424
424
|
}
|
|
425
425
|
const queryAssetsAdapterFactory = (luvio) => {
|
|
426
426
|
return function queryAssets(untrustedConfig) {
|
|
427
|
-
const config = validateAdapterConfig$
|
|
427
|
+
const config = validateAdapterConfig$c(untrustedConfig, queryAssets_ConfigPropertyNames);
|
|
428
428
|
// Invalid or incomplete config
|
|
429
429
|
if (config === null) {
|
|
430
430
|
throw new Error('Invalid config for "queryAssets"');
|
|
431
431
|
}
|
|
432
|
-
return buildNetworkSnapshot$
|
|
432
|
+
return buildNetworkSnapshot$c(luvio, config);
|
|
433
433
|
};
|
|
434
434
|
};
|
|
435
435
|
|
|
436
|
-
const VERSION$
|
|
437
|
-
function validate$
|
|
436
|
+
const VERSION$7 = "4a961b470a805882e90c05020d119eea";
|
|
437
|
+
function validate$e(obj, path = 'DashboardRepresentation') {
|
|
438
438
|
const v_error = (() => {
|
|
439
439
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
440
440
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -519,57 +519,57 @@ function validate$c(obj, path = 'DashboardRepresentation') {
|
|
|
519
519
|
})();
|
|
520
520
|
return v_error === undefined ? null : v_error;
|
|
521
521
|
}
|
|
522
|
-
const RepresentationType$
|
|
523
|
-
function keyBuilder$
|
|
524
|
-
return keyPrefix + '::' + RepresentationType$
|
|
522
|
+
const RepresentationType$7 = 'DashboardRepresentation';
|
|
523
|
+
function keyBuilder$g(luvio, config) {
|
|
524
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + config.name;
|
|
525
525
|
}
|
|
526
|
-
function keyBuilderFromType$
|
|
526
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
527
527
|
const keyParams = {
|
|
528
528
|
name: object.name
|
|
529
529
|
};
|
|
530
|
-
return keyBuilder$
|
|
530
|
+
return keyBuilder$g(luvio, keyParams);
|
|
531
531
|
}
|
|
532
|
-
function normalize$
|
|
532
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
533
533
|
return input;
|
|
534
534
|
}
|
|
535
|
-
const select$
|
|
535
|
+
const select$h = function DashboardRepresentationSelect() {
|
|
536
536
|
return {
|
|
537
537
|
kind: 'Fragment',
|
|
538
|
-
version: VERSION$
|
|
538
|
+
version: VERSION$7,
|
|
539
539
|
private: [],
|
|
540
540
|
opaque: true
|
|
541
541
|
};
|
|
542
542
|
};
|
|
543
|
-
function equals$
|
|
543
|
+
function equals$7(existing, incoming) {
|
|
544
544
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
545
545
|
return false;
|
|
546
546
|
}
|
|
547
547
|
return true;
|
|
548
548
|
}
|
|
549
|
-
const ingest$
|
|
549
|
+
const ingest$7 = function DashboardRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
550
550
|
if (process.env.NODE_ENV !== 'production') {
|
|
551
|
-
const validateError = validate$
|
|
551
|
+
const validateError = validate$e(input);
|
|
552
552
|
if (validateError !== null) {
|
|
553
553
|
throw validateError;
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
-
const key = keyBuilderFromType$
|
|
556
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
557
557
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
558
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
558
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "UnifiedAnalytics", VERSION$7, RepresentationType$7, equals$7);
|
|
559
559
|
return createLink(key);
|
|
560
560
|
};
|
|
561
|
-
function getTypeCacheKeys$
|
|
561
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
562
562
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
563
|
-
const rootKey = keyBuilderFromType$
|
|
563
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
564
564
|
rootKeySet.set(rootKey, {
|
|
565
565
|
namespace: keyPrefix,
|
|
566
|
-
representationName: RepresentationType$
|
|
566
|
+
representationName: RepresentationType$7,
|
|
567
567
|
mergeable: false
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
570
|
|
|
571
|
-
const VERSION$
|
|
572
|
-
function validate$
|
|
571
|
+
const VERSION$6 = "962823130e6a9315240ef0e0f0c5f757";
|
|
572
|
+
function validate$d(obj, path = 'DashboardCollectionRepresentation') {
|
|
573
573
|
const v_error = (() => {
|
|
574
574
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
575
575
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -589,14 +589,14 @@ function validate$b(obj, path = 'DashboardCollectionRepresentation') {
|
|
|
589
589
|
})();
|
|
590
590
|
return v_error === undefined ? null : v_error;
|
|
591
591
|
}
|
|
592
|
-
const RepresentationType$
|
|
593
|
-
function normalize$
|
|
592
|
+
const RepresentationType$6 = 'DashboardCollectionRepresentation';
|
|
593
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
594
594
|
const input_dashboards = input.dashboards;
|
|
595
595
|
const input_dashboards_id = path.fullPath + '__dashboards';
|
|
596
596
|
for (let i = 0; i < input_dashboards.length; i++) {
|
|
597
597
|
const input_dashboards_item = input_dashboards[i];
|
|
598
598
|
let input_dashboards_item_id = input_dashboards_id + '__' + i;
|
|
599
|
-
input_dashboards[i] = ingest$
|
|
599
|
+
input_dashboards[i] = ingest$7(input_dashboards_item, {
|
|
600
600
|
fullPath: input_dashboards_item_id,
|
|
601
601
|
propertyName: i,
|
|
602
602
|
parent: {
|
|
@@ -609,22 +609,22 @@ function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
|
609
609
|
}
|
|
610
610
|
return input;
|
|
611
611
|
}
|
|
612
|
-
const select$
|
|
612
|
+
const select$g = function DashboardCollectionRepresentationSelect() {
|
|
613
613
|
return {
|
|
614
614
|
kind: 'Fragment',
|
|
615
|
-
version: VERSION$
|
|
615
|
+
version: VERSION$6,
|
|
616
616
|
private: [],
|
|
617
617
|
selections: [
|
|
618
618
|
{
|
|
619
619
|
name: 'dashboards',
|
|
620
620
|
kind: 'Link',
|
|
621
621
|
plural: true,
|
|
622
|
-
fragment: select$
|
|
622
|
+
fragment: select$h()
|
|
623
623
|
}
|
|
624
624
|
]
|
|
625
625
|
};
|
|
626
626
|
};
|
|
627
|
-
function equals$
|
|
627
|
+
function equals$6(existing, incoming) {
|
|
628
628
|
const existing_dashboards = existing.dashboards;
|
|
629
629
|
const incoming_dashboards = incoming.dashboards;
|
|
630
630
|
const equals_dashboards_items = equalsArray(existing_dashboards, incoming_dashboards, (existing_dashboards_item, incoming_dashboards_item) => {
|
|
@@ -637,48 +637,48 @@ function equals$5(existing, incoming) {
|
|
|
637
637
|
}
|
|
638
638
|
return true;
|
|
639
639
|
}
|
|
640
|
-
const ingest$
|
|
640
|
+
const ingest$6 = function DashboardCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
641
641
|
if (process.env.NODE_ENV !== 'production') {
|
|
642
|
-
const validateError = validate$
|
|
642
|
+
const validateError = validate$d(input);
|
|
643
643
|
if (validateError !== null) {
|
|
644
644
|
throw validateError;
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
647
|
const key = path.fullPath;
|
|
648
648
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
649
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
649
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "UnifiedAnalytics", VERSION$6, RepresentationType$6, equals$6);
|
|
650
650
|
return createLink(key);
|
|
651
651
|
};
|
|
652
|
-
function getTypeCacheKeys$
|
|
652
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
653
653
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
654
654
|
const rootKey = fullPathFactory();
|
|
655
655
|
rootKeySet.set(rootKey, {
|
|
656
656
|
namespace: keyPrefix,
|
|
657
|
-
representationName: RepresentationType$
|
|
657
|
+
representationName: RepresentationType$6,
|
|
658
658
|
mergeable: false
|
|
659
659
|
});
|
|
660
660
|
const input_dashboards_length = input.dashboards.length;
|
|
661
661
|
for (let i = 0; i < input_dashboards_length; i++) {
|
|
662
|
-
getTypeCacheKeys$
|
|
662
|
+
getTypeCacheKeys$7(rootKeySet, luvio, input.dashboards[i]);
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
|
|
666
|
-
function select$
|
|
667
|
-
return select$
|
|
666
|
+
function select$f(luvio, params) {
|
|
667
|
+
return select$g();
|
|
668
668
|
}
|
|
669
|
-
function keyBuilder$
|
|
669
|
+
function keyBuilder$f(luvio, params) {
|
|
670
670
|
return keyPrefix + '::DashboardCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
|
|
671
671
|
}
|
|
672
|
-
function getResponseCacheKeys$
|
|
673
|
-
getTypeCacheKeys$
|
|
672
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
673
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$f(luvio, resourceParams));
|
|
674
674
|
}
|
|
675
|
-
function ingestSuccess$
|
|
675
|
+
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
676
676
|
const { body } = response;
|
|
677
|
-
const key = keyBuilder$
|
|
678
|
-
luvio.storeIngest(key, ingest$
|
|
677
|
+
const key = keyBuilder$f(luvio, resourceParams);
|
|
678
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
679
679
|
const snapshot = luvio.storeLookup({
|
|
680
680
|
recordId: key,
|
|
681
|
-
node: select$
|
|
681
|
+
node: select$f(),
|
|
682
682
|
variables: {},
|
|
683
683
|
}, snapshotRefresh);
|
|
684
684
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -690,12 +690,12 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
690
690
|
return snapshot;
|
|
691
691
|
}
|
|
692
692
|
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
693
|
-
const key = keyBuilder$
|
|
693
|
+
const key = keyBuilder$f(luvio, params);
|
|
694
694
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
695
695
|
luvio.storeIngestError(key, errorSnapshot);
|
|
696
696
|
return errorSnapshot;
|
|
697
697
|
}
|
|
698
|
-
function createResourceRequest$
|
|
698
|
+
function createResourceRequest$b(config) {
|
|
699
699
|
const headers = {};
|
|
700
700
|
return {
|
|
701
701
|
baseUri: '/services/data/v62.0',
|
|
@@ -709,61 +709,61 @@ function createResourceRequest$a(config) {
|
|
|
709
709
|
};
|
|
710
710
|
}
|
|
711
711
|
|
|
712
|
-
const adapterName$
|
|
712
|
+
const adapterName$b = 'getDashboards';
|
|
713
713
|
const getDashboards_ConfigPropertyMetadata = [
|
|
714
714
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
715
715
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
716
716
|
];
|
|
717
|
-
const getDashboards_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
718
|
-
const createResourceParams$
|
|
719
|
-
function keyBuilder$
|
|
720
|
-
const resourceParams = createResourceParams$
|
|
721
|
-
return keyBuilder$
|
|
717
|
+
const getDashboards_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, getDashboards_ConfigPropertyMetadata);
|
|
718
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$d(getDashboards_ConfigPropertyMetadata);
|
|
719
|
+
function keyBuilder$e(luvio, config) {
|
|
720
|
+
const resourceParams = createResourceParams$b(config);
|
|
721
|
+
return keyBuilder$f(luvio, resourceParams);
|
|
722
722
|
}
|
|
723
|
-
function typeCheckConfig$
|
|
723
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
724
724
|
const config = {};
|
|
725
|
-
typeCheckConfig$
|
|
725
|
+
typeCheckConfig$d(untrustedConfig, config, getDashboards_ConfigPropertyMetadata);
|
|
726
726
|
return config;
|
|
727
727
|
}
|
|
728
|
-
function validateAdapterConfig$
|
|
728
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
729
729
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
730
730
|
return null;
|
|
731
731
|
}
|
|
732
732
|
if (process.env.NODE_ENV !== 'production') {
|
|
733
733
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
734
734
|
}
|
|
735
|
-
const config = typeCheckConfig$
|
|
735
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
736
736
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
737
737
|
return null;
|
|
738
738
|
}
|
|
739
739
|
return config;
|
|
740
740
|
}
|
|
741
741
|
function adapterFragment$4(luvio, config) {
|
|
742
|
-
createResourceParams$
|
|
743
|
-
return select$
|
|
742
|
+
createResourceParams$b(config);
|
|
743
|
+
return select$f();
|
|
744
744
|
}
|
|
745
745
|
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
746
|
-
const snapshot = ingestSuccess$
|
|
746
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
747
747
|
config,
|
|
748
|
-
resolve: () => buildNetworkSnapshot$
|
|
748
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
749
749
|
});
|
|
750
750
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
751
751
|
}
|
|
752
752
|
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
753
753
|
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
754
754
|
config,
|
|
755
|
-
resolve: () => buildNetworkSnapshot$
|
|
755
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
756
756
|
});
|
|
757
757
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
758
758
|
}
|
|
759
|
-
function buildNetworkSnapshot$
|
|
760
|
-
const resourceParams = createResourceParams$
|
|
761
|
-
const request = createResourceRequest$
|
|
759
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
760
|
+
const resourceParams = createResourceParams$b(config);
|
|
761
|
+
const request = createResourceRequest$b(resourceParams);
|
|
762
762
|
return luvio.dispatchResourceRequest(request, options)
|
|
763
763
|
.then((response) => {
|
|
764
764
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
765
765
|
const cache = new StoreKeyMap();
|
|
766
|
-
getResponseCacheKeys$
|
|
766
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
767
767
|
return cache;
|
|
768
768
|
});
|
|
769
769
|
}, (response) => {
|
|
@@ -771,23 +771,23 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
773
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
774
|
-
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
774
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$b, undefined, false);
|
|
775
775
|
}
|
|
776
776
|
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
777
777
|
const { luvio, config } = context;
|
|
778
778
|
const selector = {
|
|
779
|
-
recordId: keyBuilder$
|
|
779
|
+
recordId: keyBuilder$e(luvio, config),
|
|
780
780
|
node: adapterFragment$4(luvio, config),
|
|
781
781
|
variables: {},
|
|
782
782
|
};
|
|
783
783
|
const cacheSnapshot = storeLookup(selector, {
|
|
784
784
|
config,
|
|
785
|
-
resolve: () => buildNetworkSnapshot$
|
|
785
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
786
786
|
});
|
|
787
787
|
return cacheSnapshot;
|
|
788
788
|
}
|
|
789
789
|
const getDashboardsAdapterFactory = (luvio) => function UnifiedAnalytics__getDashboards(untrustedConfig, requestContext) {
|
|
790
|
-
const config = validateAdapterConfig$
|
|
790
|
+
const config = validateAdapterConfig$b(untrustedConfig, getDashboards_ConfigPropertyNames);
|
|
791
791
|
// Invalid or incomplete config
|
|
792
792
|
if (config === null) {
|
|
793
793
|
return null;
|
|
@@ -796,19 +796,19 @@ const getDashboardsAdapterFactory = (luvio) => function UnifiedAnalytics__getDas
|
|
|
796
796
|
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
797
797
|
};
|
|
798
798
|
|
|
799
|
-
function select$
|
|
800
|
-
return select$
|
|
799
|
+
function select$e(luvio, params) {
|
|
800
|
+
return select$h();
|
|
801
801
|
}
|
|
802
|
-
function getResponseCacheKeys$
|
|
803
|
-
getTypeCacheKeys$
|
|
802
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
803
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
804
804
|
}
|
|
805
|
-
function ingestSuccess$
|
|
805
|
+
function ingestSuccess$8(luvio, resourceParams, response) {
|
|
806
806
|
const { body } = response;
|
|
807
|
-
const key = keyBuilderFromType$
|
|
808
|
-
luvio.storeIngest(key, ingest$
|
|
807
|
+
const key = keyBuilderFromType$4(luvio, body);
|
|
808
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
809
809
|
const snapshot = luvio.storeLookup({
|
|
810
810
|
recordId: key,
|
|
811
|
-
node: select$
|
|
811
|
+
node: select$e(),
|
|
812
812
|
variables: {},
|
|
813
813
|
});
|
|
814
814
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -819,7 +819,7 @@ function ingestSuccess$7(luvio, resourceParams, response) {
|
|
|
819
819
|
deepFreeze(snapshot.data);
|
|
820
820
|
return snapshot;
|
|
821
821
|
}
|
|
822
|
-
function createResourceRequest$
|
|
822
|
+
function createResourceRequest$a(config) {
|
|
823
823
|
const headers = {};
|
|
824
824
|
return {
|
|
825
825
|
baseUri: '/services/data/v62.0',
|
|
@@ -833,7 +833,7 @@ function createResourceRequest$9(config) {
|
|
|
833
833
|
};
|
|
834
834
|
}
|
|
835
835
|
|
|
836
|
-
const adapterName$
|
|
836
|
+
const adapterName$a = 'createDashboard';
|
|
837
837
|
const createDashboard_ConfigPropertyMetadata = [
|
|
838
838
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
839
839
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
@@ -842,11 +842,11 @@ const createDashboard_ConfigPropertyMetadata = [
|
|
|
842
842
|
generateParamConfigMetadata('layouts', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
843
843
|
generateParamConfigMetadata('widgets', true, 2 /* Body */, 4 /* Unsupported */),
|
|
844
844
|
];
|
|
845
|
-
const createDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
846
|
-
const createResourceParams$
|
|
847
|
-
function typeCheckConfig$
|
|
845
|
+
const createDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, createDashboard_ConfigPropertyMetadata);
|
|
846
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$d(createDashboard_ConfigPropertyMetadata);
|
|
847
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
848
848
|
const config = {};
|
|
849
|
-
typeCheckConfig$
|
|
849
|
+
typeCheckConfig$d(untrustedConfig, config, createDashboard_ConfigPropertyMetadata);
|
|
850
850
|
const untrustedConfig_layouts = untrustedConfig.layouts;
|
|
851
851
|
if (ArrayIsArray$1(untrustedConfig_layouts)) {
|
|
852
852
|
const untrustedConfig_layouts_array = [];
|
|
@@ -873,30 +873,30 @@ function typeCheckConfig$9(untrustedConfig) {
|
|
|
873
873
|
}
|
|
874
874
|
return config;
|
|
875
875
|
}
|
|
876
|
-
function validateAdapterConfig$
|
|
876
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
877
877
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
878
878
|
return null;
|
|
879
879
|
}
|
|
880
880
|
if (process.env.NODE_ENV !== 'production') {
|
|
881
881
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
882
882
|
}
|
|
883
|
-
const config = typeCheckConfig$
|
|
883
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
884
884
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
885
885
|
return null;
|
|
886
886
|
}
|
|
887
887
|
return config;
|
|
888
888
|
}
|
|
889
|
-
function buildNetworkSnapshot$
|
|
890
|
-
const resourceParams = createResourceParams$
|
|
891
|
-
const request = createResourceRequest$
|
|
889
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
890
|
+
const resourceParams = createResourceParams$a(config);
|
|
891
|
+
const request = createResourceRequest$a(resourceParams);
|
|
892
892
|
return luvio.dispatchResourceRequest(request, options)
|
|
893
893
|
.then((response) => {
|
|
894
894
|
return luvio.handleSuccessResponse(() => {
|
|
895
|
-
const snapshot = ingestSuccess$
|
|
895
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response);
|
|
896
896
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
897
897
|
}, () => {
|
|
898
898
|
const cache = new StoreKeyMap();
|
|
899
|
-
getResponseCacheKeys$
|
|
899
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
900
900
|
return cache;
|
|
901
901
|
});
|
|
902
902
|
}, (response) => {
|
|
@@ -906,33 +906,33 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
906
906
|
}
|
|
907
907
|
const createDashboardAdapterFactory = (luvio) => {
|
|
908
908
|
return function createDashboard(untrustedConfig) {
|
|
909
|
-
const config = validateAdapterConfig$
|
|
909
|
+
const config = validateAdapterConfig$a(untrustedConfig, createDashboard_ConfigPropertyNames);
|
|
910
910
|
// Invalid or incomplete config
|
|
911
911
|
if (config === null) {
|
|
912
912
|
throw new Error('Invalid config for "createDashboard"');
|
|
913
913
|
}
|
|
914
|
-
return buildNetworkSnapshot$
|
|
914
|
+
return buildNetworkSnapshot$a(luvio, config);
|
|
915
915
|
};
|
|
916
916
|
};
|
|
917
917
|
|
|
918
|
-
function keyBuilder$
|
|
919
|
-
return keyBuilder$
|
|
918
|
+
function keyBuilder$d(luvio, params) {
|
|
919
|
+
return keyBuilder$g(luvio, {
|
|
920
920
|
name: params.urlParams.dashboardIdOrApiName
|
|
921
921
|
});
|
|
922
922
|
}
|
|
923
|
-
function getResponseCacheKeys$
|
|
924
|
-
const key = keyBuilder$
|
|
923
|
+
function getResponseCacheKeys$9(cacheKeyMap, luvio, resourceParams) {
|
|
924
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
925
925
|
cacheKeyMap.set(key, {
|
|
926
926
|
namespace: keyPrefix,
|
|
927
|
-
representationName: RepresentationType$
|
|
927
|
+
representationName: RepresentationType$7,
|
|
928
928
|
mergeable: false
|
|
929
929
|
});
|
|
930
930
|
}
|
|
931
931
|
function evictSuccess$1(luvio, resourceParams) {
|
|
932
|
-
const key = keyBuilder$
|
|
932
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
933
933
|
luvio.storeEvict(key);
|
|
934
934
|
}
|
|
935
|
-
function createResourceRequest$
|
|
935
|
+
function createResourceRequest$9(config) {
|
|
936
936
|
const headers = {};
|
|
937
937
|
return {
|
|
938
938
|
baseUri: '/services/data/v62.0',
|
|
@@ -946,33 +946,33 @@ function createResourceRequest$8(config) {
|
|
|
946
946
|
};
|
|
947
947
|
}
|
|
948
948
|
|
|
949
|
-
const adapterName$
|
|
949
|
+
const adapterName$9 = 'deleteDashboard';
|
|
950
950
|
const deleteDashboard_ConfigPropertyMetadata = [
|
|
951
951
|
generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
952
952
|
];
|
|
953
|
-
const deleteDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
954
|
-
const createResourceParams$
|
|
955
|
-
function typeCheckConfig$
|
|
953
|
+
const deleteDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, deleteDashboard_ConfigPropertyMetadata);
|
|
954
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$d(deleteDashboard_ConfigPropertyMetadata);
|
|
955
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
956
956
|
const config = {};
|
|
957
|
-
typeCheckConfig$
|
|
957
|
+
typeCheckConfig$d(untrustedConfig, config, deleteDashboard_ConfigPropertyMetadata);
|
|
958
958
|
return config;
|
|
959
959
|
}
|
|
960
|
-
function validateAdapterConfig$
|
|
960
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
961
961
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
962
962
|
return null;
|
|
963
963
|
}
|
|
964
964
|
if (process.env.NODE_ENV !== 'production') {
|
|
965
965
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
966
966
|
}
|
|
967
|
-
const config = typeCheckConfig$
|
|
967
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
968
968
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
969
969
|
return null;
|
|
970
970
|
}
|
|
971
971
|
return config;
|
|
972
972
|
}
|
|
973
|
-
function buildNetworkSnapshot$
|
|
974
|
-
const resourceParams = createResourceParams$
|
|
975
|
-
const request = createResourceRequest$
|
|
973
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
974
|
+
const resourceParams = createResourceParams$9(config);
|
|
975
|
+
const request = createResourceRequest$9(resourceParams);
|
|
976
976
|
return luvio.dispatchResourceRequest(request, options)
|
|
977
977
|
.then(() => {
|
|
978
978
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -980,7 +980,7 @@ function buildNetworkSnapshot$8(luvio, config, options) {
|
|
|
980
980
|
return luvio.storeBroadcast();
|
|
981
981
|
}, () => {
|
|
982
982
|
const cache = new StoreKeyMap();
|
|
983
|
-
getResponseCacheKeys$
|
|
983
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams);
|
|
984
984
|
return cache;
|
|
985
985
|
});
|
|
986
986
|
}, (response) => {
|
|
@@ -990,33 +990,33 @@ function buildNetworkSnapshot$8(luvio, config, options) {
|
|
|
990
990
|
}
|
|
991
991
|
const deleteDashboardAdapterFactory = (luvio) => {
|
|
992
992
|
return function UnifiedAnalyticsdeleteDashboard(untrustedConfig) {
|
|
993
|
-
const config = validateAdapterConfig$
|
|
993
|
+
const config = validateAdapterConfig$9(untrustedConfig, deleteDashboard_ConfigPropertyNames);
|
|
994
994
|
// Invalid or incomplete config
|
|
995
995
|
if (config === null) {
|
|
996
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
996
|
+
throw new Error(`Invalid config for "${adapterName$9}"`);
|
|
997
997
|
}
|
|
998
|
-
return buildNetworkSnapshot$
|
|
998
|
+
return buildNetworkSnapshot$9(luvio, config);
|
|
999
999
|
};
|
|
1000
1000
|
};
|
|
1001
1001
|
|
|
1002
|
-
function select$
|
|
1003
|
-
return select$
|
|
1002
|
+
function select$d(luvio, params) {
|
|
1003
|
+
return select$h();
|
|
1004
1004
|
}
|
|
1005
|
-
function keyBuilder$
|
|
1006
|
-
return keyBuilder$
|
|
1005
|
+
function keyBuilder$c(luvio, params) {
|
|
1006
|
+
return keyBuilder$g(luvio, {
|
|
1007
1007
|
name: params.urlParams.dashboardIdOrApiName
|
|
1008
1008
|
});
|
|
1009
1009
|
}
|
|
1010
|
-
function getResponseCacheKeys$
|
|
1011
|
-
getTypeCacheKeys$
|
|
1010
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
1011
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
1012
1012
|
}
|
|
1013
|
-
function ingestSuccess$
|
|
1013
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
1014
1014
|
const { body } = response;
|
|
1015
|
-
const key = keyBuilder$
|
|
1016
|
-
luvio.storeIngest(key, ingest$
|
|
1015
|
+
const key = keyBuilder$c(luvio, resourceParams);
|
|
1016
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
1017
1017
|
const snapshot = luvio.storeLookup({
|
|
1018
1018
|
recordId: key,
|
|
1019
|
-
node: select$
|
|
1019
|
+
node: select$d(),
|
|
1020
1020
|
variables: {},
|
|
1021
1021
|
}, snapshotRefresh);
|
|
1022
1022
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1028,12 +1028,12 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1028
1028
|
return snapshot;
|
|
1029
1029
|
}
|
|
1030
1030
|
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
1031
|
-
const key = keyBuilder$
|
|
1031
|
+
const key = keyBuilder$c(luvio, params);
|
|
1032
1032
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1033
1033
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1034
1034
|
return errorSnapshot;
|
|
1035
1035
|
}
|
|
1036
|
-
function createResourceRequest$
|
|
1036
|
+
function createResourceRequest$8(config) {
|
|
1037
1037
|
const headers = {};
|
|
1038
1038
|
return {
|
|
1039
1039
|
baseUri: '/services/data/v62.0',
|
|
@@ -1047,60 +1047,60 @@ function createResourceRequest$7(config) {
|
|
|
1047
1047
|
};
|
|
1048
1048
|
}
|
|
1049
1049
|
|
|
1050
|
-
const adapterName$
|
|
1050
|
+
const adapterName$8 = 'getDashboardByName';
|
|
1051
1051
|
const getDashboardByName_ConfigPropertyMetadata = [
|
|
1052
1052
|
generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1053
1053
|
];
|
|
1054
|
-
const getDashboardByName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1055
|
-
const createResourceParams$
|
|
1056
|
-
function keyBuilder$
|
|
1057
|
-
const resourceParams = createResourceParams$
|
|
1058
|
-
return keyBuilder$
|
|
1054
|
+
const getDashboardByName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getDashboardByName_ConfigPropertyMetadata);
|
|
1055
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$d(getDashboardByName_ConfigPropertyMetadata);
|
|
1056
|
+
function keyBuilder$b(luvio, config) {
|
|
1057
|
+
const resourceParams = createResourceParams$8(config);
|
|
1058
|
+
return keyBuilder$c(luvio, resourceParams);
|
|
1059
1059
|
}
|
|
1060
|
-
function typeCheckConfig$
|
|
1060
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
1061
1061
|
const config = {};
|
|
1062
|
-
typeCheckConfig$
|
|
1062
|
+
typeCheckConfig$d(untrustedConfig, config, getDashboardByName_ConfigPropertyMetadata);
|
|
1063
1063
|
return config;
|
|
1064
1064
|
}
|
|
1065
|
-
function validateAdapterConfig$
|
|
1065
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
1066
1066
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1067
1067
|
return null;
|
|
1068
1068
|
}
|
|
1069
1069
|
if (process.env.NODE_ENV !== 'production') {
|
|
1070
1070
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1071
1071
|
}
|
|
1072
|
-
const config = typeCheckConfig$
|
|
1072
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
1073
1073
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1074
1074
|
return null;
|
|
1075
1075
|
}
|
|
1076
1076
|
return config;
|
|
1077
1077
|
}
|
|
1078
1078
|
function adapterFragment$3(luvio, config) {
|
|
1079
|
-
createResourceParams$
|
|
1080
|
-
return select$
|
|
1079
|
+
createResourceParams$8(config);
|
|
1080
|
+
return select$d();
|
|
1081
1081
|
}
|
|
1082
1082
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
1083
|
-
const snapshot = ingestSuccess$
|
|
1083
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
1084
1084
|
config,
|
|
1085
|
-
resolve: () => buildNetworkSnapshot$
|
|
1085
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1086
1086
|
});
|
|
1087
1087
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1088
1088
|
}
|
|
1089
1089
|
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
1090
1090
|
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
1091
1091
|
config,
|
|
1092
|
-
resolve: () => buildNetworkSnapshot$
|
|
1092
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1093
1093
|
});
|
|
1094
1094
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1095
1095
|
}
|
|
1096
|
-
function buildNetworkSnapshot$
|
|
1097
|
-
const resourceParams = createResourceParams$
|
|
1098
|
-
const request = createResourceRequest$
|
|
1096
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
1097
|
+
const resourceParams = createResourceParams$8(config);
|
|
1098
|
+
const request = createResourceRequest$8(resourceParams);
|
|
1099
1099
|
return luvio.dispatchResourceRequest(request, options)
|
|
1100
1100
|
.then((response) => {
|
|
1101
1101
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
1102
1102
|
const cache = new StoreKeyMap();
|
|
1103
|
-
getResponseCacheKeys$
|
|
1103
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
1104
1104
|
return cache;
|
|
1105
1105
|
});
|
|
1106
1106
|
}, (response) => {
|
|
@@ -1108,23 +1108,23 @@ function buildNetworkSnapshot$7(luvio, config, options) {
|
|
|
1108
1108
|
});
|
|
1109
1109
|
}
|
|
1110
1110
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
1111
|
-
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1111
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
|
|
1112
1112
|
}
|
|
1113
1113
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
1114
1114
|
const { luvio, config } = context;
|
|
1115
1115
|
const selector = {
|
|
1116
|
-
recordId: keyBuilder$
|
|
1116
|
+
recordId: keyBuilder$b(luvio, config),
|
|
1117
1117
|
node: adapterFragment$3(luvio, config),
|
|
1118
1118
|
variables: {},
|
|
1119
1119
|
};
|
|
1120
1120
|
const cacheSnapshot = storeLookup(selector, {
|
|
1121
1121
|
config,
|
|
1122
|
-
resolve: () => buildNetworkSnapshot$
|
|
1122
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1123
1123
|
});
|
|
1124
1124
|
return cacheSnapshot;
|
|
1125
1125
|
}
|
|
1126
1126
|
const getDashboardByNameAdapterFactory = (luvio) => function UnifiedAnalytics__getDashboardByName(untrustedConfig, requestContext) {
|
|
1127
|
-
const config = validateAdapterConfig$
|
|
1127
|
+
const config = validateAdapterConfig$8(untrustedConfig, getDashboardByName_ConfigPropertyNames);
|
|
1128
1128
|
// Invalid or incomplete config
|
|
1129
1129
|
if (config === null) {
|
|
1130
1130
|
return null;
|
|
@@ -1133,19 +1133,19 @@ const getDashboardByNameAdapterFactory = (luvio) => function UnifiedAnalytics__g
|
|
|
1133
1133
|
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
1134
1134
|
};
|
|
1135
1135
|
|
|
1136
|
-
function select$
|
|
1137
|
-
return select$
|
|
1136
|
+
function select$c(luvio, params) {
|
|
1137
|
+
return select$h();
|
|
1138
1138
|
}
|
|
1139
|
-
function getResponseCacheKeys$
|
|
1140
|
-
getTypeCacheKeys$
|
|
1139
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
1140
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
1141
1141
|
}
|
|
1142
|
-
function ingestSuccess$
|
|
1142
|
+
function ingestSuccess$6(luvio, resourceParams, response) {
|
|
1143
1143
|
const { body } = response;
|
|
1144
|
-
const key = keyBuilderFromType$
|
|
1145
|
-
luvio.storeIngest(key, ingest$
|
|
1144
|
+
const key = keyBuilderFromType$4(luvio, body);
|
|
1145
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
1146
1146
|
const snapshot = luvio.storeLookup({
|
|
1147
1147
|
recordId: key,
|
|
1148
|
-
node: select$
|
|
1148
|
+
node: select$c(),
|
|
1149
1149
|
variables: {},
|
|
1150
1150
|
});
|
|
1151
1151
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1156,7 +1156,7 @@ function ingestSuccess$5(luvio, resourceParams, response) {
|
|
|
1156
1156
|
deepFreeze(snapshot.data);
|
|
1157
1157
|
return snapshot;
|
|
1158
1158
|
}
|
|
1159
|
-
function createResourceRequest$
|
|
1159
|
+
function createResourceRequest$7(config) {
|
|
1160
1160
|
const headers = {};
|
|
1161
1161
|
return {
|
|
1162
1162
|
baseUri: '/services/data/v62.0',
|
|
@@ -1170,7 +1170,7 @@ function createResourceRequest$6(config) {
|
|
|
1170
1170
|
};
|
|
1171
1171
|
}
|
|
1172
1172
|
|
|
1173
|
-
const adapterName$
|
|
1173
|
+
const adapterName$7 = 'updateDashboard';
|
|
1174
1174
|
const updateDashboard_ConfigPropertyMetadata = [
|
|
1175
1175
|
generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1176
1176
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
@@ -1180,11 +1180,11 @@ const updateDashboard_ConfigPropertyMetadata = [
|
|
|
1180
1180
|
generateParamConfigMetadata('layouts', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1181
1181
|
generateParamConfigMetadata('widgets', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1182
1182
|
];
|
|
1183
|
-
const updateDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1184
|
-
const createResourceParams$
|
|
1185
|
-
function typeCheckConfig$
|
|
1183
|
+
const updateDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, updateDashboard_ConfigPropertyMetadata);
|
|
1184
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$d(updateDashboard_ConfigPropertyMetadata);
|
|
1185
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
1186
1186
|
const config = {};
|
|
1187
|
-
typeCheckConfig$
|
|
1187
|
+
typeCheckConfig$d(untrustedConfig, config, updateDashboard_ConfigPropertyMetadata);
|
|
1188
1188
|
const untrustedConfig_layouts = untrustedConfig.layouts;
|
|
1189
1189
|
if (ArrayIsArray$1(untrustedConfig_layouts)) {
|
|
1190
1190
|
const untrustedConfig_layouts_array = [];
|
|
@@ -1211,30 +1211,30 @@ function typeCheckConfig$6(untrustedConfig) {
|
|
|
1211
1211
|
}
|
|
1212
1212
|
return config;
|
|
1213
1213
|
}
|
|
1214
|
-
function validateAdapterConfig$
|
|
1214
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
1215
1215
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1216
1216
|
return null;
|
|
1217
1217
|
}
|
|
1218
1218
|
if (process.env.NODE_ENV !== 'production') {
|
|
1219
1219
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1220
1220
|
}
|
|
1221
|
-
const config = typeCheckConfig$
|
|
1221
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
1222
1222
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1223
1223
|
return null;
|
|
1224
1224
|
}
|
|
1225
1225
|
return config;
|
|
1226
1226
|
}
|
|
1227
|
-
function buildNetworkSnapshot$
|
|
1228
|
-
const resourceParams = createResourceParams$
|
|
1229
|
-
const request = createResourceRequest$
|
|
1227
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
1228
|
+
const resourceParams = createResourceParams$7(config);
|
|
1229
|
+
const request = createResourceRequest$7(resourceParams);
|
|
1230
1230
|
return luvio.dispatchResourceRequest(request, options)
|
|
1231
1231
|
.then((response) => {
|
|
1232
1232
|
return luvio.handleSuccessResponse(() => {
|
|
1233
|
-
const snapshot = ingestSuccess$
|
|
1233
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response);
|
|
1234
1234
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1235
1235
|
}, () => {
|
|
1236
1236
|
const cache = new StoreKeyMap();
|
|
1237
|
-
getResponseCacheKeys$
|
|
1237
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
1238
1238
|
return cache;
|
|
1239
1239
|
});
|
|
1240
1240
|
}, (response) => {
|
|
@@ -1244,24 +1244,24 @@ function buildNetworkSnapshot$6(luvio, config, options) {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
const updateDashboardAdapterFactory = (luvio) => {
|
|
1246
1246
|
return function updateDashboard(untrustedConfig) {
|
|
1247
|
-
const config = validateAdapterConfig$
|
|
1247
|
+
const config = validateAdapterConfig$7(untrustedConfig, updateDashboard_ConfigPropertyNames);
|
|
1248
1248
|
// Invalid or incomplete config
|
|
1249
1249
|
if (config === null) {
|
|
1250
1250
|
throw new Error('Invalid config for "updateDashboard"');
|
|
1251
1251
|
}
|
|
1252
|
-
return buildNetworkSnapshot$
|
|
1252
|
+
return buildNetworkSnapshot$7(luvio, config);
|
|
1253
1253
|
};
|
|
1254
1254
|
};
|
|
1255
1255
|
|
|
1256
|
-
const VERSION$
|
|
1257
|
-
function validate$
|
|
1256
|
+
const VERSION$5 = "13e8e39beeffee6e3f13ac9a24b8e8be";
|
|
1257
|
+
function validate$c(obj, path = 'AnalyticsVisualizationRepresentation') {
|
|
1258
1258
|
const v_error = (() => {
|
|
1259
1259
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1260
1260
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1261
1261
|
}
|
|
1262
1262
|
const obj_createdBy = obj.createdBy;
|
|
1263
1263
|
const path_createdBy = path + '.createdBy';
|
|
1264
|
-
const referencepath_createdByValidationError = validate$
|
|
1264
|
+
const referencepath_createdByValidationError = validate$i(obj_createdBy, path_createdBy);
|
|
1265
1265
|
if (referencepath_createdByValidationError !== null) {
|
|
1266
1266
|
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_createdBy + '")\n';
|
|
1267
1267
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1297,7 +1297,7 @@ function validate$a(obj, path = 'AnalyticsVisualizationRepresentation') {
|
|
|
1297
1297
|
if (obj.lastModifiedBy !== undefined) {
|
|
1298
1298
|
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1299
1299
|
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1300
|
-
const referencepath_lastModifiedByValidationError = validate$
|
|
1300
|
+
const referencepath_lastModifiedByValidationError = validate$i(obj_lastModifiedBy, path_lastModifiedBy);
|
|
1301
1301
|
if (referencepath_lastModifiedByValidationError !== null) {
|
|
1302
1302
|
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
1303
1303
|
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1319,57 +1319,57 @@ function validate$a(obj, path = 'AnalyticsVisualizationRepresentation') {
|
|
|
1319
1319
|
})();
|
|
1320
1320
|
return v_error === undefined ? null : v_error;
|
|
1321
1321
|
}
|
|
1322
|
-
const RepresentationType$
|
|
1323
|
-
function keyBuilder$
|
|
1324
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1322
|
+
const RepresentationType$5 = 'AnalyticsVisualizationRepresentation';
|
|
1323
|
+
function keyBuilder$a(luvio, config) {
|
|
1324
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + config.name;
|
|
1325
1325
|
}
|
|
1326
|
-
function keyBuilderFromType$
|
|
1326
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
1327
1327
|
const keyParams = {
|
|
1328
1328
|
name: object.name
|
|
1329
1329
|
};
|
|
1330
|
-
return keyBuilder$
|
|
1330
|
+
return keyBuilder$a(luvio, keyParams);
|
|
1331
1331
|
}
|
|
1332
|
-
function normalize$
|
|
1332
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
1333
1333
|
return input;
|
|
1334
1334
|
}
|
|
1335
|
-
const select$
|
|
1335
|
+
const select$b = function AnalyticsVisualizationRepresentationSelect() {
|
|
1336
1336
|
return {
|
|
1337
1337
|
kind: 'Fragment',
|
|
1338
|
-
version: VERSION$
|
|
1338
|
+
version: VERSION$5,
|
|
1339
1339
|
private: [],
|
|
1340
1340
|
opaque: true
|
|
1341
1341
|
};
|
|
1342
1342
|
};
|
|
1343
|
-
function equals$
|
|
1343
|
+
function equals$5(existing, incoming) {
|
|
1344
1344
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1345
1345
|
return false;
|
|
1346
1346
|
}
|
|
1347
1347
|
return true;
|
|
1348
1348
|
}
|
|
1349
|
-
const ingest$
|
|
1349
|
+
const ingest$5 = function AnalyticsVisualizationRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1350
1350
|
if (process.env.NODE_ENV !== 'production') {
|
|
1351
|
-
const validateError = validate$
|
|
1351
|
+
const validateError = validate$c(input);
|
|
1352
1352
|
if (validateError !== null) {
|
|
1353
1353
|
throw validateError;
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
|
-
const key = keyBuilderFromType$
|
|
1356
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
1357
1357
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1358
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1358
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "UnifiedAnalytics", VERSION$5, RepresentationType$5, equals$5);
|
|
1359
1359
|
return createLink(key);
|
|
1360
1360
|
};
|
|
1361
|
-
function getTypeCacheKeys$
|
|
1361
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
1362
1362
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1363
|
-
const rootKey = keyBuilderFromType$
|
|
1363
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
1364
1364
|
rootKeySet.set(rootKey, {
|
|
1365
1365
|
namespace: keyPrefix,
|
|
1366
|
-
representationName: RepresentationType$
|
|
1366
|
+
representationName: RepresentationType$5,
|
|
1367
1367
|
mergeable: false
|
|
1368
1368
|
});
|
|
1369
1369
|
}
|
|
1370
1370
|
|
|
1371
|
-
const VERSION$
|
|
1372
|
-
function validate$
|
|
1371
|
+
const VERSION$4 = "342da25bfe5e13c7f4ccbc8aa0980a4f";
|
|
1372
|
+
function validate$b(obj, path = 'AnalyticsVisualizationCollectionRepresentation') {
|
|
1373
1373
|
const v_error = (() => {
|
|
1374
1374
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1375
1375
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1389,14 +1389,14 @@ function validate$9(obj, path = 'AnalyticsVisualizationCollectionRepresentation'
|
|
|
1389
1389
|
})();
|
|
1390
1390
|
return v_error === undefined ? null : v_error;
|
|
1391
1391
|
}
|
|
1392
|
-
const RepresentationType$
|
|
1393
|
-
function normalize$
|
|
1392
|
+
const RepresentationType$4 = 'AnalyticsVisualizationCollectionRepresentation';
|
|
1393
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
1394
1394
|
const input_visualizations = input.visualizations;
|
|
1395
1395
|
const input_visualizations_id = path.fullPath + '__visualizations';
|
|
1396
1396
|
for (let i = 0; i < input_visualizations.length; i++) {
|
|
1397
1397
|
const input_visualizations_item = input_visualizations[i];
|
|
1398
1398
|
let input_visualizations_item_id = input_visualizations_id + '__' + i;
|
|
1399
|
-
input_visualizations[i] = ingest$
|
|
1399
|
+
input_visualizations[i] = ingest$5(input_visualizations_item, {
|
|
1400
1400
|
fullPath: input_visualizations_item_id,
|
|
1401
1401
|
propertyName: i,
|
|
1402
1402
|
parent: {
|
|
@@ -1409,22 +1409,22 @@ function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
|
1409
1409
|
}
|
|
1410
1410
|
return input;
|
|
1411
1411
|
}
|
|
1412
|
-
const select$
|
|
1412
|
+
const select$a = function AnalyticsVisualizationCollectionRepresentationSelect() {
|
|
1413
1413
|
return {
|
|
1414
1414
|
kind: 'Fragment',
|
|
1415
|
-
version: VERSION$
|
|
1415
|
+
version: VERSION$4,
|
|
1416
1416
|
private: [],
|
|
1417
1417
|
selections: [
|
|
1418
1418
|
{
|
|
1419
1419
|
name: 'visualizations',
|
|
1420
1420
|
kind: 'Link',
|
|
1421
1421
|
plural: true,
|
|
1422
|
-
fragment: select$
|
|
1422
|
+
fragment: select$b()
|
|
1423
1423
|
}
|
|
1424
1424
|
]
|
|
1425
1425
|
};
|
|
1426
1426
|
};
|
|
1427
|
-
function equals$
|
|
1427
|
+
function equals$4(existing, incoming) {
|
|
1428
1428
|
const existing_visualizations = existing.visualizations;
|
|
1429
1429
|
const incoming_visualizations = incoming.visualizations;
|
|
1430
1430
|
const equals_visualizations_items = equalsArray(existing_visualizations, incoming_visualizations, (existing_visualizations_item, incoming_visualizations_item) => {
|
|
@@ -1437,48 +1437,48 @@ function equals$3(existing, incoming) {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
return true;
|
|
1439
1439
|
}
|
|
1440
|
-
const ingest$
|
|
1440
|
+
const ingest$4 = function AnalyticsVisualizationCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1441
1441
|
if (process.env.NODE_ENV !== 'production') {
|
|
1442
|
-
const validateError = validate$
|
|
1442
|
+
const validateError = validate$b(input);
|
|
1443
1443
|
if (validateError !== null) {
|
|
1444
1444
|
throw validateError;
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
1447
|
const key = path.fullPath;
|
|
1448
1448
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1449
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1449
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "UnifiedAnalytics", VERSION$4, RepresentationType$4, equals$4);
|
|
1450
1450
|
return createLink(key);
|
|
1451
1451
|
};
|
|
1452
|
-
function getTypeCacheKeys$
|
|
1452
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
1453
1453
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1454
1454
|
const rootKey = fullPathFactory();
|
|
1455
1455
|
rootKeySet.set(rootKey, {
|
|
1456
1456
|
namespace: keyPrefix,
|
|
1457
|
-
representationName: RepresentationType$
|
|
1457
|
+
representationName: RepresentationType$4,
|
|
1458
1458
|
mergeable: false
|
|
1459
1459
|
});
|
|
1460
1460
|
const input_visualizations_length = input.visualizations.length;
|
|
1461
1461
|
for (let i = 0; i < input_visualizations_length; i++) {
|
|
1462
|
-
getTypeCacheKeys$
|
|
1462
|
+
getTypeCacheKeys$5(rootKeySet, luvio, input.visualizations[i]);
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
1465
1465
|
|
|
1466
|
-
function select$
|
|
1467
|
-
return select$
|
|
1466
|
+
function select$9(luvio, params) {
|
|
1467
|
+
return select$a();
|
|
1468
1468
|
}
|
|
1469
|
-
function keyBuilder$
|
|
1469
|
+
function keyBuilder$9(luvio, params) {
|
|
1470
1470
|
return keyPrefix + '::AnalyticsVisualizationCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
|
|
1471
1471
|
}
|
|
1472
|
-
function getResponseCacheKeys$
|
|
1473
|
-
getTypeCacheKeys$
|
|
1472
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
1473
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
1474
1474
|
}
|
|
1475
|
-
function ingestSuccess$
|
|
1475
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
1476
1476
|
const { body } = response;
|
|
1477
|
-
const key = keyBuilder$
|
|
1478
|
-
luvio.storeIngest(key, ingest$
|
|
1477
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
1478
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
1479
1479
|
const snapshot = luvio.storeLookup({
|
|
1480
1480
|
recordId: key,
|
|
1481
|
-
node: select$
|
|
1481
|
+
node: select$9(),
|
|
1482
1482
|
variables: {},
|
|
1483
1483
|
}, snapshotRefresh);
|
|
1484
1484
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1490,12 +1490,12 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1490
1490
|
return snapshot;
|
|
1491
1491
|
}
|
|
1492
1492
|
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
1493
|
-
const key = keyBuilder$
|
|
1493
|
+
const key = keyBuilder$9(luvio, params);
|
|
1494
1494
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1495
1495
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1496
1496
|
return errorSnapshot;
|
|
1497
1497
|
}
|
|
1498
|
-
function createResourceRequest$
|
|
1498
|
+
function createResourceRequest$6(config) {
|
|
1499
1499
|
const headers = {};
|
|
1500
1500
|
return {
|
|
1501
1501
|
baseUri: '/services/data/v62.0',
|
|
@@ -1509,61 +1509,61 @@ function createResourceRequest$5(config) {
|
|
|
1509
1509
|
};
|
|
1510
1510
|
}
|
|
1511
1511
|
|
|
1512
|
-
const adapterName$
|
|
1512
|
+
const adapterName$6 = 'getVisualizations';
|
|
1513
1513
|
const getVisualizations_ConfigPropertyMetadata = [
|
|
1514
1514
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1515
1515
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1516
1516
|
];
|
|
1517
|
-
const getVisualizations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1518
|
-
const createResourceParams$
|
|
1519
|
-
function keyBuilder$
|
|
1520
|
-
const resourceParams = createResourceParams$
|
|
1521
|
-
return keyBuilder$
|
|
1517
|
+
const getVisualizations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getVisualizations_ConfigPropertyMetadata);
|
|
1518
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$d(getVisualizations_ConfigPropertyMetadata);
|
|
1519
|
+
function keyBuilder$8(luvio, config) {
|
|
1520
|
+
const resourceParams = createResourceParams$6(config);
|
|
1521
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
1522
1522
|
}
|
|
1523
|
-
function typeCheckConfig$
|
|
1523
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
1524
1524
|
const config = {};
|
|
1525
|
-
typeCheckConfig$
|
|
1525
|
+
typeCheckConfig$d(untrustedConfig, config, getVisualizations_ConfigPropertyMetadata);
|
|
1526
1526
|
return config;
|
|
1527
1527
|
}
|
|
1528
|
-
function validateAdapterConfig$
|
|
1528
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
1529
1529
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1530
1530
|
return null;
|
|
1531
1531
|
}
|
|
1532
1532
|
if (process.env.NODE_ENV !== 'production') {
|
|
1533
1533
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1534
1534
|
}
|
|
1535
|
-
const config = typeCheckConfig$
|
|
1535
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
1536
1536
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1537
1537
|
return null;
|
|
1538
1538
|
}
|
|
1539
1539
|
return config;
|
|
1540
1540
|
}
|
|
1541
1541
|
function adapterFragment$2(luvio, config) {
|
|
1542
|
-
createResourceParams$
|
|
1543
|
-
return select$
|
|
1542
|
+
createResourceParams$6(config);
|
|
1543
|
+
return select$9();
|
|
1544
1544
|
}
|
|
1545
1545
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
1546
|
-
const snapshot = ingestSuccess$
|
|
1546
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
1547
1547
|
config,
|
|
1548
|
-
resolve: () => buildNetworkSnapshot$
|
|
1548
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1549
1549
|
});
|
|
1550
1550
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1551
1551
|
}
|
|
1552
1552
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
1553
1553
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
1554
1554
|
config,
|
|
1555
|
-
resolve: () => buildNetworkSnapshot$
|
|
1555
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1556
1556
|
});
|
|
1557
1557
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1558
1558
|
}
|
|
1559
|
-
function buildNetworkSnapshot$
|
|
1560
|
-
const resourceParams = createResourceParams$
|
|
1561
|
-
const request = createResourceRequest$
|
|
1559
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
1560
|
+
const resourceParams = createResourceParams$6(config);
|
|
1561
|
+
const request = createResourceRequest$6(resourceParams);
|
|
1562
1562
|
return luvio.dispatchResourceRequest(request, options)
|
|
1563
1563
|
.then((response) => {
|
|
1564
1564
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
1565
1565
|
const cache = new StoreKeyMap();
|
|
1566
|
-
getResponseCacheKeys$
|
|
1566
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
1567
1567
|
return cache;
|
|
1568
1568
|
});
|
|
1569
1569
|
}, (response) => {
|
|
@@ -1571,23 +1571,23 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
1571
1571
|
});
|
|
1572
1572
|
}
|
|
1573
1573
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1574
|
-
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1574
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
1575
1575
|
}
|
|
1576
1576
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1577
1577
|
const { luvio, config } = context;
|
|
1578
1578
|
const selector = {
|
|
1579
|
-
recordId: keyBuilder$
|
|
1579
|
+
recordId: keyBuilder$8(luvio, config),
|
|
1580
1580
|
node: adapterFragment$2(luvio, config),
|
|
1581
1581
|
variables: {},
|
|
1582
1582
|
};
|
|
1583
1583
|
const cacheSnapshot = storeLookup(selector, {
|
|
1584
1584
|
config,
|
|
1585
|
-
resolve: () => buildNetworkSnapshot$
|
|
1585
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1586
1586
|
});
|
|
1587
1587
|
return cacheSnapshot;
|
|
1588
1588
|
}
|
|
1589
1589
|
const getVisualizationsAdapterFactory = (luvio) => function UnifiedAnalytics__getVisualizations(untrustedConfig, requestContext) {
|
|
1590
|
-
const config = validateAdapterConfig$
|
|
1590
|
+
const config = validateAdapterConfig$6(untrustedConfig, getVisualizations_ConfigPropertyNames);
|
|
1591
1591
|
// Invalid or incomplete config
|
|
1592
1592
|
if (config === null) {
|
|
1593
1593
|
return null;
|
|
@@ -1596,24 +1596,24 @@ const getVisualizationsAdapterFactory = (luvio) => function UnifiedAnalytics__ge
|
|
|
1596
1596
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
1597
1597
|
};
|
|
1598
1598
|
|
|
1599
|
-
function keyBuilder$
|
|
1600
|
-
return keyBuilder$
|
|
1599
|
+
function keyBuilder$7(luvio, params) {
|
|
1600
|
+
return keyBuilder$a(luvio, {
|
|
1601
1601
|
name: params.urlParams.visualizationIdOrApiName
|
|
1602
1602
|
});
|
|
1603
1603
|
}
|
|
1604
|
-
function getResponseCacheKeys$
|
|
1605
|
-
const key = keyBuilder$
|
|
1604
|
+
function getResponseCacheKeys$5(cacheKeyMap, luvio, resourceParams) {
|
|
1605
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
1606
1606
|
cacheKeyMap.set(key, {
|
|
1607
1607
|
namespace: keyPrefix,
|
|
1608
|
-
representationName: RepresentationType$
|
|
1608
|
+
representationName: RepresentationType$5,
|
|
1609
1609
|
mergeable: false
|
|
1610
1610
|
});
|
|
1611
1611
|
}
|
|
1612
1612
|
function evictSuccess(luvio, resourceParams) {
|
|
1613
|
-
const key = keyBuilder$
|
|
1613
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
1614
1614
|
luvio.storeEvict(key);
|
|
1615
1615
|
}
|
|
1616
|
-
function createResourceRequest$
|
|
1616
|
+
function createResourceRequest$5(config) {
|
|
1617
1617
|
const headers = {};
|
|
1618
1618
|
return {
|
|
1619
1619
|
baseUri: '/services/data/v62.0',
|
|
@@ -1627,33 +1627,33 @@ function createResourceRequest$4(config) {
|
|
|
1627
1627
|
};
|
|
1628
1628
|
}
|
|
1629
1629
|
|
|
1630
|
-
const adapterName$
|
|
1630
|
+
const adapterName$5 = 'deleteVisualization';
|
|
1631
1631
|
const deleteVisualization_ConfigPropertyMetadata = [
|
|
1632
1632
|
generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1633
1633
|
];
|
|
1634
|
-
const deleteVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1635
|
-
const createResourceParams$
|
|
1636
|
-
function typeCheckConfig$
|
|
1634
|
+
const deleteVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, deleteVisualization_ConfigPropertyMetadata);
|
|
1635
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$d(deleteVisualization_ConfigPropertyMetadata);
|
|
1636
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
1637
1637
|
const config = {};
|
|
1638
|
-
typeCheckConfig$
|
|
1638
|
+
typeCheckConfig$d(untrustedConfig, config, deleteVisualization_ConfigPropertyMetadata);
|
|
1639
1639
|
return config;
|
|
1640
1640
|
}
|
|
1641
|
-
function validateAdapterConfig$
|
|
1641
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
1642
1642
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1643
1643
|
return null;
|
|
1644
1644
|
}
|
|
1645
1645
|
if (process.env.NODE_ENV !== 'production') {
|
|
1646
1646
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1647
1647
|
}
|
|
1648
|
-
const config = typeCheckConfig$
|
|
1648
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
1649
1649
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1650
1650
|
return null;
|
|
1651
1651
|
}
|
|
1652
1652
|
return config;
|
|
1653
1653
|
}
|
|
1654
|
-
function buildNetworkSnapshot$
|
|
1655
|
-
const resourceParams = createResourceParams$
|
|
1656
|
-
const request = createResourceRequest$
|
|
1654
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
1655
|
+
const resourceParams = createResourceParams$5(config);
|
|
1656
|
+
const request = createResourceRequest$5(resourceParams);
|
|
1657
1657
|
return luvio.dispatchResourceRequest(request, options)
|
|
1658
1658
|
.then(() => {
|
|
1659
1659
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -1661,7 +1661,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
1661
1661
|
return luvio.storeBroadcast();
|
|
1662
1662
|
}, () => {
|
|
1663
1663
|
const cache = new StoreKeyMap();
|
|
1664
|
-
getResponseCacheKeys$
|
|
1664
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams);
|
|
1665
1665
|
return cache;
|
|
1666
1666
|
});
|
|
1667
1667
|
}, (response) => {
|
|
@@ -1671,33 +1671,33 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
const deleteVisualizationAdapterFactory = (luvio) => {
|
|
1673
1673
|
return function UnifiedAnalyticsdeleteVisualization(untrustedConfig) {
|
|
1674
|
-
const config = validateAdapterConfig$
|
|
1674
|
+
const config = validateAdapterConfig$5(untrustedConfig, deleteVisualization_ConfigPropertyNames);
|
|
1675
1675
|
// Invalid or incomplete config
|
|
1676
1676
|
if (config === null) {
|
|
1677
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
1677
|
+
throw new Error(`Invalid config for "${adapterName$5}"`);
|
|
1678
1678
|
}
|
|
1679
|
-
return buildNetworkSnapshot$
|
|
1679
|
+
return buildNetworkSnapshot$5(luvio, config);
|
|
1680
1680
|
};
|
|
1681
1681
|
};
|
|
1682
1682
|
|
|
1683
|
-
function select$
|
|
1684
|
-
return select$
|
|
1683
|
+
function select$8(luvio, params) {
|
|
1684
|
+
return select$b();
|
|
1685
1685
|
}
|
|
1686
|
-
function keyBuilder$
|
|
1687
|
-
return keyBuilder$
|
|
1686
|
+
function keyBuilder$6(luvio, params) {
|
|
1687
|
+
return keyBuilder$a(luvio, {
|
|
1688
1688
|
name: params.urlParams.visualizationIdOrApiName
|
|
1689
1689
|
});
|
|
1690
1690
|
}
|
|
1691
|
-
function getResponseCacheKeys$
|
|
1692
|
-
getTypeCacheKeys$
|
|
1691
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
1692
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
1693
1693
|
}
|
|
1694
|
-
function ingestSuccess$
|
|
1694
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
1695
1695
|
const { body } = response;
|
|
1696
|
-
const key = keyBuilder$
|
|
1697
|
-
luvio.storeIngest(key, ingest$
|
|
1696
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
1697
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
1698
1698
|
const snapshot = luvio.storeLookup({
|
|
1699
1699
|
recordId: key,
|
|
1700
|
-
node: select$
|
|
1700
|
+
node: select$8(),
|
|
1701
1701
|
variables: {},
|
|
1702
1702
|
}, snapshotRefresh);
|
|
1703
1703
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1709,12 +1709,12 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1709
1709
|
return snapshot;
|
|
1710
1710
|
}
|
|
1711
1711
|
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1712
|
-
const key = keyBuilder$
|
|
1712
|
+
const key = keyBuilder$6(luvio, params);
|
|
1713
1713
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1714
1714
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1715
1715
|
return errorSnapshot;
|
|
1716
1716
|
}
|
|
1717
|
-
function createResourceRequest$
|
|
1717
|
+
function createResourceRequest$4(config) {
|
|
1718
1718
|
const headers = {};
|
|
1719
1719
|
return {
|
|
1720
1720
|
baseUri: '/services/data/v62.0',
|
|
@@ -1728,60 +1728,60 @@ function createResourceRequest$3(config) {
|
|
|
1728
1728
|
};
|
|
1729
1729
|
}
|
|
1730
1730
|
|
|
1731
|
-
const adapterName$
|
|
1731
|
+
const adapterName$4 = 'getVisualization';
|
|
1732
1732
|
const getVisualization_ConfigPropertyMetadata = [
|
|
1733
1733
|
generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1734
1734
|
];
|
|
1735
|
-
const getVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1736
|
-
const createResourceParams$
|
|
1737
|
-
function keyBuilder$
|
|
1738
|
-
const resourceParams = createResourceParams$
|
|
1739
|
-
return keyBuilder$
|
|
1735
|
+
const getVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getVisualization_ConfigPropertyMetadata);
|
|
1736
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$d(getVisualization_ConfigPropertyMetadata);
|
|
1737
|
+
function keyBuilder$5(luvio, config) {
|
|
1738
|
+
const resourceParams = createResourceParams$4(config);
|
|
1739
|
+
return keyBuilder$6(luvio, resourceParams);
|
|
1740
1740
|
}
|
|
1741
|
-
function typeCheckConfig$
|
|
1741
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
1742
1742
|
const config = {};
|
|
1743
|
-
typeCheckConfig$
|
|
1743
|
+
typeCheckConfig$d(untrustedConfig, config, getVisualization_ConfigPropertyMetadata);
|
|
1744
1744
|
return config;
|
|
1745
1745
|
}
|
|
1746
|
-
function validateAdapterConfig$
|
|
1746
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
1747
1747
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1748
1748
|
return null;
|
|
1749
1749
|
}
|
|
1750
1750
|
if (process.env.NODE_ENV !== 'production') {
|
|
1751
1751
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1752
1752
|
}
|
|
1753
|
-
const config = typeCheckConfig$
|
|
1753
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
1754
1754
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1755
1755
|
return null;
|
|
1756
1756
|
}
|
|
1757
1757
|
return config;
|
|
1758
1758
|
}
|
|
1759
1759
|
function adapterFragment$1(luvio, config) {
|
|
1760
|
-
createResourceParams$
|
|
1761
|
-
return select$
|
|
1760
|
+
createResourceParams$4(config);
|
|
1761
|
+
return select$8();
|
|
1762
1762
|
}
|
|
1763
1763
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1764
|
-
const snapshot = ingestSuccess$
|
|
1764
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
1765
1765
|
config,
|
|
1766
|
-
resolve: () => buildNetworkSnapshot$
|
|
1766
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1767
1767
|
});
|
|
1768
1768
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1769
1769
|
}
|
|
1770
1770
|
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1771
1771
|
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1772
1772
|
config,
|
|
1773
|
-
resolve: () => buildNetworkSnapshot$
|
|
1773
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1774
1774
|
});
|
|
1775
1775
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1776
1776
|
}
|
|
1777
|
-
function buildNetworkSnapshot$
|
|
1778
|
-
const resourceParams = createResourceParams$
|
|
1779
|
-
const request = createResourceRequest$
|
|
1777
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
1778
|
+
const resourceParams = createResourceParams$4(config);
|
|
1779
|
+
const request = createResourceRequest$4(resourceParams);
|
|
1780
1780
|
return luvio.dispatchResourceRequest(request, options)
|
|
1781
1781
|
.then((response) => {
|
|
1782
1782
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1783
1783
|
const cache = new StoreKeyMap();
|
|
1784
|
-
getResponseCacheKeys$
|
|
1784
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
1785
1785
|
return cache;
|
|
1786
1786
|
});
|
|
1787
1787
|
}, (response) => {
|
|
@@ -1789,23 +1789,23 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
1789
1789
|
});
|
|
1790
1790
|
}
|
|
1791
1791
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1792
|
-
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1792
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
1793
1793
|
}
|
|
1794
1794
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1795
1795
|
const { luvio, config } = context;
|
|
1796
1796
|
const selector = {
|
|
1797
|
-
recordId: keyBuilder$
|
|
1797
|
+
recordId: keyBuilder$5(luvio, config),
|
|
1798
1798
|
node: adapterFragment$1(luvio, config),
|
|
1799
1799
|
variables: {},
|
|
1800
1800
|
};
|
|
1801
1801
|
const cacheSnapshot = storeLookup(selector, {
|
|
1802
1802
|
config,
|
|
1803
|
-
resolve: () => buildNetworkSnapshot$
|
|
1803
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1804
1804
|
});
|
|
1805
1805
|
return cacheSnapshot;
|
|
1806
1806
|
}
|
|
1807
1807
|
const getVisualizationAdapterFactory = (luvio) => function UnifiedAnalytics__getVisualization(untrustedConfig, requestContext) {
|
|
1808
|
-
const config = validateAdapterConfig$
|
|
1808
|
+
const config = validateAdapterConfig$4(untrustedConfig, getVisualization_ConfigPropertyNames);
|
|
1809
1809
|
// Invalid or incomplete config
|
|
1810
1810
|
if (config === null) {
|
|
1811
1811
|
return null;
|
|
@@ -1814,15 +1814,15 @@ const getVisualizationAdapterFactory = (luvio) => function UnifiedAnalytics__get
|
|
|
1814
1814
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1815
1815
|
};
|
|
1816
1816
|
|
|
1817
|
-
const VERSION$
|
|
1818
|
-
function validate$
|
|
1817
|
+
const VERSION$3 = "bb71c0bf5563bfa6de1fe757209f3722";
|
|
1818
|
+
function validate$a(obj, path = 'WorkspaceRepresentation') {
|
|
1819
1819
|
const v_error = (() => {
|
|
1820
1820
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1821
1821
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1822
1822
|
}
|
|
1823
1823
|
const obj_createdBy = obj.createdBy;
|
|
1824
1824
|
const path_createdBy = path + '.createdBy';
|
|
1825
|
-
const referencepath_createdByValidationError = validate$
|
|
1825
|
+
const referencepath_createdByValidationError = validate$i(obj_createdBy, path_createdBy);
|
|
1826
1826
|
if (referencepath_createdByValidationError !== null) {
|
|
1827
1827
|
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_createdBy + '")\n';
|
|
1828
1828
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1861,57 +1861,57 @@ function validate$8(obj, path = 'WorkspaceRepresentation') {
|
|
|
1861
1861
|
})();
|
|
1862
1862
|
return v_error === undefined ? null : v_error;
|
|
1863
1863
|
}
|
|
1864
|
-
const RepresentationType$
|
|
1865
|
-
function keyBuilder$
|
|
1866
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1864
|
+
const RepresentationType$3 = 'WorkspaceRepresentation';
|
|
1865
|
+
function keyBuilder$4(luvio, config) {
|
|
1866
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.name;
|
|
1867
1867
|
}
|
|
1868
|
-
function keyBuilderFromType$
|
|
1868
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
1869
1869
|
const keyParams = {
|
|
1870
1870
|
name: object.name
|
|
1871
1871
|
};
|
|
1872
|
-
return keyBuilder$
|
|
1872
|
+
return keyBuilder$4(luvio, keyParams);
|
|
1873
1873
|
}
|
|
1874
|
-
function normalize$
|
|
1874
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1875
1875
|
return input;
|
|
1876
1876
|
}
|
|
1877
|
-
const select$
|
|
1877
|
+
const select$7 = function WorkspaceRepresentationSelect() {
|
|
1878
1878
|
return {
|
|
1879
1879
|
kind: 'Fragment',
|
|
1880
|
-
version: VERSION$
|
|
1880
|
+
version: VERSION$3,
|
|
1881
1881
|
private: [],
|
|
1882
1882
|
opaque: true
|
|
1883
1883
|
};
|
|
1884
1884
|
};
|
|
1885
|
-
function equals$
|
|
1885
|
+
function equals$3(existing, incoming) {
|
|
1886
1886
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1887
1887
|
return false;
|
|
1888
1888
|
}
|
|
1889
1889
|
return true;
|
|
1890
1890
|
}
|
|
1891
|
-
const ingest$
|
|
1891
|
+
const ingest$3 = function WorkspaceRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1892
1892
|
if (process.env.NODE_ENV !== 'production') {
|
|
1893
|
-
const validateError = validate$
|
|
1893
|
+
const validateError = validate$a(input);
|
|
1894
1894
|
if (validateError !== null) {
|
|
1895
1895
|
throw validateError;
|
|
1896
1896
|
}
|
|
1897
1897
|
}
|
|
1898
|
-
const key = keyBuilderFromType$
|
|
1898
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
1899
1899
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1900
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1900
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "UnifiedAnalytics", VERSION$3, RepresentationType$3, equals$3);
|
|
1901
1901
|
return createLink(key);
|
|
1902
1902
|
};
|
|
1903
|
-
function getTypeCacheKeys$
|
|
1903
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1904
1904
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1905
|
-
const rootKey = keyBuilderFromType$
|
|
1905
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
1906
1906
|
rootKeySet.set(rootKey, {
|
|
1907
1907
|
namespace: keyPrefix,
|
|
1908
|
-
representationName: RepresentationType$
|
|
1908
|
+
representationName: RepresentationType$3,
|
|
1909
1909
|
mergeable: false
|
|
1910
1910
|
});
|
|
1911
1911
|
}
|
|
1912
1912
|
|
|
1913
|
-
const VERSION$
|
|
1914
|
-
function validate$
|
|
1913
|
+
const VERSION$2 = "25327d65bf7ad14ee671ec5a1642b193";
|
|
1914
|
+
function validate$9(obj, path = 'WorkspaceCollectionRepresentation') {
|
|
1915
1915
|
const v_error = (() => {
|
|
1916
1916
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1917
1917
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1931,14 +1931,14 @@ function validate$7(obj, path = 'WorkspaceCollectionRepresentation') {
|
|
|
1931
1931
|
})();
|
|
1932
1932
|
return v_error === undefined ? null : v_error;
|
|
1933
1933
|
}
|
|
1934
|
-
const RepresentationType$
|
|
1935
|
-
function normalize$
|
|
1934
|
+
const RepresentationType$2 = 'WorkspaceCollectionRepresentation';
|
|
1935
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1936
1936
|
const input_workspaces = input.workspaces;
|
|
1937
1937
|
const input_workspaces_id = path.fullPath + '__workspaces';
|
|
1938
1938
|
for (let i = 0; i < input_workspaces.length; i++) {
|
|
1939
1939
|
const input_workspaces_item = input_workspaces[i];
|
|
1940
1940
|
let input_workspaces_item_id = input_workspaces_id + '__' + i;
|
|
1941
|
-
input_workspaces[i] = ingest$
|
|
1941
|
+
input_workspaces[i] = ingest$3(input_workspaces_item, {
|
|
1942
1942
|
fullPath: input_workspaces_item_id,
|
|
1943
1943
|
propertyName: i,
|
|
1944
1944
|
parent: {
|
|
@@ -1951,22 +1951,22 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
|
1951
1951
|
}
|
|
1952
1952
|
return input;
|
|
1953
1953
|
}
|
|
1954
|
-
const select$
|
|
1954
|
+
const select$6 = function WorkspaceCollectionRepresentationSelect() {
|
|
1955
1955
|
return {
|
|
1956
1956
|
kind: 'Fragment',
|
|
1957
|
-
version: VERSION$
|
|
1957
|
+
version: VERSION$2,
|
|
1958
1958
|
private: [],
|
|
1959
1959
|
selections: [
|
|
1960
1960
|
{
|
|
1961
1961
|
name: 'workspaces',
|
|
1962
1962
|
kind: 'Link',
|
|
1963
1963
|
plural: true,
|
|
1964
|
-
fragment: select$
|
|
1964
|
+
fragment: select$7()
|
|
1965
1965
|
}
|
|
1966
1966
|
]
|
|
1967
1967
|
};
|
|
1968
1968
|
};
|
|
1969
|
-
function equals$
|
|
1969
|
+
function equals$2(existing, incoming) {
|
|
1970
1970
|
const existing_workspaces = existing.workspaces;
|
|
1971
1971
|
const incoming_workspaces = incoming.workspaces;
|
|
1972
1972
|
const equals_workspaces_items = equalsArray(existing_workspaces, incoming_workspaces, (existing_workspaces_item, incoming_workspaces_item) => {
|
|
@@ -1979,48 +1979,48 @@ function equals$1(existing, incoming) {
|
|
|
1979
1979
|
}
|
|
1980
1980
|
return true;
|
|
1981
1981
|
}
|
|
1982
|
-
const ingest$
|
|
1982
|
+
const ingest$2 = function WorkspaceCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1983
1983
|
if (process.env.NODE_ENV !== 'production') {
|
|
1984
|
-
const validateError = validate$
|
|
1984
|
+
const validateError = validate$9(input);
|
|
1985
1985
|
if (validateError !== null) {
|
|
1986
1986
|
throw validateError;
|
|
1987
1987
|
}
|
|
1988
1988
|
}
|
|
1989
1989
|
const key = path.fullPath;
|
|
1990
1990
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1991
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1991
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "UnifiedAnalytics", VERSION$2, RepresentationType$2, equals$2);
|
|
1992
1992
|
return createLink(key);
|
|
1993
1993
|
};
|
|
1994
|
-
function getTypeCacheKeys$
|
|
1994
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1995
1995
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1996
1996
|
const rootKey = fullPathFactory();
|
|
1997
1997
|
rootKeySet.set(rootKey, {
|
|
1998
1998
|
namespace: keyPrefix,
|
|
1999
|
-
representationName: RepresentationType$
|
|
1999
|
+
representationName: RepresentationType$2,
|
|
2000
2000
|
mergeable: false
|
|
2001
2001
|
});
|
|
2002
2002
|
const input_workspaces_length = input.workspaces.length;
|
|
2003
2003
|
for (let i = 0; i < input_workspaces_length; i++) {
|
|
2004
|
-
getTypeCacheKeys$
|
|
2004
|
+
getTypeCacheKeys$3(rootKeySet, luvio, input.workspaces[i]);
|
|
2005
2005
|
}
|
|
2006
2006
|
}
|
|
2007
2007
|
|
|
2008
|
-
function select$
|
|
2009
|
-
return select$
|
|
2008
|
+
function select$5(luvio, params) {
|
|
2009
|
+
return select$6();
|
|
2010
2010
|
}
|
|
2011
|
-
function keyBuilder$
|
|
2011
|
+
function keyBuilder$3(luvio, params) {
|
|
2012
2012
|
return keyPrefix + '::WorkspaceCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
|
|
2013
2013
|
}
|
|
2014
|
-
function getResponseCacheKeys$
|
|
2015
|
-
getTypeCacheKeys$
|
|
2014
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
2015
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
2016
2016
|
}
|
|
2017
|
-
function ingestSuccess$
|
|
2017
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
2018
2018
|
const { body } = response;
|
|
2019
|
-
const key = keyBuilder$
|
|
2020
|
-
luvio.storeIngest(key, ingest$
|
|
2019
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
2020
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
2021
2021
|
const snapshot = luvio.storeLookup({
|
|
2022
2022
|
recordId: key,
|
|
2023
|
-
node: select$
|
|
2023
|
+
node: select$5(),
|
|
2024
2024
|
variables: {},
|
|
2025
2025
|
}, snapshotRefresh);
|
|
2026
2026
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2032,12 +2032,12 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2032
2032
|
return snapshot;
|
|
2033
2033
|
}
|
|
2034
2034
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
2035
|
-
const key = keyBuilder$
|
|
2035
|
+
const key = keyBuilder$3(luvio, params);
|
|
2036
2036
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2037
2037
|
luvio.storeIngestError(key, errorSnapshot);
|
|
2038
2038
|
return errorSnapshot;
|
|
2039
2039
|
}
|
|
2040
|
-
function createResourceRequest$
|
|
2040
|
+
function createResourceRequest$3(config) {
|
|
2041
2041
|
const headers = {};
|
|
2042
2042
|
return {
|
|
2043
2043
|
baseUri: '/services/data/v62.0',
|
|
@@ -2051,61 +2051,61 @@ function createResourceRequest$2(config) {
|
|
|
2051
2051
|
};
|
|
2052
2052
|
}
|
|
2053
2053
|
|
|
2054
|
-
const adapterName$
|
|
2054
|
+
const adapterName$3 = 'getWorkspaces';
|
|
2055
2055
|
const getWorkspaces_ConfigPropertyMetadata = [
|
|
2056
2056
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2057
2057
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2058
2058
|
];
|
|
2059
|
-
const getWorkspaces_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2060
|
-
const createResourceParams$
|
|
2061
|
-
function keyBuilder$
|
|
2062
|
-
const resourceParams = createResourceParams$
|
|
2063
|
-
return keyBuilder$
|
|
2059
|
+
const getWorkspaces_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getWorkspaces_ConfigPropertyMetadata);
|
|
2060
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$d(getWorkspaces_ConfigPropertyMetadata);
|
|
2061
|
+
function keyBuilder$2(luvio, config) {
|
|
2062
|
+
const resourceParams = createResourceParams$3(config);
|
|
2063
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
2064
2064
|
}
|
|
2065
|
-
function typeCheckConfig$
|
|
2065
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
2066
2066
|
const config = {};
|
|
2067
|
-
typeCheckConfig$
|
|
2067
|
+
typeCheckConfig$d(untrustedConfig, config, getWorkspaces_ConfigPropertyMetadata);
|
|
2068
2068
|
return config;
|
|
2069
2069
|
}
|
|
2070
|
-
function validateAdapterConfig$
|
|
2070
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
2071
2071
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2072
2072
|
return null;
|
|
2073
2073
|
}
|
|
2074
2074
|
if (process.env.NODE_ENV !== 'production') {
|
|
2075
2075
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2076
2076
|
}
|
|
2077
|
-
const config = typeCheckConfig$
|
|
2077
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
2078
2078
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2079
2079
|
return null;
|
|
2080
2080
|
}
|
|
2081
2081
|
return config;
|
|
2082
2082
|
}
|
|
2083
2083
|
function adapterFragment(luvio, config) {
|
|
2084
|
-
createResourceParams$
|
|
2085
|
-
return select$
|
|
2084
|
+
createResourceParams$3(config);
|
|
2085
|
+
return select$5();
|
|
2086
2086
|
}
|
|
2087
2087
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
2088
|
-
const snapshot = ingestSuccess$
|
|
2088
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
2089
2089
|
config,
|
|
2090
|
-
resolve: () => buildNetworkSnapshot$
|
|
2090
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
2091
2091
|
});
|
|
2092
2092
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2093
2093
|
}
|
|
2094
2094
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
2095
2095
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
2096
2096
|
config,
|
|
2097
|
-
resolve: () => buildNetworkSnapshot$
|
|
2097
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
2098
2098
|
});
|
|
2099
2099
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2100
2100
|
}
|
|
2101
|
-
function buildNetworkSnapshot$
|
|
2102
|
-
const resourceParams = createResourceParams$
|
|
2103
|
-
const request = createResourceRequest$
|
|
2101
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
2102
|
+
const resourceParams = createResourceParams$3(config);
|
|
2103
|
+
const request = createResourceRequest$3(resourceParams);
|
|
2104
2104
|
return luvio.dispatchResourceRequest(request, options)
|
|
2105
2105
|
.then((response) => {
|
|
2106
2106
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
2107
2107
|
const cache = new StoreKeyMap();
|
|
2108
|
-
getResponseCacheKeys$
|
|
2108
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
2109
2109
|
return cache;
|
|
2110
2110
|
});
|
|
2111
2111
|
}, (response) => {
|
|
@@ -2113,23 +2113,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
2113
2113
|
});
|
|
2114
2114
|
}
|
|
2115
2115
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
2116
|
-
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
2116
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
2117
2117
|
}
|
|
2118
2118
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
2119
2119
|
const { luvio, config } = context;
|
|
2120
2120
|
const selector = {
|
|
2121
|
-
recordId: keyBuilder$
|
|
2121
|
+
recordId: keyBuilder$2(luvio, config),
|
|
2122
2122
|
node: adapterFragment(luvio, config),
|
|
2123
2123
|
variables: {},
|
|
2124
2124
|
};
|
|
2125
2125
|
const cacheSnapshot = storeLookup(selector, {
|
|
2126
2126
|
config,
|
|
2127
|
-
resolve: () => buildNetworkSnapshot$
|
|
2127
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
2128
2128
|
});
|
|
2129
2129
|
return cacheSnapshot;
|
|
2130
2130
|
}
|
|
2131
2131
|
const getWorkspacesAdapterFactory = (luvio) => function UnifiedAnalytics__getWorkspaces(untrustedConfig, requestContext) {
|
|
2132
|
-
const config = validateAdapterConfig$
|
|
2132
|
+
const config = validateAdapterConfig$3(untrustedConfig, getWorkspaces_ConfigPropertyNames);
|
|
2133
2133
|
// Invalid or incomplete config
|
|
2134
2134
|
if (config === null) {
|
|
2135
2135
|
return null;
|
|
@@ -2138,19 +2138,19 @@ const getWorkspacesAdapterFactory = (luvio) => function UnifiedAnalytics__getWor
|
|
|
2138
2138
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
2139
2139
|
};
|
|
2140
2140
|
|
|
2141
|
-
function select$
|
|
2142
|
-
return select$
|
|
2141
|
+
function select$4(luvio, params) {
|
|
2142
|
+
return select$7();
|
|
2143
2143
|
}
|
|
2144
|
-
function getResponseCacheKeys$
|
|
2145
|
-
getTypeCacheKeys$
|
|
2144
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
2145
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
2146
2146
|
}
|
|
2147
|
-
function ingestSuccess$
|
|
2147
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
2148
2148
|
const { body } = response;
|
|
2149
|
-
const key = keyBuilderFromType$
|
|
2150
|
-
luvio.storeIngest(key, ingest$
|
|
2149
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
2150
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
2151
2151
|
const snapshot = luvio.storeLookup({
|
|
2152
2152
|
recordId: key,
|
|
2153
|
-
node: select$
|
|
2153
|
+
node: select$4(),
|
|
2154
2154
|
variables: {},
|
|
2155
2155
|
});
|
|
2156
2156
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2161,7 +2161,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
|
|
|
2161
2161
|
deepFreeze(snapshot.data);
|
|
2162
2162
|
return snapshot;
|
|
2163
2163
|
}
|
|
2164
|
-
function createResourceRequest$
|
|
2164
|
+
function createResourceRequest$2(config) {
|
|
2165
2165
|
const headers = {};
|
|
2166
2166
|
return {
|
|
2167
2167
|
baseUri: '/services/data/v62.0',
|
|
@@ -2175,44 +2175,44 @@ function createResourceRequest$1(config) {
|
|
|
2175
2175
|
};
|
|
2176
2176
|
}
|
|
2177
2177
|
|
|
2178
|
-
const adapterName$
|
|
2178
|
+
const adapterName$2 = 'createWorkspace';
|
|
2179
2179
|
const createWorkspace_ConfigPropertyMetadata = [
|
|
2180
2180
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
2181
2181
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
2182
2182
|
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
2183
2183
|
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
2184
2184
|
];
|
|
2185
|
-
const createWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2186
|
-
const createResourceParams$
|
|
2187
|
-
function typeCheckConfig$
|
|
2185
|
+
const createWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createWorkspace_ConfigPropertyMetadata);
|
|
2186
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$d(createWorkspace_ConfigPropertyMetadata);
|
|
2187
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
2188
2188
|
const config = {};
|
|
2189
|
-
typeCheckConfig$
|
|
2189
|
+
typeCheckConfig$d(untrustedConfig, config, createWorkspace_ConfigPropertyMetadata);
|
|
2190
2190
|
return config;
|
|
2191
2191
|
}
|
|
2192
|
-
function validateAdapterConfig$
|
|
2192
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
2193
2193
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2194
2194
|
return null;
|
|
2195
2195
|
}
|
|
2196
2196
|
if (process.env.NODE_ENV !== 'production') {
|
|
2197
2197
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2198
2198
|
}
|
|
2199
|
-
const config = typeCheckConfig$
|
|
2199
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
2200
2200
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2201
2201
|
return null;
|
|
2202
2202
|
}
|
|
2203
2203
|
return config;
|
|
2204
2204
|
}
|
|
2205
|
-
function buildNetworkSnapshot$
|
|
2206
|
-
const resourceParams = createResourceParams$
|
|
2207
|
-
const request = createResourceRequest$
|
|
2205
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
2206
|
+
const resourceParams = createResourceParams$2(config);
|
|
2207
|
+
const request = createResourceRequest$2(resourceParams);
|
|
2208
2208
|
return luvio.dispatchResourceRequest(request, options)
|
|
2209
2209
|
.then((response) => {
|
|
2210
2210
|
return luvio.handleSuccessResponse(() => {
|
|
2211
|
-
const snapshot = ingestSuccess$
|
|
2211
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
2212
2212
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2213
2213
|
}, () => {
|
|
2214
2214
|
const cache = new StoreKeyMap();
|
|
2215
|
-
getResponseCacheKeys$
|
|
2215
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
2216
2216
|
return cache;
|
|
2217
2217
|
});
|
|
2218
2218
|
}, (response) => {
|
|
@@ -2222,16 +2222,16 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
2222
2222
|
}
|
|
2223
2223
|
const createWorkspaceAdapterFactory = (luvio) => {
|
|
2224
2224
|
return function createWorkspace(untrustedConfig) {
|
|
2225
|
-
const config = validateAdapterConfig$
|
|
2225
|
+
const config = validateAdapterConfig$2(untrustedConfig, createWorkspace_ConfigPropertyNames);
|
|
2226
2226
|
// Invalid or incomplete config
|
|
2227
2227
|
if (config === null) {
|
|
2228
2228
|
throw new Error('Invalid config for "createWorkspace"');
|
|
2229
2229
|
}
|
|
2230
|
-
return buildNetworkSnapshot$
|
|
2230
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
2231
2231
|
};
|
|
2232
2232
|
};
|
|
2233
2233
|
|
|
2234
|
-
function validate$
|
|
2234
|
+
function validate$8(obj, path = 'LibraryAssetsPreviewInputRepresentation') {
|
|
2235
2235
|
const v_error = (() => {
|
|
2236
2236
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2237
2237
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2249,7 +2249,7 @@ function validate$6(obj, path = 'LibraryAssetsPreviewInputRepresentation') {
|
|
|
2249
2249
|
return v_error === undefined ? null : v_error;
|
|
2250
2250
|
}
|
|
2251
2251
|
|
|
2252
|
-
function validate$
|
|
2252
|
+
function validate$7(obj, path = 'TuaUserRepresentation') {
|
|
2253
2253
|
const v_error = (() => {
|
|
2254
2254
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2255
2255
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2267,7 +2267,7 @@ function validate$5(obj, path = 'TuaUserRepresentation') {
|
|
|
2267
2267
|
return v_error === undefined ? null : v_error;
|
|
2268
2268
|
}
|
|
2269
2269
|
|
|
2270
|
-
function validate$
|
|
2270
|
+
function validate$6(obj, path = 'TuaAssetTemplateCustomAttributesRepresentation') {
|
|
2271
2271
|
const v_error = (() => {
|
|
2272
2272
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2273
2273
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2335,7 +2335,7 @@ function validate$4(obj, path = 'TuaAssetTemplateCustomAttributesRepresentation'
|
|
|
2335
2335
|
return v_error === undefined ? null : v_error;
|
|
2336
2336
|
}
|
|
2337
2337
|
|
|
2338
|
-
function validate$
|
|
2338
|
+
function validate$5(obj, path = 'TuaAssetTemplateIconsRepresentation') {
|
|
2339
2339
|
const v_error = (() => {
|
|
2340
2340
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2341
2341
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2353,7 +2353,7 @@ function validate$3(obj, path = 'TuaAssetTemplateIconsRepresentation') {
|
|
|
2353
2353
|
return v_error === undefined ? null : v_error;
|
|
2354
2354
|
}
|
|
2355
2355
|
|
|
2356
|
-
function validate$
|
|
2356
|
+
function validate$4(obj, path = 'TuaAssetTemplateReleaseRepresentation') {
|
|
2357
2357
|
const v_error = (() => {
|
|
2358
2358
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2359
2359
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2414,7 +2414,7 @@ function validate$2(obj, path = 'TuaAssetTemplateReleaseRepresentation') {
|
|
|
2414
2414
|
return v_error === undefined ? null : v_error;
|
|
2415
2415
|
}
|
|
2416
2416
|
|
|
2417
|
-
function validate$
|
|
2417
|
+
function validate$3(obj, path = 'LibraryAssetsPreviewOutputRepresentation') {
|
|
2418
2418
|
const v_error = (() => {
|
|
2419
2419
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2420
2420
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2434,7 +2434,7 @@ function validate$1(obj, path = 'LibraryAssetsPreviewOutputRepresentation') {
|
|
|
2434
2434
|
const path_createdBy = path + '.createdBy';
|
|
2435
2435
|
let obj_createdBy_union0 = null;
|
|
2436
2436
|
const obj_createdBy_union0_error = (() => {
|
|
2437
|
-
const referencepath_createdByValidationError = validate$
|
|
2437
|
+
const referencepath_createdByValidationError = validate$7(obj_createdBy, path_createdBy);
|
|
2438
2438
|
if (referencepath_createdByValidationError !== null) {
|
|
2439
2439
|
let message = 'Object doesn\'t match TuaUserRepresentation (at "' + path_createdBy + '")\n';
|
|
2440
2440
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2493,7 +2493,7 @@ function validate$1(obj, path = 'LibraryAssetsPreviewOutputRepresentation') {
|
|
|
2493
2493
|
for (let i = 0; i < obj_customAttributes.length; i++) {
|
|
2494
2494
|
const obj_customAttributes_item = obj_customAttributes[i];
|
|
2495
2495
|
const path_customAttributes_item = path_customAttributes + '[' + i + ']';
|
|
2496
|
-
const referencepath_customAttributes_itemValidationError = validate$
|
|
2496
|
+
const referencepath_customAttributes_itemValidationError = validate$6(obj_customAttributes_item, path_customAttributes_item);
|
|
2497
2497
|
if (referencepath_customAttributes_itemValidationError !== null) {
|
|
2498
2498
|
let message = 'Object doesn\'t match TuaAssetTemplateCustomAttributesRepresentation (at "' + path_customAttributes_item + '")\n';
|
|
2499
2499
|
message += referencepath_customAttributes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2528,7 +2528,7 @@ function validate$1(obj, path = 'LibraryAssetsPreviewOutputRepresentation') {
|
|
|
2528
2528
|
}
|
|
2529
2529
|
const obj_icons = obj.icons;
|
|
2530
2530
|
const path_icons = path + '.icons';
|
|
2531
|
-
const referencepath_iconsValidationError = validate$
|
|
2531
|
+
const referencepath_iconsValidationError = validate$5(obj_icons, path_icons);
|
|
2532
2532
|
if (referencepath_iconsValidationError !== null) {
|
|
2533
2533
|
let message = 'Object doesn\'t match TuaAssetTemplateIconsRepresentation (at "' + path_icons + '")\n';
|
|
2534
2534
|
message += referencepath_iconsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2548,7 +2548,7 @@ function validate$1(obj, path = 'LibraryAssetsPreviewOutputRepresentation') {
|
|
|
2548
2548
|
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
2549
2549
|
let obj_lastModifiedBy_union0 = null;
|
|
2550
2550
|
const obj_lastModifiedBy_union0_error = (() => {
|
|
2551
|
-
const referencepath_lastModifiedByValidationError = validate$
|
|
2551
|
+
const referencepath_lastModifiedByValidationError = validate$7(obj_lastModifiedBy, path_lastModifiedBy);
|
|
2552
2552
|
if (referencepath_lastModifiedByValidationError !== null) {
|
|
2553
2553
|
let message = 'Object doesn\'t match TuaUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
2554
2554
|
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2653,7 +2653,7 @@ function validate$1(obj, path = 'LibraryAssetsPreviewOutputRepresentation') {
|
|
|
2653
2653
|
}
|
|
2654
2654
|
const obj_releaseInfo = obj.releaseInfo;
|
|
2655
2655
|
const path_releaseInfo = path + '.releaseInfo';
|
|
2656
|
-
const referencepath_releaseInfoValidationError = validate$
|
|
2656
|
+
const referencepath_releaseInfoValidationError = validate$4(obj_releaseInfo, path_releaseInfo);
|
|
2657
2657
|
if (referencepath_releaseInfoValidationError !== null) {
|
|
2658
2658
|
let message = 'Object doesn\'t match TuaAssetTemplateReleaseRepresentation (at "' + path_releaseInfo + '")\n';
|
|
2659
2659
|
message += referencepath_releaseInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2774,9 +2774,237 @@ function validate$1(obj, path = 'LibraryAssetsPreviewOutputRepresentation') {
|
|
|
2774
2774
|
return v_error === undefined ? null : v_error;
|
|
2775
2775
|
}
|
|
2776
2776
|
|
|
2777
|
+
const TTL$1 = 500;
|
|
2778
|
+
const VERSION$1 = "72309d9f2b288fd243257c47590de9c1";
|
|
2779
|
+
function validate$2(obj, path = 'LibraryAssetsPreviewOutputCollectionRepresentation') {
|
|
2780
|
+
const v_error = (() => {
|
|
2781
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2782
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2783
|
+
}
|
|
2784
|
+
const obj_analyticsLibraryAssetPreviewRepresentationList = obj.analyticsLibraryAssetPreviewRepresentationList;
|
|
2785
|
+
const path_analyticsLibraryAssetPreviewRepresentationList = path + '.analyticsLibraryAssetPreviewRepresentationList';
|
|
2786
|
+
if (!ArrayIsArray(obj_analyticsLibraryAssetPreviewRepresentationList)) {
|
|
2787
|
+
return new TypeError('Expected "array" but received "' + typeof obj_analyticsLibraryAssetPreviewRepresentationList + '" (at "' + path_analyticsLibraryAssetPreviewRepresentationList + '")');
|
|
2788
|
+
}
|
|
2789
|
+
for (let i = 0; i < obj_analyticsLibraryAssetPreviewRepresentationList.length; i++) {
|
|
2790
|
+
const obj_analyticsLibraryAssetPreviewRepresentationList_item = obj_analyticsLibraryAssetPreviewRepresentationList[i];
|
|
2791
|
+
const path_analyticsLibraryAssetPreviewRepresentationList_item = path_analyticsLibraryAssetPreviewRepresentationList + '[' + i + ']';
|
|
2792
|
+
const referencepath_analyticsLibraryAssetPreviewRepresentationList_itemValidationError = validate$3(obj_analyticsLibraryAssetPreviewRepresentationList_item, path_analyticsLibraryAssetPreviewRepresentationList_item);
|
|
2793
|
+
if (referencepath_analyticsLibraryAssetPreviewRepresentationList_itemValidationError !== null) {
|
|
2794
|
+
let message = 'Object doesn\'t match LibraryAssetsPreviewOutputRepresentation (at "' + path_analyticsLibraryAssetPreviewRepresentationList_item + '")\n';
|
|
2795
|
+
message += referencepath_analyticsLibraryAssetPreviewRepresentationList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2796
|
+
return new TypeError(message);
|
|
2797
|
+
}
|
|
2798
|
+
}
|
|
2799
|
+
const obj_id = obj.id;
|
|
2800
|
+
const path_id = path + '.id';
|
|
2801
|
+
if (typeof obj_id !== 'string') {
|
|
2802
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
2803
|
+
}
|
|
2804
|
+
})();
|
|
2805
|
+
return v_error === undefined ? null : v_error;
|
|
2806
|
+
}
|
|
2807
|
+
const RepresentationType$1 = 'LibraryAssetsPreviewOutputCollectionRepresentation';
|
|
2808
|
+
function keyBuilder$1(luvio, config) {
|
|
2809
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
|
|
2810
|
+
}
|
|
2811
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
2812
|
+
const keyParams = {
|
|
2813
|
+
id: object.id
|
|
2814
|
+
};
|
|
2815
|
+
return keyBuilder$1(luvio, keyParams);
|
|
2816
|
+
}
|
|
2817
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
2818
|
+
return input;
|
|
2819
|
+
}
|
|
2820
|
+
const select$3 = function LibraryAssetsPreviewOutputCollectionRepresentationSelect() {
|
|
2821
|
+
return {
|
|
2822
|
+
kind: 'Fragment',
|
|
2823
|
+
version: VERSION$1,
|
|
2824
|
+
private: [],
|
|
2825
|
+
opaque: true
|
|
2826
|
+
};
|
|
2827
|
+
};
|
|
2828
|
+
function equals$1(existing, incoming) {
|
|
2829
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2830
|
+
return false;
|
|
2831
|
+
}
|
|
2832
|
+
return true;
|
|
2833
|
+
}
|
|
2834
|
+
const ingest$1 = function LibraryAssetsPreviewOutputCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2835
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2836
|
+
const validateError = validate$2(input);
|
|
2837
|
+
if (validateError !== null) {
|
|
2838
|
+
throw validateError;
|
|
2839
|
+
}
|
|
2840
|
+
}
|
|
2841
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
2842
|
+
const ttlToUse = TTL$1;
|
|
2843
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "UnifiedAnalytics", VERSION$1, RepresentationType$1, equals$1);
|
|
2844
|
+
return createLink(key);
|
|
2845
|
+
};
|
|
2846
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
2847
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2848
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
2849
|
+
rootKeySet.set(rootKey, {
|
|
2850
|
+
namespace: keyPrefix,
|
|
2851
|
+
representationName: RepresentationType$1,
|
|
2852
|
+
mergeable: false
|
|
2853
|
+
});
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2856
|
+
function select$2(luvio, params) {
|
|
2857
|
+
return select$3();
|
|
2858
|
+
}
|
|
2859
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
2860
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
2861
|
+
}
|
|
2862
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
2863
|
+
const { body } = response;
|
|
2864
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
2865
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
2866
|
+
const snapshot = luvio.storeLookup({
|
|
2867
|
+
recordId: key,
|
|
2868
|
+
node: select$2(),
|
|
2869
|
+
variables: {},
|
|
2870
|
+
});
|
|
2871
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2872
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2873
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2874
|
+
}
|
|
2875
|
+
}
|
|
2876
|
+
deepFreeze(snapshot.data);
|
|
2877
|
+
return snapshot;
|
|
2878
|
+
}
|
|
2879
|
+
function createResourceRequest$1(config) {
|
|
2880
|
+
const headers = {};
|
|
2881
|
+
return {
|
|
2882
|
+
baseUri: '/services/data/v62.0',
|
|
2883
|
+
basePath: '/tua-analytics/assets/query',
|
|
2884
|
+
method: 'post',
|
|
2885
|
+
body: config.body,
|
|
2886
|
+
urlParams: {},
|
|
2887
|
+
queryParams: {},
|
|
2888
|
+
headers,
|
|
2889
|
+
priority: 'normal',
|
|
2890
|
+
};
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2893
|
+
const adapterName$1 = 'getListViewAnalyticsLibrary';
|
|
2894
|
+
const getListViewAnalyticsLibrary_ConfigPropertyMetadata = [
|
|
2895
|
+
generateParamConfigMetadata('input_collection', true, 2 /* Body */, 4 /* Unsupported */),
|
|
2896
|
+
];
|
|
2897
|
+
const getListViewAnalyticsLibrary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getListViewAnalyticsLibrary_ConfigPropertyMetadata);
|
|
2898
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$d(getListViewAnalyticsLibrary_ConfigPropertyMetadata);
|
|
2899
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
2900
|
+
const config = {};
|
|
2901
|
+
const untrustedConfig_input_collection = untrustedConfig.input_collection;
|
|
2902
|
+
const referenceLibraryAssetsPreviewInputRepresentationValidationError = validate$8(untrustedConfig_input_collection);
|
|
2903
|
+
if (referenceLibraryAssetsPreviewInputRepresentationValidationError === null) {
|
|
2904
|
+
config.input_collection = untrustedConfig_input_collection;
|
|
2905
|
+
}
|
|
2906
|
+
return config;
|
|
2907
|
+
}
|
|
2908
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
2909
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2910
|
+
return null;
|
|
2911
|
+
}
|
|
2912
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2913
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2914
|
+
}
|
|
2915
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
2916
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2917
|
+
return null;
|
|
2918
|
+
}
|
|
2919
|
+
return config;
|
|
2920
|
+
}
|
|
2921
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
2922
|
+
const resourceParams = createResourceParams$1(config);
|
|
2923
|
+
const request = createResourceRequest$1(resourceParams);
|
|
2924
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2925
|
+
.then((response) => {
|
|
2926
|
+
return luvio.handleSuccessResponse(() => {
|
|
2927
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
2928
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2929
|
+
}, () => {
|
|
2930
|
+
const cache = new StoreKeyMap();
|
|
2931
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
2932
|
+
return cache;
|
|
2933
|
+
});
|
|
2934
|
+
}, (response) => {
|
|
2935
|
+
deepFreeze(response);
|
|
2936
|
+
throw response;
|
|
2937
|
+
});
|
|
2938
|
+
}
|
|
2939
|
+
const getListViewAnalyticsLibraryAdapterFactory = (luvio) => {
|
|
2940
|
+
return function getListViewAnalyticsLibrary(untrustedConfig) {
|
|
2941
|
+
const config = validateAdapterConfig$1(untrustedConfig, getListViewAnalyticsLibrary_ConfigPropertyNames);
|
|
2942
|
+
// Invalid or incomplete config
|
|
2943
|
+
if (config === null) {
|
|
2944
|
+
throw new Error('Invalid config for "getListViewAnalyticsLibrary"');
|
|
2945
|
+
}
|
|
2946
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
2947
|
+
};
|
|
2948
|
+
};
|
|
2949
|
+
|
|
2950
|
+
function validate$1(obj, path = 'BaseAnalyticsLibraryAssetRepresentation') {
|
|
2951
|
+
const v_error = (() => {
|
|
2952
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2953
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2954
|
+
}
|
|
2955
|
+
const obj_assetSource = obj.assetSource;
|
|
2956
|
+
const path_assetSource = path + '.assetSource';
|
|
2957
|
+
if (typeof obj_assetSource !== 'string') {
|
|
2958
|
+
return new TypeError('Expected "string" but received "' + typeof obj_assetSource + '" (at "' + path_assetSource + '")');
|
|
2959
|
+
}
|
|
2960
|
+
const obj_assetType = obj.assetType;
|
|
2961
|
+
const path_assetType = path + '.assetType';
|
|
2962
|
+
if (typeof obj_assetType !== 'string') {
|
|
2963
|
+
return new TypeError('Expected "string" but received "' + typeof obj_assetType + '" (at "' + path_assetType + '")');
|
|
2964
|
+
}
|
|
2965
|
+
const obj_description = obj.description;
|
|
2966
|
+
const path_description = path + '.description';
|
|
2967
|
+
let obj_description_union0 = null;
|
|
2968
|
+
const obj_description_union0_error = (() => {
|
|
2969
|
+
if (typeof obj_description !== 'string') {
|
|
2970
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
2971
|
+
}
|
|
2972
|
+
})();
|
|
2973
|
+
if (obj_description_union0_error != null) {
|
|
2974
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
2975
|
+
}
|
|
2976
|
+
let obj_description_union1 = null;
|
|
2977
|
+
const obj_description_union1_error = (() => {
|
|
2978
|
+
if (obj_description !== null) {
|
|
2979
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
2980
|
+
}
|
|
2981
|
+
})();
|
|
2982
|
+
if (obj_description_union1_error != null) {
|
|
2983
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
2984
|
+
}
|
|
2985
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
2986
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
2987
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2988
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2989
|
+
return new TypeError(message);
|
|
2990
|
+
}
|
|
2991
|
+
const obj_id = obj.id;
|
|
2992
|
+
const path_id = path + '.id';
|
|
2993
|
+
if (typeof obj_id !== 'string') {
|
|
2994
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
2995
|
+
}
|
|
2996
|
+
const obj_name = obj.name;
|
|
2997
|
+
const path_name = path + '.name';
|
|
2998
|
+
if (typeof obj_name !== 'string') {
|
|
2999
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
3000
|
+
}
|
|
3001
|
+
})();
|
|
3002
|
+
return v_error === undefined ? null : v_error;
|
|
3003
|
+
}
|
|
3004
|
+
|
|
2777
3005
|
const TTL = 500;
|
|
2778
|
-
const VERSION = "
|
|
2779
|
-
function validate(obj, path = '
|
|
3006
|
+
const VERSION = "6e54a5abab4a69ad4d889726d21dcde9";
|
|
3007
|
+
function validate(obj, path = 'AnalyticsLibraryAssetCollectionOutputRepresentation') {
|
|
2780
3008
|
const v_error = (() => {
|
|
2781
3009
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2782
3010
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2791,7 +3019,7 @@ function validate(obj, path = 'LibraryAssetsPreviewOutputCollectionRepresentatio
|
|
|
2791
3019
|
const path_analyticsLibraryAssetPreviewRepresentationList_item = path_analyticsLibraryAssetPreviewRepresentationList + '[' + i + ']';
|
|
2792
3020
|
const referencepath_analyticsLibraryAssetPreviewRepresentationList_itemValidationError = validate$1(obj_analyticsLibraryAssetPreviewRepresentationList_item, path_analyticsLibraryAssetPreviewRepresentationList_item);
|
|
2793
3021
|
if (referencepath_analyticsLibraryAssetPreviewRepresentationList_itemValidationError !== null) {
|
|
2794
|
-
let message = 'Object doesn\'t match
|
|
3022
|
+
let message = 'Object doesn\'t match BaseAnalyticsLibraryAssetRepresentation (at "' + path_analyticsLibraryAssetPreviewRepresentationList_item + '")\n';
|
|
2795
3023
|
message += referencepath_analyticsLibraryAssetPreviewRepresentationList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2796
3024
|
return new TypeError(message);
|
|
2797
3025
|
}
|
|
@@ -2801,10 +3029,15 @@ function validate(obj, path = 'LibraryAssetsPreviewOutputCollectionRepresentatio
|
|
|
2801
3029
|
if (typeof obj_id !== 'string') {
|
|
2802
3030
|
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
2803
3031
|
}
|
|
3032
|
+
const obj_totalCount = obj.totalCount;
|
|
3033
|
+
const path_totalCount = path + '.totalCount';
|
|
3034
|
+
if (typeof obj_totalCount !== 'number' || (typeof obj_totalCount === 'number' && Math.floor(obj_totalCount) !== obj_totalCount)) {
|
|
3035
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_totalCount + '" (at "' + path_totalCount + '")');
|
|
3036
|
+
}
|
|
2804
3037
|
})();
|
|
2805
3038
|
return v_error === undefined ? null : v_error;
|
|
2806
3039
|
}
|
|
2807
|
-
const RepresentationType = '
|
|
3040
|
+
const RepresentationType = 'AnalyticsLibraryAssetCollectionOutputRepresentation';
|
|
2808
3041
|
function keyBuilder(luvio, config) {
|
|
2809
3042
|
return keyPrefix + '::' + RepresentationType + ':' + config.id;
|
|
2810
3043
|
}
|
|
@@ -2817,7 +3050,7 @@ function keyBuilderFromType(luvio, object) {
|
|
|
2817
3050
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
2818
3051
|
return input;
|
|
2819
3052
|
}
|
|
2820
|
-
const select$1 = function
|
|
3053
|
+
const select$1 = function AnalyticsLibraryAssetCollectionOutputRepresentationSelect() {
|
|
2821
3054
|
return {
|
|
2822
3055
|
kind: 'Fragment',
|
|
2823
3056
|
version: VERSION,
|
|
@@ -2831,7 +3064,7 @@ function equals(existing, incoming) {
|
|
|
2831
3064
|
}
|
|
2832
3065
|
return true;
|
|
2833
3066
|
}
|
|
2834
|
-
const ingest = function
|
|
3067
|
+
const ingest = function AnalyticsLibraryAssetCollectionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2835
3068
|
if (process.env.NODE_ENV !== 'production') {
|
|
2836
3069
|
const validateError = validate(input);
|
|
2837
3070
|
if (validateError !== null) {
|
|
@@ -2880,7 +3113,7 @@ function createResourceRequest(config) {
|
|
|
2880
3113
|
const headers = {};
|
|
2881
3114
|
return {
|
|
2882
3115
|
baseUri: '/services/data/v62.0',
|
|
2883
|
-
basePath: '/
|
|
3116
|
+
basePath: '/unified-analytics/library/assets/query',
|
|
2884
3117
|
method: 'post',
|
|
2885
3118
|
body: config.body,
|
|
2886
3119
|
urlParams: {},
|
|
@@ -2890,18 +3123,79 @@ function createResourceRequest(config) {
|
|
|
2890
3123
|
};
|
|
2891
3124
|
}
|
|
2892
3125
|
|
|
2893
|
-
const adapterName = '
|
|
2894
|
-
const
|
|
2895
|
-
generateParamConfigMetadata('
|
|
3126
|
+
const adapterName = 'getUnifiedAnalyticsLibraryAssets';
|
|
3127
|
+
const getUnifiedAnalyticsLibraryAssets_ConfigPropertyMetadata = [
|
|
3128
|
+
generateParamConfigMetadata('assetTypes', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
3129
|
+
generateParamConfigMetadata('categoryFilters', false, 2 /* Body */, 4 /* Unsupported */),
|
|
3130
|
+
generateParamConfigMetadata('limit', false, 2 /* Body */, 4 /* Unsupported */),
|
|
3131
|
+
generateParamConfigMetadata('offset', false, 2 /* Body */, 4 /* Unsupported */),
|
|
3132
|
+
generateParamConfigMetadata('searchToken', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2896
3133
|
];
|
|
2897
|
-
const
|
|
2898
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
3134
|
+
const getUnifiedAnalyticsLibraryAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getUnifiedAnalyticsLibraryAssets_ConfigPropertyMetadata);
|
|
3135
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$d(getUnifiedAnalyticsLibraryAssets_ConfigPropertyMetadata);
|
|
2899
3136
|
function typeCheckConfig(untrustedConfig) {
|
|
2900
3137
|
const config = {};
|
|
2901
|
-
const
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
3138
|
+
const untrustedConfig_assetTypes = untrustedConfig.assetTypes;
|
|
3139
|
+
if (ArrayIsArray$1(untrustedConfig_assetTypes)) {
|
|
3140
|
+
const untrustedConfig_assetTypes_array = [];
|
|
3141
|
+
for (let i = 0, arrayLength = untrustedConfig_assetTypes.length; i < arrayLength; i++) {
|
|
3142
|
+
const untrustedConfig_assetTypes_item = untrustedConfig_assetTypes[i];
|
|
3143
|
+
if (typeof untrustedConfig_assetTypes_item === 'string') {
|
|
3144
|
+
untrustedConfig_assetTypes_array.push(untrustedConfig_assetTypes_item);
|
|
3145
|
+
}
|
|
3146
|
+
if (untrustedConfig_assetTypes_item === null) {
|
|
3147
|
+
untrustedConfig_assetTypes_array.push(untrustedConfig_assetTypes_item);
|
|
3148
|
+
}
|
|
3149
|
+
}
|
|
3150
|
+
config.assetTypes = untrustedConfig_assetTypes_array;
|
|
3151
|
+
}
|
|
3152
|
+
const untrustedConfig_categoryFilters = untrustedConfig.categoryFilters;
|
|
3153
|
+
if (untrustedIsObject(untrustedConfig_categoryFilters)) {
|
|
3154
|
+
const untrustedConfig_categoryFilters_object = {};
|
|
3155
|
+
const untrustedConfig_categoryFilters_keys = Object.keys(untrustedConfig_categoryFilters);
|
|
3156
|
+
for (let i = 0, arrayLength = untrustedConfig_categoryFilters_keys.length; i < arrayLength; i++) {
|
|
3157
|
+
const key = untrustedConfig_categoryFilters_keys[i];
|
|
3158
|
+
const untrustedConfig_categoryFilters_prop = untrustedConfig_categoryFilters[key];
|
|
3159
|
+
if (ArrayIsArray$1(untrustedConfig_categoryFilters_prop)) {
|
|
3160
|
+
const untrustedConfig_categoryFilters_prop_array = [];
|
|
3161
|
+
for (let i = 0, arrayLength = untrustedConfig_categoryFilters_prop.length; i < arrayLength; i++) {
|
|
3162
|
+
const untrustedConfig_categoryFilters_prop_item = untrustedConfig_categoryFilters_prop[i];
|
|
3163
|
+
if (typeof untrustedConfig_categoryFilters_prop_item === 'string') {
|
|
3164
|
+
untrustedConfig_categoryFilters_prop_array.push(untrustedConfig_categoryFilters_prop_item);
|
|
3165
|
+
}
|
|
3166
|
+
if (untrustedConfig_categoryFilters_prop_item === null) {
|
|
3167
|
+
untrustedConfig_categoryFilters_prop_array.push(untrustedConfig_categoryFilters_prop_item);
|
|
3168
|
+
}
|
|
3169
|
+
}
|
|
3170
|
+
if (untrustedConfig_categoryFilters_object !== undefined) {
|
|
3171
|
+
untrustedConfig_categoryFilters_object[key] = untrustedConfig_categoryFilters_prop_array;
|
|
3172
|
+
}
|
|
3173
|
+
}
|
|
3174
|
+
}
|
|
3175
|
+
if (untrustedConfig_categoryFilters_object !== undefined && Object.keys(untrustedConfig_categoryFilters_object).length >= 0) {
|
|
3176
|
+
config.categoryFilters = untrustedConfig_categoryFilters_object;
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3179
|
+
const untrustedConfig_limit = untrustedConfig.limit;
|
|
3180
|
+
if (typeof untrustedConfig_limit === 'number' && Math.floor(untrustedConfig_limit) === untrustedConfig_limit) {
|
|
3181
|
+
config.limit = untrustedConfig_limit;
|
|
3182
|
+
}
|
|
3183
|
+
if (untrustedConfig_limit === null) {
|
|
3184
|
+
config.limit = untrustedConfig_limit;
|
|
3185
|
+
}
|
|
3186
|
+
const untrustedConfig_offset = untrustedConfig.offset;
|
|
3187
|
+
if (typeof untrustedConfig_offset === 'number' && Math.floor(untrustedConfig_offset) === untrustedConfig_offset) {
|
|
3188
|
+
config.offset = untrustedConfig_offset;
|
|
3189
|
+
}
|
|
3190
|
+
if (untrustedConfig_offset === null) {
|
|
3191
|
+
config.offset = untrustedConfig_offset;
|
|
3192
|
+
}
|
|
3193
|
+
const untrustedConfig_searchToken = untrustedConfig.searchToken;
|
|
3194
|
+
if (typeof untrustedConfig_searchToken === 'string') {
|
|
3195
|
+
config.searchToken = untrustedConfig_searchToken;
|
|
3196
|
+
}
|
|
3197
|
+
if (untrustedConfig_searchToken === null) {
|
|
3198
|
+
config.searchToken = untrustedConfig_searchToken;
|
|
2905
3199
|
}
|
|
2906
3200
|
return config;
|
|
2907
3201
|
}
|
|
@@ -2936,15 +3230,15 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
2936
3230
|
throw response;
|
|
2937
3231
|
});
|
|
2938
3232
|
}
|
|
2939
|
-
const
|
|
2940
|
-
return function
|
|
2941
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
3233
|
+
const getUnifiedAnalyticsLibraryAssetsAdapterFactory = (luvio) => {
|
|
3234
|
+
return function getUnifiedAnalyticsLibraryAssets(untrustedConfig) {
|
|
3235
|
+
const config = validateAdapterConfig(untrustedConfig, getUnifiedAnalyticsLibraryAssets_ConfigPropertyNames);
|
|
2942
3236
|
// Invalid or incomplete config
|
|
2943
3237
|
if (config === null) {
|
|
2944
|
-
throw new Error('Invalid config for "
|
|
3238
|
+
throw new Error('Invalid config for "getUnifiedAnalyticsLibraryAssets"');
|
|
2945
3239
|
}
|
|
2946
3240
|
return buildNetworkSnapshot(luvio, config);
|
|
2947
3241
|
};
|
|
2948
3242
|
};
|
|
2949
3243
|
|
|
2950
|
-
export { createDashboardAdapterFactory, createWorkspaceAdapterFactory, deleteDashboardAdapterFactory, deleteVisualizationAdapterFactory, getDashboardByNameAdapterFactory, getDashboardsAdapterFactory, getListViewAnalyticsLibraryAdapterFactory, getVisualizationAdapterFactory, getVisualizationsAdapterFactory, getWorkspacesAdapterFactory, queryAssetsAdapterFactory, updateDashboardAdapterFactory };
|
|
3244
|
+
export { createDashboardAdapterFactory, createWorkspaceAdapterFactory, deleteDashboardAdapterFactory, deleteVisualizationAdapterFactory, getDashboardByNameAdapterFactory, getDashboardsAdapterFactory, getListViewAnalyticsLibraryAdapterFactory, getUnifiedAnalyticsLibraryAssetsAdapterFactory, getVisualizationAdapterFactory, getVisualizationsAdapterFactory, getWorkspacesAdapterFactory, queryAssetsAdapterFactory, updateDashboardAdapterFactory };
|