@salesforce/lds-adapters-analytics-unifiedanalytics 1.296.0 → 1.297.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 +778 -467
- package/dist/es/es2018/types/src/generated/adapters/getSubscriptionDigestConfig.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/adapters/updateSubscriptionDigestConfig.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +5 -1
- package/dist/es/es2018/types/src/generated/resources/getUnifiedAnalyticsSubscriptionsDigestByDigestConfigOwner.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/patchUnifiedAnalyticsSubscriptionsDigestByDigestConfigOwner.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/DashboardRepresentation.d.ts +6 -3
- package/dist/es/es2018/types/src/generated/types/SubscriptionDigestConfigInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SubscriptionDigestConfigOutputRepresentation.d.ts +44 -0
- package/package.json +3 -3
- package/sfdc/index.js +851 -481
- package/src/raml/api.raml +60 -0
- package/src/raml/luvio.raml +16 -1
|
@@ -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$f, typeCheckConfig as typeCheckConfig$f, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$6 } 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$k(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$j(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$j(obj, path = 'AnalyticsUserRepresentation') {
|
|
132
|
+
const validateBaseAnalyticsRepresentation_validateError = validate$k(obj, path);
|
|
133
133
|
if (validateBaseAnalyticsRepresentation_validateError !== null) {
|
|
134
134
|
return validateBaseAnalyticsRepresentation_validateError;
|
|
135
135
|
}
|
|
@@ -169,8 +169,8 @@ function validate$i(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$i(obj, path = 'AnalyticsAssetsQueryResultsWorkspaceRepresentation') {
|
|
173
|
+
const validateBaseAnalyticsRepresentation_validateError = validate$k(obj, path);
|
|
174
174
|
if (validateBaseAnalyticsRepresentation_validateError !== null) {
|
|
175
175
|
return validateBaseAnalyticsRepresentation_validateError;
|
|
176
176
|
}
|
|
@@ -182,8 +182,8 @@ function validate$h(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$h(obj, path = 'AnalyticsAssetsQueryResultsItemRepresentation') {
|
|
186
|
+
const validateBaseAnalyticsRepresentation_validateError = validate$k(obj, path);
|
|
187
187
|
if (validateBaseAnalyticsRepresentation_validateError !== null) {
|
|
188
188
|
return validateBaseAnalyticsRepresentation_validateError;
|
|
189
189
|
}
|
|
@@ -198,7 +198,7 @@ function validate$g(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$j(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$g(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$j(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$g(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$j(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$g(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$i(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$g(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$3 = 500;
|
|
246
|
+
const VERSION$9 = "ed60d9cca169a3e5ed897c67d11a23db";
|
|
247
|
+
function validate$g(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$f(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$h(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$f(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$9 = 'AnalyticsAssetsQueryResultsRepresentation';
|
|
286
|
+
function keyBuilder$k(luvio, config) {
|
|
287
|
+
return keyPrefix + '::' + RepresentationType$9 + ':' + config.searchId;
|
|
288
288
|
}
|
|
289
|
-
function keyBuilderFromType$
|
|
289
|
+
function keyBuilderFromType$6(luvio, object) {
|
|
290
290
|
const keyParams = {
|
|
291
291
|
searchId: object.queryKey
|
|
292
292
|
};
|
|
293
|
-
return keyBuilder$
|
|
293
|
+
return keyBuilder$k(luvio, keyParams);
|
|
294
294
|
}
|
|
295
|
-
function normalize$
|
|
295
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
296
296
|
return input;
|
|
297
297
|
}
|
|
298
|
-
const select$
|
|
298
|
+
const select$m = function AnalyticsAssetsQueryResultsRepresentationSelect() {
|
|
299
299
|
return {
|
|
300
300
|
kind: 'Fragment',
|
|
301
|
-
version: VERSION$
|
|
301
|
+
version: VERSION$9,
|
|
302
302
|
private: [],
|
|
303
303
|
opaque: true
|
|
304
304
|
};
|
|
305
305
|
};
|
|
306
|
-
function equals$
|
|
306
|
+
function equals$9(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$9 = function AnalyticsAssetsQueryResultsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
313
313
|
if (process.env.NODE_ENV !== 'production') {
|
|
314
|
-
const validateError = validate$
|
|
314
|
+
const validateError = validate$g(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$6(luvio, input);
|
|
320
|
+
const ttlToUse = TTL$3;
|
|
321
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "UnifiedAnalytics", VERSION$9, RepresentationType$9, equals$9);
|
|
322
322
|
return createLink(key);
|
|
323
323
|
};
|
|
324
|
-
function getTypeCacheKeys$
|
|
324
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
325
325
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
326
|
-
const rootKey = keyBuilderFromType$
|
|
326
|
+
const rootKey = keyBuilderFromType$6(luvio, input);
|
|
327
327
|
rootKeySet.set(rootKey, {
|
|
328
328
|
namespace: keyPrefix,
|
|
329
|
-
representationName: RepresentationType$
|
|
329
|
+
representationName: RepresentationType$9,
|
|
330
330
|
mergeable: false
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
function select$
|
|
335
|
-
return select$
|
|
334
|
+
function select$l(luvio, params) {
|
|
335
|
+
return select$m();
|
|
336
336
|
}
|
|
337
|
-
function getResponseCacheKeys$
|
|
338
|
-
getTypeCacheKeys$
|
|
337
|
+
function getResponseCacheKeys$e(storeKeyMap, luvio, resourceParams, response) {
|
|
338
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
339
339
|
}
|
|
340
|
-
function ingestSuccess$
|
|
340
|
+
function ingestSuccess$c(luvio, resourceParams, response) {
|
|
341
341
|
const { body } = response;
|
|
342
|
-
const key = keyBuilderFromType$
|
|
343
|
-
luvio.storeIngest(key, ingest$
|
|
342
|
+
const key = keyBuilderFromType$6(luvio, body);
|
|
343
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
344
344
|
const snapshot = luvio.storeLookup({
|
|
345
345
|
recordId: key,
|
|
346
|
-
node: select$
|
|
346
|
+
node: select$l(),
|
|
347
347
|
variables: {},
|
|
348
348
|
});
|
|
349
349
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -354,7 +354,7 @@ function ingestSuccess$a(luvio, resourceParams, response) {
|
|
|
354
354
|
deepFreeze(snapshot.data);
|
|
355
355
|
return snapshot;
|
|
356
356
|
}
|
|
357
|
-
function createResourceRequest$
|
|
357
|
+
function createResourceRequest$e(config) {
|
|
358
358
|
const headers = {};
|
|
359
359
|
return {
|
|
360
360
|
baseUri: '/services/data/v62.0',
|
|
@@ -368,7 +368,7 @@ function createResourceRequest$c(config) {
|
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
const adapterName$
|
|
371
|
+
const adapterName$e = '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$e, queryAssets_ConfigPropertyMetadata);
|
|
381
|
+
const createResourceParams$e = /*#__PURE__*/ createResourceParams$f(queryAssets_ConfigPropertyMetadata);
|
|
382
|
+
function typeCheckConfig$e(untrustedConfig) {
|
|
383
383
|
const config = {};
|
|
384
|
-
typeCheckConfig$
|
|
384
|
+
typeCheckConfig$f(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$c(untrustedConfig) {
|
|
|
391
391
|
}
|
|
392
392
|
return config;
|
|
393
393
|
}
|
|
394
|
-
function validateAdapterConfig$
|
|
394
|
+
function validateAdapterConfig$e(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$e(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$e(luvio, config, options) {
|
|
408
|
+
const resourceParams = createResourceParams$e(config);
|
|
409
|
+
const request = createResourceRequest$e(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$c(luvio, resourceParams, response);
|
|
414
414
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
415
415
|
}, () => {
|
|
416
416
|
const cache = new StoreKeyMap();
|
|
417
|
-
getResponseCacheKeys$
|
|
417
|
+
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
418
418
|
return cache;
|
|
419
419
|
});
|
|
420
420
|
}, (response) => {
|
|
@@ -424,21 +424,26 @@ function buildNetworkSnapshot$c(luvio, config, options) {
|
|
|
424
424
|
}
|
|
425
425
|
const queryAssetsAdapterFactory = (luvio) => {
|
|
426
426
|
return function queryAssets(untrustedConfig) {
|
|
427
|
-
const config = validateAdapterConfig$
|
|
427
|
+
const config = validateAdapterConfig$e(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$e(luvio, config);
|
|
433
433
|
};
|
|
434
434
|
};
|
|
435
435
|
|
|
436
|
-
const VERSION$
|
|
437
|
-
function validate$
|
|
436
|
+
const VERSION$8 = "d2ae5ba5bf518760e6df8195c528fdee";
|
|
437
|
+
function validate$f(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 + '")');
|
|
441
441
|
}
|
|
442
|
+
const obj_cacheableKey = obj.cacheableKey;
|
|
443
|
+
const path_cacheableKey = path + '.cacheableKey';
|
|
444
|
+
if (typeof obj_cacheableKey !== 'string') {
|
|
445
|
+
return new TypeError('Expected "string" but received "' + typeof obj_cacheableKey + '" (at "' + path_cacheableKey + '")');
|
|
446
|
+
}
|
|
442
447
|
const obj_createdBy = obj.createdBy;
|
|
443
448
|
const path_createdBy = path + '.createdBy';
|
|
444
449
|
if (obj_createdBy === undefined) {
|
|
@@ -519,57 +524,57 @@ function validate$e(obj, path = 'DashboardRepresentation') {
|
|
|
519
524
|
})();
|
|
520
525
|
return v_error === undefined ? null : v_error;
|
|
521
526
|
}
|
|
522
|
-
const RepresentationType$
|
|
523
|
-
function keyBuilder$
|
|
524
|
-
return keyPrefix + '::' + RepresentationType$
|
|
527
|
+
const RepresentationType$8 = 'DashboardRepresentation';
|
|
528
|
+
function keyBuilder$j(luvio, config) {
|
|
529
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + config.name;
|
|
525
530
|
}
|
|
526
|
-
function keyBuilderFromType$
|
|
531
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
527
532
|
const keyParams = {
|
|
528
|
-
name: object.
|
|
533
|
+
name: object.cacheableKey
|
|
529
534
|
};
|
|
530
|
-
return keyBuilder$
|
|
535
|
+
return keyBuilder$j(luvio, keyParams);
|
|
531
536
|
}
|
|
532
|
-
function normalize$
|
|
537
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
533
538
|
return input;
|
|
534
539
|
}
|
|
535
|
-
const select$
|
|
540
|
+
const select$k = function DashboardRepresentationSelect() {
|
|
536
541
|
return {
|
|
537
542
|
kind: 'Fragment',
|
|
538
|
-
version: VERSION$
|
|
543
|
+
version: VERSION$8,
|
|
539
544
|
private: [],
|
|
540
545
|
opaque: true
|
|
541
546
|
};
|
|
542
547
|
};
|
|
543
|
-
function equals$
|
|
548
|
+
function equals$8(existing, incoming) {
|
|
544
549
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
545
550
|
return false;
|
|
546
551
|
}
|
|
547
552
|
return true;
|
|
548
553
|
}
|
|
549
|
-
const ingest$
|
|
554
|
+
const ingest$8 = function DashboardRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
550
555
|
if (process.env.NODE_ENV !== 'production') {
|
|
551
|
-
const validateError = validate$
|
|
556
|
+
const validateError = validate$f(input);
|
|
552
557
|
if (validateError !== null) {
|
|
553
558
|
throw validateError;
|
|
554
559
|
}
|
|
555
560
|
}
|
|
556
|
-
const key = keyBuilderFromType$
|
|
561
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
557
562
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
558
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
563
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "UnifiedAnalytics", VERSION$8, RepresentationType$8, equals$8);
|
|
559
564
|
return createLink(key);
|
|
560
565
|
};
|
|
561
|
-
function getTypeCacheKeys$
|
|
566
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
562
567
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
563
|
-
const rootKey = keyBuilderFromType$
|
|
568
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
564
569
|
rootKeySet.set(rootKey, {
|
|
565
570
|
namespace: keyPrefix,
|
|
566
|
-
representationName: RepresentationType$
|
|
571
|
+
representationName: RepresentationType$8,
|
|
567
572
|
mergeable: false
|
|
568
573
|
});
|
|
569
574
|
}
|
|
570
575
|
|
|
571
|
-
const VERSION$
|
|
572
|
-
function validate$
|
|
576
|
+
const VERSION$7 = "962823130e6a9315240ef0e0f0c5f757";
|
|
577
|
+
function validate$e(obj, path = 'DashboardCollectionRepresentation') {
|
|
573
578
|
const v_error = (() => {
|
|
574
579
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
575
580
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -589,14 +594,14 @@ function validate$d(obj, path = 'DashboardCollectionRepresentation') {
|
|
|
589
594
|
})();
|
|
590
595
|
return v_error === undefined ? null : v_error;
|
|
591
596
|
}
|
|
592
|
-
const RepresentationType$
|
|
593
|
-
function normalize$
|
|
597
|
+
const RepresentationType$7 = 'DashboardCollectionRepresentation';
|
|
598
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
594
599
|
const input_dashboards = input.dashboards;
|
|
595
600
|
const input_dashboards_id = path.fullPath + '__dashboards';
|
|
596
601
|
for (let i = 0; i < input_dashboards.length; i++) {
|
|
597
602
|
const input_dashboards_item = input_dashboards[i];
|
|
598
603
|
let input_dashboards_item_id = input_dashboards_id + '__' + i;
|
|
599
|
-
input_dashboards[i] = ingest$
|
|
604
|
+
input_dashboards[i] = ingest$8(input_dashboards_item, {
|
|
600
605
|
fullPath: input_dashboards_item_id,
|
|
601
606
|
propertyName: i,
|
|
602
607
|
parent: {
|
|
@@ -609,22 +614,22 @@ function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
|
609
614
|
}
|
|
610
615
|
return input;
|
|
611
616
|
}
|
|
612
|
-
const select$
|
|
617
|
+
const select$j = function DashboardCollectionRepresentationSelect() {
|
|
613
618
|
return {
|
|
614
619
|
kind: 'Fragment',
|
|
615
|
-
version: VERSION$
|
|
620
|
+
version: VERSION$7,
|
|
616
621
|
private: [],
|
|
617
622
|
selections: [
|
|
618
623
|
{
|
|
619
624
|
name: 'dashboards',
|
|
620
625
|
kind: 'Link',
|
|
621
626
|
plural: true,
|
|
622
|
-
fragment: select$
|
|
627
|
+
fragment: select$k()
|
|
623
628
|
}
|
|
624
629
|
]
|
|
625
630
|
};
|
|
626
631
|
};
|
|
627
|
-
function equals$
|
|
632
|
+
function equals$7(existing, incoming) {
|
|
628
633
|
const existing_dashboards = existing.dashboards;
|
|
629
634
|
const incoming_dashboards = incoming.dashboards;
|
|
630
635
|
const equals_dashboards_items = equalsArray(existing_dashboards, incoming_dashboards, (existing_dashboards_item, incoming_dashboards_item) => {
|
|
@@ -637,48 +642,48 @@ function equals$6(existing, incoming) {
|
|
|
637
642
|
}
|
|
638
643
|
return true;
|
|
639
644
|
}
|
|
640
|
-
const ingest$
|
|
645
|
+
const ingest$7 = function DashboardCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
641
646
|
if (process.env.NODE_ENV !== 'production') {
|
|
642
|
-
const validateError = validate$
|
|
647
|
+
const validateError = validate$e(input);
|
|
643
648
|
if (validateError !== null) {
|
|
644
649
|
throw validateError;
|
|
645
650
|
}
|
|
646
651
|
}
|
|
647
652
|
const key = path.fullPath;
|
|
648
653
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
649
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
654
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "UnifiedAnalytics", VERSION$7, RepresentationType$7, equals$7);
|
|
650
655
|
return createLink(key);
|
|
651
656
|
};
|
|
652
|
-
function getTypeCacheKeys$
|
|
657
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
653
658
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
654
659
|
const rootKey = fullPathFactory();
|
|
655
660
|
rootKeySet.set(rootKey, {
|
|
656
661
|
namespace: keyPrefix,
|
|
657
|
-
representationName: RepresentationType$
|
|
662
|
+
representationName: RepresentationType$7,
|
|
658
663
|
mergeable: false
|
|
659
664
|
});
|
|
660
665
|
const input_dashboards_length = input.dashboards.length;
|
|
661
666
|
for (let i = 0; i < input_dashboards_length; i++) {
|
|
662
|
-
getTypeCacheKeys$
|
|
667
|
+
getTypeCacheKeys$8(rootKeySet, luvio, input.dashboards[i]);
|
|
663
668
|
}
|
|
664
669
|
}
|
|
665
670
|
|
|
666
|
-
function select$
|
|
667
|
-
return select$
|
|
671
|
+
function select$i(luvio, params) {
|
|
672
|
+
return select$j();
|
|
668
673
|
}
|
|
669
|
-
function keyBuilder$
|
|
674
|
+
function keyBuilder$i(luvio, params) {
|
|
670
675
|
return keyPrefix + '::DashboardCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
|
|
671
676
|
}
|
|
672
|
-
function getResponseCacheKeys$
|
|
673
|
-
getTypeCacheKeys$
|
|
677
|
+
function getResponseCacheKeys$d(storeKeyMap, luvio, resourceParams, response) {
|
|
678
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response, () => keyBuilder$i(luvio, resourceParams));
|
|
674
679
|
}
|
|
675
|
-
function ingestSuccess$
|
|
680
|
+
function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
676
681
|
const { body } = response;
|
|
677
|
-
const key = keyBuilder$
|
|
678
|
-
luvio.storeIngest(key, ingest$
|
|
682
|
+
const key = keyBuilder$i(luvio, resourceParams);
|
|
683
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
679
684
|
const snapshot = luvio.storeLookup({
|
|
680
685
|
recordId: key,
|
|
681
|
-
node: select$
|
|
686
|
+
node: select$i(),
|
|
682
687
|
variables: {},
|
|
683
688
|
}, snapshotRefresh);
|
|
684
689
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -689,13 +694,13 @@ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
689
694
|
deepFreeze(snapshot.data);
|
|
690
695
|
return snapshot;
|
|
691
696
|
}
|
|
692
|
-
function ingestError$
|
|
693
|
-
const key = keyBuilder$
|
|
697
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
698
|
+
const key = keyBuilder$i(luvio, params);
|
|
694
699
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
695
700
|
luvio.storeIngestError(key, errorSnapshot);
|
|
696
701
|
return errorSnapshot;
|
|
697
702
|
}
|
|
698
|
-
function createResourceRequest$
|
|
703
|
+
function createResourceRequest$d(config) {
|
|
699
704
|
const headers = {};
|
|
700
705
|
return {
|
|
701
706
|
baseUri: '/services/data/v62.0',
|
|
@@ -709,106 +714,106 @@ function createResourceRequest$b(config) {
|
|
|
709
714
|
};
|
|
710
715
|
}
|
|
711
716
|
|
|
712
|
-
const adapterName$
|
|
717
|
+
const adapterName$d = 'getDashboards';
|
|
713
718
|
const getDashboards_ConfigPropertyMetadata = [
|
|
714
719
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
715
720
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
716
721
|
];
|
|
717
|
-
const getDashboards_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
718
|
-
const createResourceParams$
|
|
719
|
-
function keyBuilder$
|
|
720
|
-
const resourceParams = createResourceParams$
|
|
721
|
-
return keyBuilder$
|
|
722
|
+
const getDashboards_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, getDashboards_ConfigPropertyMetadata);
|
|
723
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$f(getDashboards_ConfigPropertyMetadata);
|
|
724
|
+
function keyBuilder$h(luvio, config) {
|
|
725
|
+
const resourceParams = createResourceParams$d(config);
|
|
726
|
+
return keyBuilder$i(luvio, resourceParams);
|
|
722
727
|
}
|
|
723
|
-
function typeCheckConfig$
|
|
728
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
724
729
|
const config = {};
|
|
725
|
-
typeCheckConfig$
|
|
730
|
+
typeCheckConfig$f(untrustedConfig, config, getDashboards_ConfigPropertyMetadata);
|
|
726
731
|
return config;
|
|
727
732
|
}
|
|
728
|
-
function validateAdapterConfig$
|
|
733
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
729
734
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
730
735
|
return null;
|
|
731
736
|
}
|
|
732
737
|
if (process.env.NODE_ENV !== 'production') {
|
|
733
738
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
734
739
|
}
|
|
735
|
-
const config = typeCheckConfig$
|
|
740
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
736
741
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
737
742
|
return null;
|
|
738
743
|
}
|
|
739
744
|
return config;
|
|
740
745
|
}
|
|
741
|
-
function adapterFragment$
|
|
742
|
-
createResourceParams$
|
|
743
|
-
return select$
|
|
746
|
+
function adapterFragment$5(luvio, config) {
|
|
747
|
+
createResourceParams$d(config);
|
|
748
|
+
return select$i();
|
|
744
749
|
}
|
|
745
|
-
function onFetchResponseSuccess$
|
|
746
|
-
const snapshot = ingestSuccess$
|
|
750
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
751
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
|
|
747
752
|
config,
|
|
748
|
-
resolve: () => buildNetworkSnapshot$
|
|
753
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
749
754
|
});
|
|
750
755
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
751
756
|
}
|
|
752
|
-
function onFetchResponseError$
|
|
753
|
-
const snapshot = ingestError$
|
|
757
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
758
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
754
759
|
config,
|
|
755
|
-
resolve: () => buildNetworkSnapshot$
|
|
760
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
756
761
|
});
|
|
757
762
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
758
763
|
}
|
|
759
|
-
function buildNetworkSnapshot$
|
|
760
|
-
const resourceParams = createResourceParams$
|
|
761
|
-
const request = createResourceRequest$
|
|
764
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
765
|
+
const resourceParams = createResourceParams$d(config);
|
|
766
|
+
const request = createResourceRequest$d(resourceParams);
|
|
762
767
|
return luvio.dispatchResourceRequest(request, options)
|
|
763
768
|
.then((response) => {
|
|
764
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
769
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
765
770
|
const cache = new StoreKeyMap();
|
|
766
|
-
getResponseCacheKeys$
|
|
771
|
+
getResponseCacheKeys$d(cache, luvio, resourceParams, response.body);
|
|
767
772
|
return cache;
|
|
768
773
|
});
|
|
769
774
|
}, (response) => {
|
|
770
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
775
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
771
776
|
});
|
|
772
777
|
}
|
|
773
|
-
function buildNetworkSnapshotCachePolicy$
|
|
774
|
-
return buildNetworkSnapshotCachePolicy$
|
|
778
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
779
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$d, undefined, false);
|
|
775
780
|
}
|
|
776
|
-
function buildCachedSnapshotCachePolicy$
|
|
781
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
777
782
|
const { luvio, config } = context;
|
|
778
783
|
const selector = {
|
|
779
|
-
recordId: keyBuilder$
|
|
780
|
-
node: adapterFragment$
|
|
784
|
+
recordId: keyBuilder$h(luvio, config),
|
|
785
|
+
node: adapterFragment$5(luvio, config),
|
|
781
786
|
variables: {},
|
|
782
787
|
};
|
|
783
788
|
const cacheSnapshot = storeLookup(selector, {
|
|
784
789
|
config,
|
|
785
|
-
resolve: () => buildNetworkSnapshot$
|
|
790
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
786
791
|
});
|
|
787
792
|
return cacheSnapshot;
|
|
788
793
|
}
|
|
789
794
|
const getDashboardsAdapterFactory = (luvio) => function UnifiedAnalytics__getDashboards(untrustedConfig, requestContext) {
|
|
790
|
-
const config = validateAdapterConfig$
|
|
795
|
+
const config = validateAdapterConfig$d(untrustedConfig, getDashboards_ConfigPropertyNames);
|
|
791
796
|
// Invalid or incomplete config
|
|
792
797
|
if (config === null) {
|
|
793
798
|
return null;
|
|
794
799
|
}
|
|
795
800
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
796
|
-
buildCachedSnapshotCachePolicy$
|
|
801
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
797
802
|
};
|
|
798
803
|
|
|
799
|
-
function select$
|
|
800
|
-
return select$
|
|
804
|
+
function select$h(luvio, params) {
|
|
805
|
+
return select$k();
|
|
801
806
|
}
|
|
802
|
-
function getResponseCacheKeys$
|
|
803
|
-
getTypeCacheKeys$
|
|
807
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
808
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
804
809
|
}
|
|
805
|
-
function ingestSuccess$
|
|
810
|
+
function ingestSuccess$a(luvio, resourceParams, response) {
|
|
806
811
|
const { body } = response;
|
|
807
|
-
const key = keyBuilderFromType$
|
|
808
|
-
luvio.storeIngest(key, ingest$
|
|
812
|
+
const key = keyBuilderFromType$5(luvio, body);
|
|
813
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
809
814
|
const snapshot = luvio.storeLookup({
|
|
810
815
|
recordId: key,
|
|
811
|
-
node: select$
|
|
816
|
+
node: select$h(),
|
|
812
817
|
variables: {},
|
|
813
818
|
});
|
|
814
819
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -819,7 +824,7 @@ function ingestSuccess$8(luvio, resourceParams, response) {
|
|
|
819
824
|
deepFreeze(snapshot.data);
|
|
820
825
|
return snapshot;
|
|
821
826
|
}
|
|
822
|
-
function createResourceRequest$
|
|
827
|
+
function createResourceRequest$c(config) {
|
|
823
828
|
const headers = {};
|
|
824
829
|
return {
|
|
825
830
|
baseUri: '/services/data/v62.0',
|
|
@@ -833,7 +838,7 @@ function createResourceRequest$a(config) {
|
|
|
833
838
|
};
|
|
834
839
|
}
|
|
835
840
|
|
|
836
|
-
const adapterName$
|
|
841
|
+
const adapterName$c = 'createDashboard';
|
|
837
842
|
const createDashboard_ConfigPropertyMetadata = [
|
|
838
843
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
839
844
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
@@ -842,11 +847,11 @@ const createDashboard_ConfigPropertyMetadata = [
|
|
|
842
847
|
generateParamConfigMetadata('layouts', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
843
848
|
generateParamConfigMetadata('widgets', true, 2 /* Body */, 4 /* Unsupported */),
|
|
844
849
|
];
|
|
845
|
-
const createDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
846
|
-
const createResourceParams$
|
|
847
|
-
function typeCheckConfig$
|
|
850
|
+
const createDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, createDashboard_ConfigPropertyMetadata);
|
|
851
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$f(createDashboard_ConfigPropertyMetadata);
|
|
852
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
848
853
|
const config = {};
|
|
849
|
-
typeCheckConfig$
|
|
854
|
+
typeCheckConfig$f(untrustedConfig, config, createDashboard_ConfigPropertyMetadata);
|
|
850
855
|
const untrustedConfig_layouts = untrustedConfig.layouts;
|
|
851
856
|
if (ArrayIsArray$1(untrustedConfig_layouts)) {
|
|
852
857
|
const untrustedConfig_layouts_array = [];
|
|
@@ -873,30 +878,30 @@ function typeCheckConfig$a(untrustedConfig) {
|
|
|
873
878
|
}
|
|
874
879
|
return config;
|
|
875
880
|
}
|
|
876
|
-
function validateAdapterConfig$
|
|
881
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
877
882
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
878
883
|
return null;
|
|
879
884
|
}
|
|
880
885
|
if (process.env.NODE_ENV !== 'production') {
|
|
881
886
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
882
887
|
}
|
|
883
|
-
const config = typeCheckConfig$
|
|
888
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
884
889
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
885
890
|
return null;
|
|
886
891
|
}
|
|
887
892
|
return config;
|
|
888
893
|
}
|
|
889
|
-
function buildNetworkSnapshot$
|
|
890
|
-
const resourceParams = createResourceParams$
|
|
891
|
-
const request = createResourceRequest$
|
|
894
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
895
|
+
const resourceParams = createResourceParams$c(config);
|
|
896
|
+
const request = createResourceRequest$c(resourceParams);
|
|
892
897
|
return luvio.dispatchResourceRequest(request, options)
|
|
893
898
|
.then((response) => {
|
|
894
899
|
return luvio.handleSuccessResponse(() => {
|
|
895
|
-
const snapshot = ingestSuccess$
|
|
900
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response);
|
|
896
901
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
897
902
|
}, () => {
|
|
898
903
|
const cache = new StoreKeyMap();
|
|
899
|
-
getResponseCacheKeys$
|
|
904
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
900
905
|
return cache;
|
|
901
906
|
});
|
|
902
907
|
}, (response) => {
|
|
@@ -906,33 +911,33 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
906
911
|
}
|
|
907
912
|
const createDashboardAdapterFactory = (luvio) => {
|
|
908
913
|
return function createDashboard(untrustedConfig) {
|
|
909
|
-
const config = validateAdapterConfig$
|
|
914
|
+
const config = validateAdapterConfig$c(untrustedConfig, createDashboard_ConfigPropertyNames);
|
|
910
915
|
// Invalid or incomplete config
|
|
911
916
|
if (config === null) {
|
|
912
917
|
throw new Error('Invalid config for "createDashboard"');
|
|
913
918
|
}
|
|
914
|
-
return buildNetworkSnapshot$
|
|
919
|
+
return buildNetworkSnapshot$c(luvio, config);
|
|
915
920
|
};
|
|
916
921
|
};
|
|
917
922
|
|
|
918
|
-
function keyBuilder$
|
|
919
|
-
return keyBuilder$
|
|
923
|
+
function keyBuilder$g(luvio, params) {
|
|
924
|
+
return keyBuilder$j(luvio, {
|
|
920
925
|
name: params.urlParams.dashboardIdOrApiName
|
|
921
926
|
});
|
|
922
927
|
}
|
|
923
|
-
function getResponseCacheKeys$
|
|
924
|
-
const key = keyBuilder$
|
|
928
|
+
function getResponseCacheKeys$b(cacheKeyMap, luvio, resourceParams) {
|
|
929
|
+
const key = keyBuilder$g(luvio, resourceParams);
|
|
925
930
|
cacheKeyMap.set(key, {
|
|
926
931
|
namespace: keyPrefix,
|
|
927
|
-
representationName: RepresentationType$
|
|
932
|
+
representationName: RepresentationType$8,
|
|
928
933
|
mergeable: false
|
|
929
934
|
});
|
|
930
935
|
}
|
|
931
936
|
function evictSuccess$1(luvio, resourceParams) {
|
|
932
|
-
const key = keyBuilder$
|
|
937
|
+
const key = keyBuilder$g(luvio, resourceParams);
|
|
933
938
|
luvio.storeEvict(key);
|
|
934
939
|
}
|
|
935
|
-
function createResourceRequest$
|
|
940
|
+
function createResourceRequest$b(config) {
|
|
936
941
|
const headers = {};
|
|
937
942
|
return {
|
|
938
943
|
baseUri: '/services/data/v62.0',
|
|
@@ -946,33 +951,33 @@ function createResourceRequest$9(config) {
|
|
|
946
951
|
};
|
|
947
952
|
}
|
|
948
953
|
|
|
949
|
-
const adapterName$
|
|
954
|
+
const adapterName$b = 'deleteDashboard';
|
|
950
955
|
const deleteDashboard_ConfigPropertyMetadata = [
|
|
951
956
|
generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
952
957
|
];
|
|
953
|
-
const deleteDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
954
|
-
const createResourceParams$
|
|
955
|
-
function typeCheckConfig$
|
|
958
|
+
const deleteDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, deleteDashboard_ConfigPropertyMetadata);
|
|
959
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$f(deleteDashboard_ConfigPropertyMetadata);
|
|
960
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
956
961
|
const config = {};
|
|
957
|
-
typeCheckConfig$
|
|
962
|
+
typeCheckConfig$f(untrustedConfig, config, deleteDashboard_ConfigPropertyMetadata);
|
|
958
963
|
return config;
|
|
959
964
|
}
|
|
960
|
-
function validateAdapterConfig$
|
|
965
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
961
966
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
962
967
|
return null;
|
|
963
968
|
}
|
|
964
969
|
if (process.env.NODE_ENV !== 'production') {
|
|
965
970
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
966
971
|
}
|
|
967
|
-
const config = typeCheckConfig$
|
|
972
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
968
973
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
969
974
|
return null;
|
|
970
975
|
}
|
|
971
976
|
return config;
|
|
972
977
|
}
|
|
973
|
-
function buildNetworkSnapshot$
|
|
974
|
-
const resourceParams = createResourceParams$
|
|
975
|
-
const request = createResourceRequest$
|
|
978
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
979
|
+
const resourceParams = createResourceParams$b(config);
|
|
980
|
+
const request = createResourceRequest$b(resourceParams);
|
|
976
981
|
return luvio.dispatchResourceRequest(request, options)
|
|
977
982
|
.then(() => {
|
|
978
983
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -980,7 +985,7 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
980
985
|
return luvio.storeBroadcast();
|
|
981
986
|
}, () => {
|
|
982
987
|
const cache = new StoreKeyMap();
|
|
983
|
-
getResponseCacheKeys$
|
|
988
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams);
|
|
984
989
|
return cache;
|
|
985
990
|
});
|
|
986
991
|
}, (response) => {
|
|
@@ -990,33 +995,33 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
990
995
|
}
|
|
991
996
|
const deleteDashboardAdapterFactory = (luvio) => {
|
|
992
997
|
return function UnifiedAnalyticsdeleteDashboard(untrustedConfig) {
|
|
993
|
-
const config = validateAdapterConfig$
|
|
998
|
+
const config = validateAdapterConfig$b(untrustedConfig, deleteDashboard_ConfigPropertyNames);
|
|
994
999
|
// Invalid or incomplete config
|
|
995
1000
|
if (config === null) {
|
|
996
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
1001
|
+
throw new Error(`Invalid config for "${adapterName$b}"`);
|
|
997
1002
|
}
|
|
998
|
-
return buildNetworkSnapshot$
|
|
1003
|
+
return buildNetworkSnapshot$b(luvio, config);
|
|
999
1004
|
};
|
|
1000
1005
|
};
|
|
1001
1006
|
|
|
1002
|
-
function select$
|
|
1003
|
-
return select$
|
|
1007
|
+
function select$g(luvio, params) {
|
|
1008
|
+
return select$k();
|
|
1004
1009
|
}
|
|
1005
|
-
function keyBuilder$
|
|
1006
|
-
return keyBuilder$
|
|
1010
|
+
function keyBuilder$f(luvio, params) {
|
|
1011
|
+
return keyBuilder$j(luvio, {
|
|
1007
1012
|
name: params.urlParams.dashboardIdOrApiName
|
|
1008
1013
|
});
|
|
1009
1014
|
}
|
|
1010
|
-
function getResponseCacheKeys$
|
|
1011
|
-
getTypeCacheKeys$
|
|
1015
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
1016
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
1012
1017
|
}
|
|
1013
|
-
function ingestSuccess$
|
|
1018
|
+
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
1014
1019
|
const { body } = response;
|
|
1015
|
-
const key = keyBuilder$
|
|
1016
|
-
luvio.storeIngest(key, ingest$
|
|
1020
|
+
const key = keyBuilder$f(luvio, resourceParams);
|
|
1021
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
1017
1022
|
const snapshot = luvio.storeLookup({
|
|
1018
1023
|
recordId: key,
|
|
1019
|
-
node: select$
|
|
1024
|
+
node: select$g(),
|
|
1020
1025
|
variables: {},
|
|
1021
1026
|
}, snapshotRefresh);
|
|
1022
1027
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1027,13 +1032,13 @@ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1027
1032
|
deepFreeze(snapshot.data);
|
|
1028
1033
|
return snapshot;
|
|
1029
1034
|
}
|
|
1030
|
-
function ingestError$
|
|
1031
|
-
const key = keyBuilder$
|
|
1035
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
1036
|
+
const key = keyBuilder$f(luvio, params);
|
|
1032
1037
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1033
1038
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1034
1039
|
return errorSnapshot;
|
|
1035
1040
|
}
|
|
1036
|
-
function createResourceRequest$
|
|
1041
|
+
function createResourceRequest$a(config) {
|
|
1037
1042
|
const headers = {};
|
|
1038
1043
|
return {
|
|
1039
1044
|
baseUri: '/services/data/v62.0',
|
|
@@ -1047,105 +1052,105 @@ function createResourceRequest$8(config) {
|
|
|
1047
1052
|
};
|
|
1048
1053
|
}
|
|
1049
1054
|
|
|
1050
|
-
const adapterName$
|
|
1055
|
+
const adapterName$a = 'getDashboardByName';
|
|
1051
1056
|
const getDashboardByName_ConfigPropertyMetadata = [
|
|
1052
1057
|
generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1053
1058
|
];
|
|
1054
|
-
const getDashboardByName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1055
|
-
const createResourceParams$
|
|
1056
|
-
function keyBuilder$
|
|
1057
|
-
const resourceParams = createResourceParams$
|
|
1058
|
-
return keyBuilder$
|
|
1059
|
+
const getDashboardByName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getDashboardByName_ConfigPropertyMetadata);
|
|
1060
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$f(getDashboardByName_ConfigPropertyMetadata);
|
|
1061
|
+
function keyBuilder$e(luvio, config) {
|
|
1062
|
+
const resourceParams = createResourceParams$a(config);
|
|
1063
|
+
return keyBuilder$f(luvio, resourceParams);
|
|
1059
1064
|
}
|
|
1060
|
-
function typeCheckConfig$
|
|
1065
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
1061
1066
|
const config = {};
|
|
1062
|
-
typeCheckConfig$
|
|
1067
|
+
typeCheckConfig$f(untrustedConfig, config, getDashboardByName_ConfigPropertyMetadata);
|
|
1063
1068
|
return config;
|
|
1064
1069
|
}
|
|
1065
|
-
function validateAdapterConfig$
|
|
1070
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
1066
1071
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1067
1072
|
return null;
|
|
1068
1073
|
}
|
|
1069
1074
|
if (process.env.NODE_ENV !== 'production') {
|
|
1070
1075
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1071
1076
|
}
|
|
1072
|
-
const config = typeCheckConfig$
|
|
1077
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
1073
1078
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1074
1079
|
return null;
|
|
1075
1080
|
}
|
|
1076
1081
|
return config;
|
|
1077
1082
|
}
|
|
1078
|
-
function adapterFragment$
|
|
1079
|
-
createResourceParams$
|
|
1080
|
-
return select$
|
|
1083
|
+
function adapterFragment$4(luvio, config) {
|
|
1084
|
+
createResourceParams$a(config);
|
|
1085
|
+
return select$g();
|
|
1081
1086
|
}
|
|
1082
|
-
function onFetchResponseSuccess$
|
|
1083
|
-
const snapshot = ingestSuccess$
|
|
1087
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
1088
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
1084
1089
|
config,
|
|
1085
|
-
resolve: () => buildNetworkSnapshot$
|
|
1090
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
1086
1091
|
});
|
|
1087
1092
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1088
1093
|
}
|
|
1089
|
-
function onFetchResponseError$
|
|
1090
|
-
const snapshot = ingestError$
|
|
1094
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
1095
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
1091
1096
|
config,
|
|
1092
|
-
resolve: () => buildNetworkSnapshot$
|
|
1097
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
1093
1098
|
});
|
|
1094
1099
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1095
1100
|
}
|
|
1096
|
-
function buildNetworkSnapshot$
|
|
1097
|
-
const resourceParams = createResourceParams$
|
|
1098
|
-
const request = createResourceRequest$
|
|
1101
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
1102
|
+
const resourceParams = createResourceParams$a(config);
|
|
1103
|
+
const request = createResourceRequest$a(resourceParams);
|
|
1099
1104
|
return luvio.dispatchResourceRequest(request, options)
|
|
1100
1105
|
.then((response) => {
|
|
1101
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1106
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
1102
1107
|
const cache = new StoreKeyMap();
|
|
1103
|
-
getResponseCacheKeys$
|
|
1108
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
1104
1109
|
return cache;
|
|
1105
1110
|
});
|
|
1106
1111
|
}, (response) => {
|
|
1107
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1112
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
1108
1113
|
});
|
|
1109
1114
|
}
|
|
1110
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1111
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1115
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
1116
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
|
|
1112
1117
|
}
|
|
1113
|
-
function buildCachedSnapshotCachePolicy$
|
|
1118
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
1114
1119
|
const { luvio, config } = context;
|
|
1115
1120
|
const selector = {
|
|
1116
|
-
recordId: keyBuilder$
|
|
1117
|
-
node: adapterFragment$
|
|
1121
|
+
recordId: keyBuilder$e(luvio, config),
|
|
1122
|
+
node: adapterFragment$4(luvio, config),
|
|
1118
1123
|
variables: {},
|
|
1119
1124
|
};
|
|
1120
1125
|
const cacheSnapshot = storeLookup(selector, {
|
|
1121
1126
|
config,
|
|
1122
|
-
resolve: () => buildNetworkSnapshot$
|
|
1127
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
1123
1128
|
});
|
|
1124
1129
|
return cacheSnapshot;
|
|
1125
1130
|
}
|
|
1126
1131
|
const getDashboardByNameAdapterFactory = (luvio) => function UnifiedAnalytics__getDashboardByName(untrustedConfig, requestContext) {
|
|
1127
|
-
const config = validateAdapterConfig$
|
|
1132
|
+
const config = validateAdapterConfig$a(untrustedConfig, getDashboardByName_ConfigPropertyNames);
|
|
1128
1133
|
// Invalid or incomplete config
|
|
1129
1134
|
if (config === null) {
|
|
1130
1135
|
return null;
|
|
1131
1136
|
}
|
|
1132
1137
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1133
|
-
buildCachedSnapshotCachePolicy$
|
|
1138
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
1134
1139
|
};
|
|
1135
1140
|
|
|
1136
|
-
function select$
|
|
1137
|
-
return select$
|
|
1141
|
+
function select$f(luvio, params) {
|
|
1142
|
+
return select$k();
|
|
1138
1143
|
}
|
|
1139
|
-
function getResponseCacheKeys$
|
|
1140
|
-
getTypeCacheKeys$
|
|
1144
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
1145
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
1141
1146
|
}
|
|
1142
|
-
function ingestSuccess$
|
|
1147
|
+
function ingestSuccess$8(luvio, resourceParams, response) {
|
|
1143
1148
|
const { body } = response;
|
|
1144
|
-
const key = keyBuilderFromType$
|
|
1145
|
-
luvio.storeIngest(key, ingest$
|
|
1149
|
+
const key = keyBuilderFromType$5(luvio, body);
|
|
1150
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
1146
1151
|
const snapshot = luvio.storeLookup({
|
|
1147
1152
|
recordId: key,
|
|
1148
|
-
node: select$
|
|
1153
|
+
node: select$f(),
|
|
1149
1154
|
variables: {},
|
|
1150
1155
|
});
|
|
1151
1156
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1156,7 +1161,7 @@ function ingestSuccess$6(luvio, resourceParams, response) {
|
|
|
1156
1161
|
deepFreeze(snapshot.data);
|
|
1157
1162
|
return snapshot;
|
|
1158
1163
|
}
|
|
1159
|
-
function createResourceRequest$
|
|
1164
|
+
function createResourceRequest$9(config) {
|
|
1160
1165
|
const headers = {};
|
|
1161
1166
|
return {
|
|
1162
1167
|
baseUri: '/services/data/v62.0',
|
|
@@ -1170,7 +1175,7 @@ function createResourceRequest$7(config) {
|
|
|
1170
1175
|
};
|
|
1171
1176
|
}
|
|
1172
1177
|
|
|
1173
|
-
const adapterName$
|
|
1178
|
+
const adapterName$9 = 'updateDashboard';
|
|
1174
1179
|
const updateDashboard_ConfigPropertyMetadata = [
|
|
1175
1180
|
generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1176
1181
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
@@ -1180,11 +1185,11 @@ const updateDashboard_ConfigPropertyMetadata = [
|
|
|
1180
1185
|
generateParamConfigMetadata('layouts', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1181
1186
|
generateParamConfigMetadata('widgets', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1182
1187
|
];
|
|
1183
|
-
const updateDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1184
|
-
const createResourceParams$
|
|
1185
|
-
function typeCheckConfig$
|
|
1188
|
+
const updateDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, updateDashboard_ConfigPropertyMetadata);
|
|
1189
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$f(updateDashboard_ConfigPropertyMetadata);
|
|
1190
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
1186
1191
|
const config = {};
|
|
1187
|
-
typeCheckConfig$
|
|
1192
|
+
typeCheckConfig$f(untrustedConfig, config, updateDashboard_ConfigPropertyMetadata);
|
|
1188
1193
|
const untrustedConfig_layouts = untrustedConfig.layouts;
|
|
1189
1194
|
if (ArrayIsArray$1(untrustedConfig_layouts)) {
|
|
1190
1195
|
const untrustedConfig_layouts_array = [];
|
|
@@ -1211,30 +1216,30 @@ function typeCheckConfig$7(untrustedConfig) {
|
|
|
1211
1216
|
}
|
|
1212
1217
|
return config;
|
|
1213
1218
|
}
|
|
1214
|
-
function validateAdapterConfig$
|
|
1219
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
1215
1220
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1216
1221
|
return null;
|
|
1217
1222
|
}
|
|
1218
1223
|
if (process.env.NODE_ENV !== 'production') {
|
|
1219
1224
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1220
1225
|
}
|
|
1221
|
-
const config = typeCheckConfig$
|
|
1226
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
1222
1227
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1223
1228
|
return null;
|
|
1224
1229
|
}
|
|
1225
1230
|
return config;
|
|
1226
1231
|
}
|
|
1227
|
-
function buildNetworkSnapshot$
|
|
1228
|
-
const resourceParams = createResourceParams$
|
|
1229
|
-
const request = createResourceRequest$
|
|
1232
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
1233
|
+
const resourceParams = createResourceParams$9(config);
|
|
1234
|
+
const request = createResourceRequest$9(resourceParams);
|
|
1230
1235
|
return luvio.dispatchResourceRequest(request, options)
|
|
1231
1236
|
.then((response) => {
|
|
1232
1237
|
return luvio.handleSuccessResponse(() => {
|
|
1233
|
-
const snapshot = ingestSuccess$
|
|
1238
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response);
|
|
1234
1239
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1235
1240
|
}, () => {
|
|
1236
1241
|
const cache = new StoreKeyMap();
|
|
1237
|
-
getResponseCacheKeys$
|
|
1242
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
1238
1243
|
return cache;
|
|
1239
1244
|
});
|
|
1240
1245
|
}, (response) => {
|
|
@@ -1244,24 +1249,24 @@ function buildNetworkSnapshot$7(luvio, config, options) {
|
|
|
1244
1249
|
}
|
|
1245
1250
|
const updateDashboardAdapterFactory = (luvio) => {
|
|
1246
1251
|
return function updateDashboard(untrustedConfig) {
|
|
1247
|
-
const config = validateAdapterConfig$
|
|
1252
|
+
const config = validateAdapterConfig$9(untrustedConfig, updateDashboard_ConfigPropertyNames);
|
|
1248
1253
|
// Invalid or incomplete config
|
|
1249
1254
|
if (config === null) {
|
|
1250
1255
|
throw new Error('Invalid config for "updateDashboard"');
|
|
1251
1256
|
}
|
|
1252
|
-
return buildNetworkSnapshot$
|
|
1257
|
+
return buildNetworkSnapshot$9(luvio, config);
|
|
1253
1258
|
};
|
|
1254
1259
|
};
|
|
1255
1260
|
|
|
1256
|
-
const VERSION$
|
|
1257
|
-
function validate$
|
|
1261
|
+
const VERSION$6 = "13e8e39beeffee6e3f13ac9a24b8e8be";
|
|
1262
|
+
function validate$d(obj, path = 'AnalyticsVisualizationRepresentation') {
|
|
1258
1263
|
const v_error = (() => {
|
|
1259
1264
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1260
1265
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1261
1266
|
}
|
|
1262
1267
|
const obj_createdBy = obj.createdBy;
|
|
1263
1268
|
const path_createdBy = path + '.createdBy';
|
|
1264
|
-
const referencepath_createdByValidationError = validate$
|
|
1269
|
+
const referencepath_createdByValidationError = validate$j(obj_createdBy, path_createdBy);
|
|
1265
1270
|
if (referencepath_createdByValidationError !== null) {
|
|
1266
1271
|
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_createdBy + '")\n';
|
|
1267
1272
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1297,7 +1302,7 @@ function validate$c(obj, path = 'AnalyticsVisualizationRepresentation') {
|
|
|
1297
1302
|
if (obj.lastModifiedBy !== undefined) {
|
|
1298
1303
|
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1299
1304
|
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1300
|
-
const referencepath_lastModifiedByValidationError = validate$
|
|
1305
|
+
const referencepath_lastModifiedByValidationError = validate$j(obj_lastModifiedBy, path_lastModifiedBy);
|
|
1301
1306
|
if (referencepath_lastModifiedByValidationError !== null) {
|
|
1302
1307
|
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
1303
1308
|
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1319,57 +1324,57 @@ function validate$c(obj, path = 'AnalyticsVisualizationRepresentation') {
|
|
|
1319
1324
|
})();
|
|
1320
1325
|
return v_error === undefined ? null : v_error;
|
|
1321
1326
|
}
|
|
1322
|
-
const RepresentationType$
|
|
1323
|
-
function keyBuilder$
|
|
1324
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1327
|
+
const RepresentationType$6 = 'AnalyticsVisualizationRepresentation';
|
|
1328
|
+
function keyBuilder$d(luvio, config) {
|
|
1329
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + config.name;
|
|
1325
1330
|
}
|
|
1326
|
-
function keyBuilderFromType$
|
|
1331
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
1327
1332
|
const keyParams = {
|
|
1328
1333
|
name: object.name
|
|
1329
1334
|
};
|
|
1330
|
-
return keyBuilder$
|
|
1335
|
+
return keyBuilder$d(luvio, keyParams);
|
|
1331
1336
|
}
|
|
1332
|
-
function normalize$
|
|
1337
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
1333
1338
|
return input;
|
|
1334
1339
|
}
|
|
1335
|
-
const select$
|
|
1340
|
+
const select$e = function AnalyticsVisualizationRepresentationSelect() {
|
|
1336
1341
|
return {
|
|
1337
1342
|
kind: 'Fragment',
|
|
1338
|
-
version: VERSION$
|
|
1343
|
+
version: VERSION$6,
|
|
1339
1344
|
private: [],
|
|
1340
1345
|
opaque: true
|
|
1341
1346
|
};
|
|
1342
1347
|
};
|
|
1343
|
-
function equals$
|
|
1348
|
+
function equals$6(existing, incoming) {
|
|
1344
1349
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1345
1350
|
return false;
|
|
1346
1351
|
}
|
|
1347
1352
|
return true;
|
|
1348
1353
|
}
|
|
1349
|
-
const ingest$
|
|
1354
|
+
const ingest$6 = function AnalyticsVisualizationRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1350
1355
|
if (process.env.NODE_ENV !== 'production') {
|
|
1351
|
-
const validateError = validate$
|
|
1356
|
+
const validateError = validate$d(input);
|
|
1352
1357
|
if (validateError !== null) {
|
|
1353
1358
|
throw validateError;
|
|
1354
1359
|
}
|
|
1355
1360
|
}
|
|
1356
|
-
const key = keyBuilderFromType$
|
|
1361
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
1357
1362
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1358
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1363
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "UnifiedAnalytics", VERSION$6, RepresentationType$6, equals$6);
|
|
1359
1364
|
return createLink(key);
|
|
1360
1365
|
};
|
|
1361
|
-
function getTypeCacheKeys$
|
|
1366
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
1362
1367
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1363
|
-
const rootKey = keyBuilderFromType$
|
|
1368
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
1364
1369
|
rootKeySet.set(rootKey, {
|
|
1365
1370
|
namespace: keyPrefix,
|
|
1366
|
-
representationName: RepresentationType$
|
|
1371
|
+
representationName: RepresentationType$6,
|
|
1367
1372
|
mergeable: false
|
|
1368
1373
|
});
|
|
1369
1374
|
}
|
|
1370
1375
|
|
|
1371
|
-
const VERSION$
|
|
1372
|
-
function validate$
|
|
1376
|
+
const VERSION$5 = "342da25bfe5e13c7f4ccbc8aa0980a4f";
|
|
1377
|
+
function validate$c(obj, path = 'AnalyticsVisualizationCollectionRepresentation') {
|
|
1373
1378
|
const v_error = (() => {
|
|
1374
1379
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1375
1380
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1389,14 +1394,14 @@ function validate$b(obj, path = 'AnalyticsVisualizationCollectionRepresentation'
|
|
|
1389
1394
|
})();
|
|
1390
1395
|
return v_error === undefined ? null : v_error;
|
|
1391
1396
|
}
|
|
1392
|
-
const RepresentationType$
|
|
1393
|
-
function normalize$
|
|
1397
|
+
const RepresentationType$5 = 'AnalyticsVisualizationCollectionRepresentation';
|
|
1398
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
1394
1399
|
const input_visualizations = input.visualizations;
|
|
1395
1400
|
const input_visualizations_id = path.fullPath + '__visualizations';
|
|
1396
1401
|
for (let i = 0; i < input_visualizations.length; i++) {
|
|
1397
1402
|
const input_visualizations_item = input_visualizations[i];
|
|
1398
1403
|
let input_visualizations_item_id = input_visualizations_id + '__' + i;
|
|
1399
|
-
input_visualizations[i] = ingest$
|
|
1404
|
+
input_visualizations[i] = ingest$6(input_visualizations_item, {
|
|
1400
1405
|
fullPath: input_visualizations_item_id,
|
|
1401
1406
|
propertyName: i,
|
|
1402
1407
|
parent: {
|
|
@@ -1409,22 +1414,22 @@ function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
|
1409
1414
|
}
|
|
1410
1415
|
return input;
|
|
1411
1416
|
}
|
|
1412
|
-
const select$
|
|
1417
|
+
const select$d = function AnalyticsVisualizationCollectionRepresentationSelect() {
|
|
1413
1418
|
return {
|
|
1414
1419
|
kind: 'Fragment',
|
|
1415
|
-
version: VERSION$
|
|
1420
|
+
version: VERSION$5,
|
|
1416
1421
|
private: [],
|
|
1417
1422
|
selections: [
|
|
1418
1423
|
{
|
|
1419
1424
|
name: 'visualizations',
|
|
1420
1425
|
kind: 'Link',
|
|
1421
1426
|
plural: true,
|
|
1422
|
-
fragment: select$
|
|
1427
|
+
fragment: select$e()
|
|
1423
1428
|
}
|
|
1424
1429
|
]
|
|
1425
1430
|
};
|
|
1426
1431
|
};
|
|
1427
|
-
function equals$
|
|
1432
|
+
function equals$5(existing, incoming) {
|
|
1428
1433
|
const existing_visualizations = existing.visualizations;
|
|
1429
1434
|
const incoming_visualizations = incoming.visualizations;
|
|
1430
1435
|
const equals_visualizations_items = equalsArray(existing_visualizations, incoming_visualizations, (existing_visualizations_item, incoming_visualizations_item) => {
|
|
@@ -1437,48 +1442,48 @@ function equals$4(existing, incoming) {
|
|
|
1437
1442
|
}
|
|
1438
1443
|
return true;
|
|
1439
1444
|
}
|
|
1440
|
-
const ingest$
|
|
1445
|
+
const ingest$5 = function AnalyticsVisualizationCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1441
1446
|
if (process.env.NODE_ENV !== 'production') {
|
|
1442
|
-
const validateError = validate$
|
|
1447
|
+
const validateError = validate$c(input);
|
|
1443
1448
|
if (validateError !== null) {
|
|
1444
1449
|
throw validateError;
|
|
1445
1450
|
}
|
|
1446
1451
|
}
|
|
1447
1452
|
const key = path.fullPath;
|
|
1448
1453
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1449
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1454
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "UnifiedAnalytics", VERSION$5, RepresentationType$5, equals$5);
|
|
1450
1455
|
return createLink(key);
|
|
1451
1456
|
};
|
|
1452
|
-
function getTypeCacheKeys$
|
|
1457
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
1453
1458
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1454
1459
|
const rootKey = fullPathFactory();
|
|
1455
1460
|
rootKeySet.set(rootKey, {
|
|
1456
1461
|
namespace: keyPrefix,
|
|
1457
|
-
representationName: RepresentationType$
|
|
1462
|
+
representationName: RepresentationType$5,
|
|
1458
1463
|
mergeable: false
|
|
1459
1464
|
});
|
|
1460
1465
|
const input_visualizations_length = input.visualizations.length;
|
|
1461
1466
|
for (let i = 0; i < input_visualizations_length; i++) {
|
|
1462
|
-
getTypeCacheKeys$
|
|
1467
|
+
getTypeCacheKeys$6(rootKeySet, luvio, input.visualizations[i]);
|
|
1463
1468
|
}
|
|
1464
1469
|
}
|
|
1465
1470
|
|
|
1466
|
-
function select$
|
|
1467
|
-
return select$
|
|
1471
|
+
function select$c(luvio, params) {
|
|
1472
|
+
return select$d();
|
|
1468
1473
|
}
|
|
1469
|
-
function keyBuilder$
|
|
1474
|
+
function keyBuilder$c(luvio, params) {
|
|
1470
1475
|
return keyPrefix + '::AnalyticsVisualizationCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
|
|
1471
1476
|
}
|
|
1472
|
-
function getResponseCacheKeys$
|
|
1473
|
-
getTypeCacheKeys$
|
|
1477
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
1478
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$c(luvio, resourceParams));
|
|
1474
1479
|
}
|
|
1475
|
-
function ingestSuccess$
|
|
1480
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
1476
1481
|
const { body } = response;
|
|
1477
|
-
const key = keyBuilder$
|
|
1478
|
-
luvio.storeIngest(key, ingest$
|
|
1482
|
+
const key = keyBuilder$c(luvio, resourceParams);
|
|
1483
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
1479
1484
|
const snapshot = luvio.storeLookup({
|
|
1480
1485
|
recordId: key,
|
|
1481
|
-
node: select$
|
|
1486
|
+
node: select$c(),
|
|
1482
1487
|
variables: {},
|
|
1483
1488
|
}, snapshotRefresh);
|
|
1484
1489
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1489,13 +1494,13 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1489
1494
|
deepFreeze(snapshot.data);
|
|
1490
1495
|
return snapshot;
|
|
1491
1496
|
}
|
|
1492
|
-
function ingestError$
|
|
1493
|
-
const key = keyBuilder$
|
|
1497
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
1498
|
+
const key = keyBuilder$c(luvio, params);
|
|
1494
1499
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1495
1500
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1496
1501
|
return errorSnapshot;
|
|
1497
1502
|
}
|
|
1498
|
-
function createResourceRequest$
|
|
1503
|
+
function createResourceRequest$8(config) {
|
|
1499
1504
|
const headers = {};
|
|
1500
1505
|
return {
|
|
1501
1506
|
baseUri: '/services/data/v62.0',
|
|
@@ -1509,111 +1514,111 @@ function createResourceRequest$6(config) {
|
|
|
1509
1514
|
};
|
|
1510
1515
|
}
|
|
1511
1516
|
|
|
1512
|
-
const adapterName$
|
|
1517
|
+
const adapterName$8 = 'getVisualizations';
|
|
1513
1518
|
const getVisualizations_ConfigPropertyMetadata = [
|
|
1514
1519
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1515
1520
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1516
1521
|
];
|
|
1517
|
-
const getVisualizations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1518
|
-
const createResourceParams$
|
|
1519
|
-
function keyBuilder$
|
|
1520
|
-
const resourceParams = createResourceParams$
|
|
1521
|
-
return keyBuilder$
|
|
1522
|
+
const getVisualizations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getVisualizations_ConfigPropertyMetadata);
|
|
1523
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$f(getVisualizations_ConfigPropertyMetadata);
|
|
1524
|
+
function keyBuilder$b(luvio, config) {
|
|
1525
|
+
const resourceParams = createResourceParams$8(config);
|
|
1526
|
+
return keyBuilder$c(luvio, resourceParams);
|
|
1522
1527
|
}
|
|
1523
|
-
function typeCheckConfig$
|
|
1528
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
1524
1529
|
const config = {};
|
|
1525
|
-
typeCheckConfig$
|
|
1530
|
+
typeCheckConfig$f(untrustedConfig, config, getVisualizations_ConfigPropertyMetadata);
|
|
1526
1531
|
return config;
|
|
1527
1532
|
}
|
|
1528
|
-
function validateAdapterConfig$
|
|
1533
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
1529
1534
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1530
1535
|
return null;
|
|
1531
1536
|
}
|
|
1532
1537
|
if (process.env.NODE_ENV !== 'production') {
|
|
1533
1538
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1534
1539
|
}
|
|
1535
|
-
const config = typeCheckConfig$
|
|
1540
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
1536
1541
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1537
1542
|
return null;
|
|
1538
1543
|
}
|
|
1539
1544
|
return config;
|
|
1540
1545
|
}
|
|
1541
|
-
function adapterFragment$
|
|
1542
|
-
createResourceParams$
|
|
1543
|
-
return select$
|
|
1546
|
+
function adapterFragment$3(luvio, config) {
|
|
1547
|
+
createResourceParams$8(config);
|
|
1548
|
+
return select$c();
|
|
1544
1549
|
}
|
|
1545
|
-
function onFetchResponseSuccess$
|
|
1546
|
-
const snapshot = ingestSuccess$
|
|
1550
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
1551
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
1547
1552
|
config,
|
|
1548
|
-
resolve: () => buildNetworkSnapshot$
|
|
1553
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1549
1554
|
});
|
|
1550
1555
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1551
1556
|
}
|
|
1552
|
-
function onFetchResponseError$
|
|
1553
|
-
const snapshot = ingestError$
|
|
1557
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
1558
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
1554
1559
|
config,
|
|
1555
|
-
resolve: () => buildNetworkSnapshot$
|
|
1560
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1556
1561
|
});
|
|
1557
1562
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1558
1563
|
}
|
|
1559
|
-
function buildNetworkSnapshot$
|
|
1560
|
-
const resourceParams = createResourceParams$
|
|
1561
|
-
const request = createResourceRequest$
|
|
1564
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
1565
|
+
const resourceParams = createResourceParams$8(config);
|
|
1566
|
+
const request = createResourceRequest$8(resourceParams);
|
|
1562
1567
|
return luvio.dispatchResourceRequest(request, options)
|
|
1563
1568
|
.then((response) => {
|
|
1564
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1569
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
1565
1570
|
const cache = new StoreKeyMap();
|
|
1566
|
-
getResponseCacheKeys$
|
|
1571
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
1567
1572
|
return cache;
|
|
1568
1573
|
});
|
|
1569
1574
|
}, (response) => {
|
|
1570
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1575
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
1571
1576
|
});
|
|
1572
1577
|
}
|
|
1573
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1574
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1578
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
1579
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
|
|
1575
1580
|
}
|
|
1576
|
-
function buildCachedSnapshotCachePolicy$
|
|
1581
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
1577
1582
|
const { luvio, config } = context;
|
|
1578
1583
|
const selector = {
|
|
1579
|
-
recordId: keyBuilder$
|
|
1580
|
-
node: adapterFragment$
|
|
1584
|
+
recordId: keyBuilder$b(luvio, config),
|
|
1585
|
+
node: adapterFragment$3(luvio, config),
|
|
1581
1586
|
variables: {},
|
|
1582
1587
|
};
|
|
1583
1588
|
const cacheSnapshot = storeLookup(selector, {
|
|
1584
1589
|
config,
|
|
1585
|
-
resolve: () => buildNetworkSnapshot$
|
|
1590
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1586
1591
|
});
|
|
1587
1592
|
return cacheSnapshot;
|
|
1588
1593
|
}
|
|
1589
1594
|
const getVisualizationsAdapterFactory = (luvio) => function UnifiedAnalytics__getVisualizations(untrustedConfig, requestContext) {
|
|
1590
|
-
const config = validateAdapterConfig$
|
|
1595
|
+
const config = validateAdapterConfig$8(untrustedConfig, getVisualizations_ConfigPropertyNames);
|
|
1591
1596
|
// Invalid or incomplete config
|
|
1592
1597
|
if (config === null) {
|
|
1593
1598
|
return null;
|
|
1594
1599
|
}
|
|
1595
1600
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1596
|
-
buildCachedSnapshotCachePolicy$
|
|
1601
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
1597
1602
|
};
|
|
1598
1603
|
|
|
1599
|
-
function keyBuilder$
|
|
1600
|
-
return keyBuilder$
|
|
1604
|
+
function keyBuilder$a(luvio, params) {
|
|
1605
|
+
return keyBuilder$d(luvio, {
|
|
1601
1606
|
name: params.urlParams.visualizationIdOrApiName
|
|
1602
1607
|
});
|
|
1603
1608
|
}
|
|
1604
|
-
function getResponseCacheKeys$
|
|
1605
|
-
const key = keyBuilder$
|
|
1609
|
+
function getResponseCacheKeys$7(cacheKeyMap, luvio, resourceParams) {
|
|
1610
|
+
const key = keyBuilder$a(luvio, resourceParams);
|
|
1606
1611
|
cacheKeyMap.set(key, {
|
|
1607
1612
|
namespace: keyPrefix,
|
|
1608
|
-
representationName: RepresentationType$
|
|
1613
|
+
representationName: RepresentationType$6,
|
|
1609
1614
|
mergeable: false
|
|
1610
1615
|
});
|
|
1611
1616
|
}
|
|
1612
1617
|
function evictSuccess(luvio, resourceParams) {
|
|
1613
|
-
const key = keyBuilder$
|
|
1618
|
+
const key = keyBuilder$a(luvio, resourceParams);
|
|
1614
1619
|
luvio.storeEvict(key);
|
|
1615
1620
|
}
|
|
1616
|
-
function createResourceRequest$
|
|
1621
|
+
function createResourceRequest$7(config) {
|
|
1617
1622
|
const headers = {};
|
|
1618
1623
|
return {
|
|
1619
1624
|
baseUri: '/services/data/v62.0',
|
|
@@ -1627,33 +1632,33 @@ function createResourceRequest$5(config) {
|
|
|
1627
1632
|
};
|
|
1628
1633
|
}
|
|
1629
1634
|
|
|
1630
|
-
const adapterName$
|
|
1635
|
+
const adapterName$7 = 'deleteVisualization';
|
|
1631
1636
|
const deleteVisualization_ConfigPropertyMetadata = [
|
|
1632
1637
|
generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1633
1638
|
];
|
|
1634
|
-
const deleteVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1635
|
-
const createResourceParams$
|
|
1636
|
-
function typeCheckConfig$
|
|
1639
|
+
const deleteVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, deleteVisualization_ConfigPropertyMetadata);
|
|
1640
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$f(deleteVisualization_ConfigPropertyMetadata);
|
|
1641
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
1637
1642
|
const config = {};
|
|
1638
|
-
typeCheckConfig$
|
|
1643
|
+
typeCheckConfig$f(untrustedConfig, config, deleteVisualization_ConfigPropertyMetadata);
|
|
1639
1644
|
return config;
|
|
1640
1645
|
}
|
|
1641
|
-
function validateAdapterConfig$
|
|
1646
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
1642
1647
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1643
1648
|
return null;
|
|
1644
1649
|
}
|
|
1645
1650
|
if (process.env.NODE_ENV !== 'production') {
|
|
1646
1651
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1647
1652
|
}
|
|
1648
|
-
const config = typeCheckConfig$
|
|
1653
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
1649
1654
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1650
1655
|
return null;
|
|
1651
1656
|
}
|
|
1652
1657
|
return config;
|
|
1653
1658
|
}
|
|
1654
|
-
function buildNetworkSnapshot$
|
|
1655
|
-
const resourceParams = createResourceParams$
|
|
1656
|
-
const request = createResourceRequest$
|
|
1659
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
1660
|
+
const resourceParams = createResourceParams$7(config);
|
|
1661
|
+
const request = createResourceRequest$7(resourceParams);
|
|
1657
1662
|
return luvio.dispatchResourceRequest(request, options)
|
|
1658
1663
|
.then(() => {
|
|
1659
1664
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -1661,7 +1666,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
1661
1666
|
return luvio.storeBroadcast();
|
|
1662
1667
|
}, () => {
|
|
1663
1668
|
const cache = new StoreKeyMap();
|
|
1664
|
-
getResponseCacheKeys$
|
|
1669
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams);
|
|
1665
1670
|
return cache;
|
|
1666
1671
|
});
|
|
1667
1672
|
}, (response) => {
|
|
@@ -1671,33 +1676,33 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
1671
1676
|
}
|
|
1672
1677
|
const deleteVisualizationAdapterFactory = (luvio) => {
|
|
1673
1678
|
return function UnifiedAnalyticsdeleteVisualization(untrustedConfig) {
|
|
1674
|
-
const config = validateAdapterConfig$
|
|
1679
|
+
const config = validateAdapterConfig$7(untrustedConfig, deleteVisualization_ConfigPropertyNames);
|
|
1675
1680
|
// Invalid or incomplete config
|
|
1676
1681
|
if (config === null) {
|
|
1677
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
1682
|
+
throw new Error(`Invalid config for "${adapterName$7}"`);
|
|
1678
1683
|
}
|
|
1679
|
-
return buildNetworkSnapshot$
|
|
1684
|
+
return buildNetworkSnapshot$7(luvio, config);
|
|
1680
1685
|
};
|
|
1681
1686
|
};
|
|
1682
1687
|
|
|
1683
|
-
function select$
|
|
1684
|
-
return select$
|
|
1688
|
+
function select$b(luvio, params) {
|
|
1689
|
+
return select$e();
|
|
1685
1690
|
}
|
|
1686
|
-
function keyBuilder$
|
|
1687
|
-
return keyBuilder$
|
|
1691
|
+
function keyBuilder$9(luvio, params) {
|
|
1692
|
+
return keyBuilder$d(luvio, {
|
|
1688
1693
|
name: params.urlParams.visualizationIdOrApiName
|
|
1689
1694
|
});
|
|
1690
1695
|
}
|
|
1691
|
-
function getResponseCacheKeys$
|
|
1692
|
-
getTypeCacheKeys$
|
|
1696
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
1697
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
1693
1698
|
}
|
|
1694
|
-
function ingestSuccess$
|
|
1699
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
1695
1700
|
const { body } = response;
|
|
1696
|
-
const key = keyBuilder$
|
|
1697
|
-
luvio.storeIngest(key, ingest$
|
|
1701
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
1702
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
1698
1703
|
const snapshot = luvio.storeLookup({
|
|
1699
1704
|
recordId: key,
|
|
1700
|
-
node: select$
|
|
1705
|
+
node: select$b(),
|
|
1701
1706
|
variables: {},
|
|
1702
1707
|
}, snapshotRefresh);
|
|
1703
1708
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1708,13 +1713,13 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1708
1713
|
deepFreeze(snapshot.data);
|
|
1709
1714
|
return snapshot;
|
|
1710
1715
|
}
|
|
1711
|
-
function ingestError$
|
|
1712
|
-
const key = keyBuilder$
|
|
1716
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
1717
|
+
const key = keyBuilder$9(luvio, params);
|
|
1713
1718
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1714
1719
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1715
1720
|
return errorSnapshot;
|
|
1716
1721
|
}
|
|
1717
|
-
function createResourceRequest$
|
|
1722
|
+
function createResourceRequest$6(config) {
|
|
1718
1723
|
const headers = {};
|
|
1719
1724
|
return {
|
|
1720
1725
|
baseUri: '/services/data/v62.0',
|
|
@@ -1728,101 +1733,101 @@ function createResourceRequest$4(config) {
|
|
|
1728
1733
|
};
|
|
1729
1734
|
}
|
|
1730
1735
|
|
|
1731
|
-
const adapterName$
|
|
1736
|
+
const adapterName$6 = 'getVisualization';
|
|
1732
1737
|
const getVisualization_ConfigPropertyMetadata = [
|
|
1733
1738
|
generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1734
1739
|
];
|
|
1735
|
-
const getVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1736
|
-
const createResourceParams$
|
|
1737
|
-
function keyBuilder$
|
|
1738
|
-
const resourceParams = createResourceParams$
|
|
1739
|
-
return keyBuilder$
|
|
1740
|
+
const getVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getVisualization_ConfigPropertyMetadata);
|
|
1741
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$f(getVisualization_ConfigPropertyMetadata);
|
|
1742
|
+
function keyBuilder$8(luvio, config) {
|
|
1743
|
+
const resourceParams = createResourceParams$6(config);
|
|
1744
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
1740
1745
|
}
|
|
1741
|
-
function typeCheckConfig$
|
|
1746
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
1742
1747
|
const config = {};
|
|
1743
|
-
typeCheckConfig$
|
|
1748
|
+
typeCheckConfig$f(untrustedConfig, config, getVisualization_ConfigPropertyMetadata);
|
|
1744
1749
|
return config;
|
|
1745
1750
|
}
|
|
1746
|
-
function validateAdapterConfig$
|
|
1751
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
1747
1752
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1748
1753
|
return null;
|
|
1749
1754
|
}
|
|
1750
1755
|
if (process.env.NODE_ENV !== 'production') {
|
|
1751
1756
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1752
1757
|
}
|
|
1753
|
-
const config = typeCheckConfig$
|
|
1758
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
1754
1759
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1755
1760
|
return null;
|
|
1756
1761
|
}
|
|
1757
1762
|
return config;
|
|
1758
1763
|
}
|
|
1759
|
-
function adapterFragment$
|
|
1760
|
-
createResourceParams$
|
|
1761
|
-
return select$
|
|
1764
|
+
function adapterFragment$2(luvio, config) {
|
|
1765
|
+
createResourceParams$6(config);
|
|
1766
|
+
return select$b();
|
|
1762
1767
|
}
|
|
1763
|
-
function onFetchResponseSuccess$
|
|
1764
|
-
const snapshot = ingestSuccess$
|
|
1768
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
1769
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
1765
1770
|
config,
|
|
1766
|
-
resolve: () => buildNetworkSnapshot$
|
|
1771
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1767
1772
|
});
|
|
1768
1773
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1769
1774
|
}
|
|
1770
|
-
function onFetchResponseError$
|
|
1771
|
-
const snapshot = ingestError$
|
|
1775
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
1776
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
1772
1777
|
config,
|
|
1773
|
-
resolve: () => buildNetworkSnapshot$
|
|
1778
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1774
1779
|
});
|
|
1775
1780
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1776
1781
|
}
|
|
1777
|
-
function buildNetworkSnapshot$
|
|
1778
|
-
const resourceParams = createResourceParams$
|
|
1779
|
-
const request = createResourceRequest$
|
|
1782
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
1783
|
+
const resourceParams = createResourceParams$6(config);
|
|
1784
|
+
const request = createResourceRequest$6(resourceParams);
|
|
1780
1785
|
return luvio.dispatchResourceRequest(request, options)
|
|
1781
1786
|
.then((response) => {
|
|
1782
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1787
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
1783
1788
|
const cache = new StoreKeyMap();
|
|
1784
|
-
getResponseCacheKeys$
|
|
1789
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
1785
1790
|
return cache;
|
|
1786
1791
|
});
|
|
1787
1792
|
}, (response) => {
|
|
1788
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1793
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
1789
1794
|
});
|
|
1790
1795
|
}
|
|
1791
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1792
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1796
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1797
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
1793
1798
|
}
|
|
1794
|
-
function buildCachedSnapshotCachePolicy$
|
|
1799
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1795
1800
|
const { luvio, config } = context;
|
|
1796
1801
|
const selector = {
|
|
1797
|
-
recordId: keyBuilder$
|
|
1798
|
-
node: adapterFragment$
|
|
1802
|
+
recordId: keyBuilder$8(luvio, config),
|
|
1803
|
+
node: adapterFragment$2(luvio, config),
|
|
1799
1804
|
variables: {},
|
|
1800
1805
|
};
|
|
1801
1806
|
const cacheSnapshot = storeLookup(selector, {
|
|
1802
1807
|
config,
|
|
1803
|
-
resolve: () => buildNetworkSnapshot$
|
|
1808
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1804
1809
|
});
|
|
1805
1810
|
return cacheSnapshot;
|
|
1806
1811
|
}
|
|
1807
1812
|
const getVisualizationAdapterFactory = (luvio) => function UnifiedAnalytics__getVisualization(untrustedConfig, requestContext) {
|
|
1808
|
-
const config = validateAdapterConfig$
|
|
1813
|
+
const config = validateAdapterConfig$6(untrustedConfig, getVisualization_ConfigPropertyNames);
|
|
1809
1814
|
// Invalid or incomplete config
|
|
1810
1815
|
if (config === null) {
|
|
1811
1816
|
return null;
|
|
1812
1817
|
}
|
|
1813
1818
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1814
|
-
buildCachedSnapshotCachePolicy$
|
|
1819
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
1815
1820
|
};
|
|
1816
1821
|
|
|
1817
|
-
const VERSION$
|
|
1818
|
-
function validate$
|
|
1822
|
+
const VERSION$4 = "bb71c0bf5563bfa6de1fe757209f3722";
|
|
1823
|
+
function validate$b(obj, path = 'WorkspaceRepresentation') {
|
|
1819
1824
|
const v_error = (() => {
|
|
1820
1825
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1821
1826
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1822
1827
|
}
|
|
1823
1828
|
const obj_createdBy = obj.createdBy;
|
|
1824
1829
|
const path_createdBy = path + '.createdBy';
|
|
1825
|
-
const referencepath_createdByValidationError = validate$
|
|
1830
|
+
const referencepath_createdByValidationError = validate$j(obj_createdBy, path_createdBy);
|
|
1826
1831
|
if (referencepath_createdByValidationError !== null) {
|
|
1827
1832
|
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_createdBy + '")\n';
|
|
1828
1833
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1861,57 +1866,57 @@ function validate$a(obj, path = 'WorkspaceRepresentation') {
|
|
|
1861
1866
|
})();
|
|
1862
1867
|
return v_error === undefined ? null : v_error;
|
|
1863
1868
|
}
|
|
1864
|
-
const RepresentationType$
|
|
1865
|
-
function keyBuilder$
|
|
1866
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1869
|
+
const RepresentationType$4 = 'WorkspaceRepresentation';
|
|
1870
|
+
function keyBuilder$7(luvio, config) {
|
|
1871
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.name;
|
|
1867
1872
|
}
|
|
1868
|
-
function keyBuilderFromType$
|
|
1873
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
1869
1874
|
const keyParams = {
|
|
1870
1875
|
name: object.name
|
|
1871
1876
|
};
|
|
1872
|
-
return keyBuilder$
|
|
1877
|
+
return keyBuilder$7(luvio, keyParams);
|
|
1873
1878
|
}
|
|
1874
|
-
function normalize$
|
|
1879
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
1875
1880
|
return input;
|
|
1876
1881
|
}
|
|
1877
|
-
const select$
|
|
1882
|
+
const select$a = function WorkspaceRepresentationSelect() {
|
|
1878
1883
|
return {
|
|
1879
1884
|
kind: 'Fragment',
|
|
1880
|
-
version: VERSION$
|
|
1885
|
+
version: VERSION$4,
|
|
1881
1886
|
private: [],
|
|
1882
1887
|
opaque: true
|
|
1883
1888
|
};
|
|
1884
1889
|
};
|
|
1885
|
-
function equals$
|
|
1890
|
+
function equals$4(existing, incoming) {
|
|
1886
1891
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1887
1892
|
return false;
|
|
1888
1893
|
}
|
|
1889
1894
|
return true;
|
|
1890
1895
|
}
|
|
1891
|
-
const ingest$
|
|
1896
|
+
const ingest$4 = function WorkspaceRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1892
1897
|
if (process.env.NODE_ENV !== 'production') {
|
|
1893
|
-
const validateError = validate$
|
|
1898
|
+
const validateError = validate$b(input);
|
|
1894
1899
|
if (validateError !== null) {
|
|
1895
1900
|
throw validateError;
|
|
1896
1901
|
}
|
|
1897
1902
|
}
|
|
1898
|
-
const key = keyBuilderFromType$
|
|
1903
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
1899
1904
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1900
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1905
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "UnifiedAnalytics", VERSION$4, RepresentationType$4, equals$4);
|
|
1901
1906
|
return createLink(key);
|
|
1902
1907
|
};
|
|
1903
|
-
function getTypeCacheKeys$
|
|
1908
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
1904
1909
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1905
|
-
const rootKey = keyBuilderFromType$
|
|
1910
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
1906
1911
|
rootKeySet.set(rootKey, {
|
|
1907
1912
|
namespace: keyPrefix,
|
|
1908
|
-
representationName: RepresentationType$
|
|
1913
|
+
representationName: RepresentationType$4,
|
|
1909
1914
|
mergeable: false
|
|
1910
1915
|
});
|
|
1911
1916
|
}
|
|
1912
1917
|
|
|
1913
|
-
const VERSION$
|
|
1914
|
-
function validate$
|
|
1918
|
+
const VERSION$3 = "25327d65bf7ad14ee671ec5a1642b193";
|
|
1919
|
+
function validate$a(obj, path = 'WorkspaceCollectionRepresentation') {
|
|
1915
1920
|
const v_error = (() => {
|
|
1916
1921
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1917
1922
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1931,14 +1936,14 @@ function validate$9(obj, path = 'WorkspaceCollectionRepresentation') {
|
|
|
1931
1936
|
})();
|
|
1932
1937
|
return v_error === undefined ? null : v_error;
|
|
1933
1938
|
}
|
|
1934
|
-
const RepresentationType$
|
|
1935
|
-
function normalize$
|
|
1939
|
+
const RepresentationType$3 = 'WorkspaceCollectionRepresentation';
|
|
1940
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1936
1941
|
const input_workspaces = input.workspaces;
|
|
1937
1942
|
const input_workspaces_id = path.fullPath + '__workspaces';
|
|
1938
1943
|
for (let i = 0; i < input_workspaces.length; i++) {
|
|
1939
1944
|
const input_workspaces_item = input_workspaces[i];
|
|
1940
1945
|
let input_workspaces_item_id = input_workspaces_id + '__' + i;
|
|
1941
|
-
input_workspaces[i] = ingest$
|
|
1946
|
+
input_workspaces[i] = ingest$4(input_workspaces_item, {
|
|
1942
1947
|
fullPath: input_workspaces_item_id,
|
|
1943
1948
|
propertyName: i,
|
|
1944
1949
|
parent: {
|
|
@@ -1951,22 +1956,22 @@ function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
|
1951
1956
|
}
|
|
1952
1957
|
return input;
|
|
1953
1958
|
}
|
|
1954
|
-
const select$
|
|
1959
|
+
const select$9 = function WorkspaceCollectionRepresentationSelect() {
|
|
1955
1960
|
return {
|
|
1956
1961
|
kind: 'Fragment',
|
|
1957
|
-
version: VERSION$
|
|
1962
|
+
version: VERSION$3,
|
|
1958
1963
|
private: [],
|
|
1959
1964
|
selections: [
|
|
1960
1965
|
{
|
|
1961
1966
|
name: 'workspaces',
|
|
1962
1967
|
kind: 'Link',
|
|
1963
1968
|
plural: true,
|
|
1964
|
-
fragment: select$
|
|
1969
|
+
fragment: select$a()
|
|
1965
1970
|
}
|
|
1966
1971
|
]
|
|
1967
1972
|
};
|
|
1968
1973
|
};
|
|
1969
|
-
function equals$
|
|
1974
|
+
function equals$3(existing, incoming) {
|
|
1970
1975
|
const existing_workspaces = existing.workspaces;
|
|
1971
1976
|
const incoming_workspaces = incoming.workspaces;
|
|
1972
1977
|
const equals_workspaces_items = equalsArray(existing_workspaces, incoming_workspaces, (existing_workspaces_item, incoming_workspaces_item) => {
|
|
@@ -1979,40 +1984,342 @@ function equals$2(existing, incoming) {
|
|
|
1979
1984
|
}
|
|
1980
1985
|
return true;
|
|
1981
1986
|
}
|
|
1982
|
-
const ingest$
|
|
1987
|
+
const ingest$3 = function WorkspaceCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1983
1988
|
if (process.env.NODE_ENV !== 'production') {
|
|
1984
|
-
const validateError = validate$
|
|
1989
|
+
const validateError = validate$a(input);
|
|
1985
1990
|
if (validateError !== null) {
|
|
1986
1991
|
throw validateError;
|
|
1987
1992
|
}
|
|
1988
1993
|
}
|
|
1989
1994
|
const key = path.fullPath;
|
|
1990
1995
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1991
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1996
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "UnifiedAnalytics", VERSION$3, RepresentationType$3, equals$3);
|
|
1992
1997
|
return createLink(key);
|
|
1993
1998
|
};
|
|
1994
|
-
function getTypeCacheKeys$
|
|
1999
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1995
2000
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1996
2001
|
const rootKey = fullPathFactory();
|
|
1997
2002
|
rootKeySet.set(rootKey, {
|
|
1998
2003
|
namespace: keyPrefix,
|
|
1999
|
-
representationName: RepresentationType$
|
|
2004
|
+
representationName: RepresentationType$3,
|
|
2000
2005
|
mergeable: false
|
|
2001
2006
|
});
|
|
2002
2007
|
const input_workspaces_length = input.workspaces.length;
|
|
2003
2008
|
for (let i = 0; i < input_workspaces_length; i++) {
|
|
2004
|
-
getTypeCacheKeys$
|
|
2009
|
+
getTypeCacheKeys$4(rootKeySet, luvio, input.workspaces[i]);
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
function select$8(luvio, params) {
|
|
2014
|
+
return select$9();
|
|
2015
|
+
}
|
|
2016
|
+
function keyBuilder$6(luvio, params) {
|
|
2017
|
+
return keyPrefix + '::WorkspaceCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
|
|
2018
|
+
}
|
|
2019
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
2020
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
|
|
2021
|
+
}
|
|
2022
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
2023
|
+
const { body } = response;
|
|
2024
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
2025
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
2026
|
+
const snapshot = luvio.storeLookup({
|
|
2027
|
+
recordId: key,
|
|
2028
|
+
node: select$8(),
|
|
2029
|
+
variables: {},
|
|
2030
|
+
}, snapshotRefresh);
|
|
2031
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2032
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2033
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
deepFreeze(snapshot.data);
|
|
2037
|
+
return snapshot;
|
|
2038
|
+
}
|
|
2039
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
2040
|
+
const key = keyBuilder$6(luvio, params);
|
|
2041
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2042
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
2043
|
+
return errorSnapshot;
|
|
2044
|
+
}
|
|
2045
|
+
function createResourceRequest$5(config) {
|
|
2046
|
+
const headers = {};
|
|
2047
|
+
return {
|
|
2048
|
+
baseUri: '/services/data/v62.0',
|
|
2049
|
+
basePath: '/unified-analytics/workspaces',
|
|
2050
|
+
method: 'get',
|
|
2051
|
+
body: null,
|
|
2052
|
+
urlParams: {},
|
|
2053
|
+
queryParams: config.queryParams,
|
|
2054
|
+
headers,
|
|
2055
|
+
priority: 'normal',
|
|
2056
|
+
};
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
const adapterName$5 = 'getWorkspaces';
|
|
2060
|
+
const getWorkspaces_ConfigPropertyMetadata = [
|
|
2061
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2062
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2063
|
+
];
|
|
2064
|
+
const getWorkspaces_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getWorkspaces_ConfigPropertyMetadata);
|
|
2065
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$f(getWorkspaces_ConfigPropertyMetadata);
|
|
2066
|
+
function keyBuilder$5(luvio, config) {
|
|
2067
|
+
const resourceParams = createResourceParams$5(config);
|
|
2068
|
+
return keyBuilder$6(luvio, resourceParams);
|
|
2069
|
+
}
|
|
2070
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
2071
|
+
const config = {};
|
|
2072
|
+
typeCheckConfig$f(untrustedConfig, config, getWorkspaces_ConfigPropertyMetadata);
|
|
2073
|
+
return config;
|
|
2074
|
+
}
|
|
2075
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
2076
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2077
|
+
return null;
|
|
2078
|
+
}
|
|
2079
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2080
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2081
|
+
}
|
|
2082
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
2083
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2084
|
+
return null;
|
|
2085
|
+
}
|
|
2086
|
+
return config;
|
|
2087
|
+
}
|
|
2088
|
+
function adapterFragment$1(luvio, config) {
|
|
2089
|
+
createResourceParams$5(config);
|
|
2090
|
+
return select$8();
|
|
2091
|
+
}
|
|
2092
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
2093
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
2094
|
+
config,
|
|
2095
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
2096
|
+
});
|
|
2097
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2098
|
+
}
|
|
2099
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
2100
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
2101
|
+
config,
|
|
2102
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
2103
|
+
});
|
|
2104
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2105
|
+
}
|
|
2106
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
2107
|
+
const resourceParams = createResourceParams$5(config);
|
|
2108
|
+
const request = createResourceRequest$5(resourceParams);
|
|
2109
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2110
|
+
.then((response) => {
|
|
2111
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
2112
|
+
const cache = new StoreKeyMap();
|
|
2113
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
2114
|
+
return cache;
|
|
2115
|
+
});
|
|
2116
|
+
}, (response) => {
|
|
2117
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
2118
|
+
});
|
|
2119
|
+
}
|
|
2120
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
2121
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
2122
|
+
}
|
|
2123
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
2124
|
+
const { luvio, config } = context;
|
|
2125
|
+
const selector = {
|
|
2126
|
+
recordId: keyBuilder$5(luvio, config),
|
|
2127
|
+
node: adapterFragment$1(luvio, config),
|
|
2128
|
+
variables: {},
|
|
2129
|
+
};
|
|
2130
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
2131
|
+
config,
|
|
2132
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
2133
|
+
});
|
|
2134
|
+
return cacheSnapshot;
|
|
2135
|
+
}
|
|
2136
|
+
const getWorkspacesAdapterFactory = (luvio) => function UnifiedAnalytics__getWorkspaces(untrustedConfig, requestContext) {
|
|
2137
|
+
const config = validateAdapterConfig$5(untrustedConfig, getWorkspaces_ConfigPropertyNames);
|
|
2138
|
+
// Invalid or incomplete config
|
|
2139
|
+
if (config === null) {
|
|
2140
|
+
return null;
|
|
2141
|
+
}
|
|
2142
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2143
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
2144
|
+
};
|
|
2145
|
+
|
|
2146
|
+
function select$7(luvio, params) {
|
|
2147
|
+
return select$a();
|
|
2148
|
+
}
|
|
2149
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
2150
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
2151
|
+
}
|
|
2152
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
2153
|
+
const { body } = response;
|
|
2154
|
+
const key = keyBuilderFromType$3(luvio, body);
|
|
2155
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
2156
|
+
const snapshot = luvio.storeLookup({
|
|
2157
|
+
recordId: key,
|
|
2158
|
+
node: select$7(),
|
|
2159
|
+
variables: {},
|
|
2160
|
+
});
|
|
2161
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2162
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2163
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
deepFreeze(snapshot.data);
|
|
2167
|
+
return snapshot;
|
|
2168
|
+
}
|
|
2169
|
+
function createResourceRequest$4(config) {
|
|
2170
|
+
const headers = {};
|
|
2171
|
+
return {
|
|
2172
|
+
baseUri: '/services/data/v62.0',
|
|
2173
|
+
basePath: '/unified-analytics/workspaces',
|
|
2174
|
+
method: 'post',
|
|
2175
|
+
body: config.body,
|
|
2176
|
+
urlParams: {},
|
|
2177
|
+
queryParams: {},
|
|
2178
|
+
headers,
|
|
2179
|
+
priority: 'normal',
|
|
2180
|
+
};
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
const adapterName$4 = 'createWorkspace';
|
|
2184
|
+
const createWorkspace_ConfigPropertyMetadata = [
|
|
2185
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
2186
|
+
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
2187
|
+
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
2188
|
+
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
2189
|
+
];
|
|
2190
|
+
const createWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createWorkspace_ConfigPropertyMetadata);
|
|
2191
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$f(createWorkspace_ConfigPropertyMetadata);
|
|
2192
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
2193
|
+
const config = {};
|
|
2194
|
+
typeCheckConfig$f(untrustedConfig, config, createWorkspace_ConfigPropertyMetadata);
|
|
2195
|
+
return config;
|
|
2196
|
+
}
|
|
2197
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
2198
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2199
|
+
return null;
|
|
2200
|
+
}
|
|
2201
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2202
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2203
|
+
}
|
|
2204
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
2205
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2206
|
+
return null;
|
|
2207
|
+
}
|
|
2208
|
+
return config;
|
|
2209
|
+
}
|
|
2210
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
2211
|
+
const resourceParams = createResourceParams$4(config);
|
|
2212
|
+
const request = createResourceRequest$4(resourceParams);
|
|
2213
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2214
|
+
.then((response) => {
|
|
2215
|
+
return luvio.handleSuccessResponse(() => {
|
|
2216
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
2217
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2218
|
+
}, () => {
|
|
2219
|
+
const cache = new StoreKeyMap();
|
|
2220
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
2221
|
+
return cache;
|
|
2222
|
+
});
|
|
2223
|
+
}, (response) => {
|
|
2224
|
+
deepFreeze(response);
|
|
2225
|
+
throw response;
|
|
2226
|
+
});
|
|
2227
|
+
}
|
|
2228
|
+
const createWorkspaceAdapterFactory = (luvio) => {
|
|
2229
|
+
return function createWorkspace(untrustedConfig) {
|
|
2230
|
+
const config = validateAdapterConfig$4(untrustedConfig, createWorkspace_ConfigPropertyNames);
|
|
2231
|
+
// Invalid or incomplete config
|
|
2232
|
+
if (config === null) {
|
|
2233
|
+
throw new Error('Invalid config for "createWorkspace"');
|
|
2234
|
+
}
|
|
2235
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
2236
|
+
};
|
|
2237
|
+
};
|
|
2238
|
+
|
|
2239
|
+
const TTL$2 = 500;
|
|
2240
|
+
const VERSION$2 = "9cc9d397fbf7728f812bb0c66c128f4b";
|
|
2241
|
+
function validate$9(obj, path = 'SubscriptionDigestConfigOutputRepresentation') {
|
|
2242
|
+
const v_error = (() => {
|
|
2243
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2244
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2245
|
+
}
|
|
2246
|
+
const obj_isEnabled = obj.isEnabled;
|
|
2247
|
+
const path_isEnabled = path + '.isEnabled';
|
|
2248
|
+
if (typeof obj_isEnabled !== 'boolean') {
|
|
2249
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isEnabled + '" (at "' + path_isEnabled + '")');
|
|
2250
|
+
}
|
|
2251
|
+
const obj_scheduleType = obj.scheduleType;
|
|
2252
|
+
const path_scheduleType = path + '.scheduleType';
|
|
2253
|
+
if (typeof obj_scheduleType !== 'string') {
|
|
2254
|
+
return new TypeError('Expected "string" but received "' + typeof obj_scheduleType + '" (at "' + path_scheduleType + '")');
|
|
2255
|
+
}
|
|
2256
|
+
const obj_userId = obj.userId;
|
|
2257
|
+
const path_userId = path + '.userId';
|
|
2258
|
+
if (typeof obj_userId !== 'string') {
|
|
2259
|
+
return new TypeError('Expected "string" but received "' + typeof obj_userId + '" (at "' + path_userId + '")');
|
|
2260
|
+
}
|
|
2261
|
+
})();
|
|
2262
|
+
return v_error === undefined ? null : v_error;
|
|
2263
|
+
}
|
|
2264
|
+
const RepresentationType$2 = 'SubscriptionDigestConfigOutputRepresentation';
|
|
2265
|
+
function keyBuilder$4(luvio, config) {
|
|
2266
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.userId;
|
|
2267
|
+
}
|
|
2268
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
2269
|
+
const keyParams = {
|
|
2270
|
+
userId: object.userId
|
|
2271
|
+
};
|
|
2272
|
+
return keyBuilder$4(luvio, keyParams);
|
|
2273
|
+
}
|
|
2274
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
2275
|
+
return input;
|
|
2276
|
+
}
|
|
2277
|
+
const select$6 = function SubscriptionDigestConfigOutputRepresentationSelect() {
|
|
2278
|
+
return {
|
|
2279
|
+
kind: 'Fragment',
|
|
2280
|
+
version: VERSION$2,
|
|
2281
|
+
private: [],
|
|
2282
|
+
opaque: true
|
|
2283
|
+
};
|
|
2284
|
+
};
|
|
2285
|
+
function equals$2(existing, incoming) {
|
|
2286
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2287
|
+
return false;
|
|
2005
2288
|
}
|
|
2289
|
+
return true;
|
|
2290
|
+
}
|
|
2291
|
+
const ingest$2 = function SubscriptionDigestConfigOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2292
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2293
|
+
const validateError = validate$9(input);
|
|
2294
|
+
if (validateError !== null) {
|
|
2295
|
+
throw validateError;
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
2299
|
+
const ttlToUse = TTL$2;
|
|
2300
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "UnifiedAnalytics", VERSION$2, RepresentationType$2, equals$2);
|
|
2301
|
+
return createLink(key);
|
|
2302
|
+
};
|
|
2303
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
2304
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2305
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
2306
|
+
rootKeySet.set(rootKey, {
|
|
2307
|
+
namespace: keyPrefix,
|
|
2308
|
+
representationName: RepresentationType$2,
|
|
2309
|
+
mergeable: false
|
|
2310
|
+
});
|
|
2006
2311
|
}
|
|
2007
2312
|
|
|
2008
2313
|
function select$5(luvio, params) {
|
|
2009
2314
|
return select$6();
|
|
2010
2315
|
}
|
|
2011
2316
|
function keyBuilder$3(luvio, params) {
|
|
2012
|
-
return
|
|
2317
|
+
return keyBuilder$4(luvio, {
|
|
2318
|
+
userId: params.urlParams.digestConfigOwner
|
|
2319
|
+
});
|
|
2013
2320
|
}
|
|
2014
2321
|
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
2015
|
-
getTypeCacheKeys$2(storeKeyMap, luvio, response
|
|
2322
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
2016
2323
|
}
|
|
2017
2324
|
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
2018
2325
|
const { body } = response;
|
|
@@ -2034,37 +2341,42 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2034
2341
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
2035
2342
|
const key = keyBuilder$3(luvio, params);
|
|
2036
2343
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2037
|
-
|
|
2344
|
+
const storeMetadataParams = {
|
|
2345
|
+
ttl: TTL$2,
|
|
2346
|
+
namespace: keyPrefix,
|
|
2347
|
+
version: VERSION$2,
|
|
2348
|
+
representationName: RepresentationType$2
|
|
2349
|
+
};
|
|
2350
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2038
2351
|
return errorSnapshot;
|
|
2039
2352
|
}
|
|
2040
2353
|
function createResourceRequest$3(config) {
|
|
2041
2354
|
const headers = {};
|
|
2042
2355
|
return {
|
|
2043
2356
|
baseUri: '/services/data/v62.0',
|
|
2044
|
-
basePath: '/unified-analytics/
|
|
2357
|
+
basePath: '/unified-analytics/subscriptions/digest/' + config.urlParams.digestConfigOwner + '',
|
|
2045
2358
|
method: 'get',
|
|
2046
2359
|
body: null,
|
|
2047
|
-
urlParams:
|
|
2048
|
-
queryParams:
|
|
2360
|
+
urlParams: config.urlParams,
|
|
2361
|
+
queryParams: {},
|
|
2049
2362
|
headers,
|
|
2050
2363
|
priority: 'normal',
|
|
2051
2364
|
};
|
|
2052
2365
|
}
|
|
2053
2366
|
|
|
2054
|
-
const adapterName$3 = '
|
|
2055
|
-
const
|
|
2056
|
-
generateParamConfigMetadata('
|
|
2057
|
-
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2367
|
+
const adapterName$3 = 'getSubscriptionDigestConfig';
|
|
2368
|
+
const getSubscriptionDigestConfig_ConfigPropertyMetadata = [
|
|
2369
|
+
generateParamConfigMetadata('digestConfigOwner', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2058
2370
|
];
|
|
2059
|
-
const
|
|
2060
|
-
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$
|
|
2371
|
+
const getSubscriptionDigestConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
2372
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$f(getSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
2061
2373
|
function keyBuilder$2(luvio, config) {
|
|
2062
2374
|
const resourceParams = createResourceParams$3(config);
|
|
2063
2375
|
return keyBuilder$3(luvio, resourceParams);
|
|
2064
2376
|
}
|
|
2065
2377
|
function typeCheckConfig$3(untrustedConfig) {
|
|
2066
2378
|
const config = {};
|
|
2067
|
-
typeCheckConfig$
|
|
2379
|
+
typeCheckConfig$f(untrustedConfig, config, getSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
2068
2380
|
return config;
|
|
2069
2381
|
}
|
|
2070
2382
|
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
@@ -2113,7 +2425,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
2113
2425
|
});
|
|
2114
2426
|
}
|
|
2115
2427
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
2116
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2428
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
2117
2429
|
}
|
|
2118
2430
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
2119
2431
|
const { luvio, config } = context;
|
|
@@ -2128,8 +2440,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
2128
2440
|
});
|
|
2129
2441
|
return cacheSnapshot;
|
|
2130
2442
|
}
|
|
2131
|
-
const
|
|
2132
|
-
const config = validateAdapterConfig$3(untrustedConfig,
|
|
2443
|
+
const getSubscriptionDigestConfigAdapterFactory = (luvio) => function UnifiedAnalytics__getSubscriptionDigestConfig(untrustedConfig, requestContext) {
|
|
2444
|
+
const config = validateAdapterConfig$3(untrustedConfig, getSubscriptionDigestConfig_ConfigPropertyNames);
|
|
2133
2445
|
// Invalid or incomplete config
|
|
2134
2446
|
if (config === null) {
|
|
2135
2447
|
return null;
|
|
@@ -2139,15 +2451,15 @@ const getWorkspacesAdapterFactory = (luvio) => function UnifiedAnalytics__getWor
|
|
|
2139
2451
|
};
|
|
2140
2452
|
|
|
2141
2453
|
function select$4(luvio, params) {
|
|
2142
|
-
return select$
|
|
2454
|
+
return select$6();
|
|
2143
2455
|
}
|
|
2144
2456
|
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
2145
|
-
getTypeCacheKeys$
|
|
2457
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
2146
2458
|
}
|
|
2147
2459
|
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
2148
2460
|
const { body } = response;
|
|
2149
2461
|
const key = keyBuilderFromType$2(luvio, body);
|
|
2150
|
-
luvio.storeIngest(key, ingest$
|
|
2462
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
2151
2463
|
const snapshot = luvio.storeLookup({
|
|
2152
2464
|
recordId: key,
|
|
2153
2465
|
node: select$4(),
|
|
@@ -2165,28 +2477,27 @@ function createResourceRequest$2(config) {
|
|
|
2165
2477
|
const headers = {};
|
|
2166
2478
|
return {
|
|
2167
2479
|
baseUri: '/services/data/v62.0',
|
|
2168
|
-
basePath: '/unified-analytics/
|
|
2169
|
-
method: '
|
|
2480
|
+
basePath: '/unified-analytics/subscriptions/digest/' + config.urlParams.digestConfigOwner + '',
|
|
2481
|
+
method: 'patch',
|
|
2170
2482
|
body: config.body,
|
|
2171
|
-
urlParams:
|
|
2483
|
+
urlParams: config.urlParams,
|
|
2172
2484
|
queryParams: {},
|
|
2173
2485
|
headers,
|
|
2174
2486
|
priority: 'normal',
|
|
2175
2487
|
};
|
|
2176
2488
|
}
|
|
2177
2489
|
|
|
2178
|
-
const adapterName$2 = '
|
|
2179
|
-
const
|
|
2180
|
-
generateParamConfigMetadata('
|
|
2181
|
-
generateParamConfigMetadata('
|
|
2182
|
-
generateParamConfigMetadata('
|
|
2183
|
-
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
2490
|
+
const adapterName$2 = 'updateSubscriptionDigestConfig';
|
|
2491
|
+
const updateSubscriptionDigestConfig_ConfigPropertyMetadata = [
|
|
2492
|
+
generateParamConfigMetadata('digestConfigOwner', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2493
|
+
generateParamConfigMetadata('isEnabled', true, 2 /* Body */, 1 /* Boolean */),
|
|
2494
|
+
generateParamConfigMetadata('scheduleType', true, 2 /* Body */, 0 /* String */),
|
|
2184
2495
|
];
|
|
2185
|
-
const
|
|
2186
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
2496
|
+
const updateSubscriptionDigestConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, updateSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
2497
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$f(updateSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
2187
2498
|
function typeCheckConfig$2(untrustedConfig) {
|
|
2188
2499
|
const config = {};
|
|
2189
|
-
typeCheckConfig$
|
|
2500
|
+
typeCheckConfig$f(untrustedConfig, config, updateSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
2190
2501
|
return config;
|
|
2191
2502
|
}
|
|
2192
2503
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -2220,12 +2531,12 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
2220
2531
|
throw response;
|
|
2221
2532
|
});
|
|
2222
2533
|
}
|
|
2223
|
-
const
|
|
2224
|
-
return function
|
|
2225
|
-
const config = validateAdapterConfig$2(untrustedConfig,
|
|
2534
|
+
const updateSubscriptionDigestConfigAdapterFactory = (luvio) => {
|
|
2535
|
+
return function updateSubscriptionDigestConfig(untrustedConfig) {
|
|
2536
|
+
const config = validateAdapterConfig$2(untrustedConfig, updateSubscriptionDigestConfig_ConfigPropertyNames);
|
|
2226
2537
|
// Invalid or incomplete config
|
|
2227
2538
|
if (config === null) {
|
|
2228
|
-
throw new Error('Invalid config for "
|
|
2539
|
+
throw new Error('Invalid config for "updateSubscriptionDigestConfig"');
|
|
2229
2540
|
}
|
|
2230
2541
|
return buildNetworkSnapshot$2(luvio, config);
|
|
2231
2542
|
};
|
|
@@ -2895,7 +3206,7 @@ const getListViewAnalyticsLibrary_ConfigPropertyMetadata = [
|
|
|
2895
3206
|
generateParamConfigMetadata('input_collection', true, 2 /* Body */, 4 /* Unsupported */),
|
|
2896
3207
|
];
|
|
2897
3208
|
const getListViewAnalyticsLibrary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getListViewAnalyticsLibrary_ConfigPropertyMetadata);
|
|
2898
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
3209
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$f(getListViewAnalyticsLibrary_ConfigPropertyMetadata);
|
|
2899
3210
|
function typeCheckConfig$1(untrustedConfig) {
|
|
2900
3211
|
const config = {};
|
|
2901
3212
|
const untrustedConfig_input_collection = untrustedConfig.input_collection;
|
|
@@ -3132,7 +3443,7 @@ const getUnifiedAnalyticsLibraryAssets_ConfigPropertyMetadata = [
|
|
|
3132
3443
|
generateParamConfigMetadata('searchToken', false, 2 /* Body */, 4 /* Unsupported */),
|
|
3133
3444
|
];
|
|
3134
3445
|
const getUnifiedAnalyticsLibraryAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getUnifiedAnalyticsLibraryAssets_ConfigPropertyMetadata);
|
|
3135
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
3446
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$f(getUnifiedAnalyticsLibraryAssets_ConfigPropertyMetadata);
|
|
3136
3447
|
function typeCheckConfig(untrustedConfig) {
|
|
3137
3448
|
const config = {};
|
|
3138
3449
|
const untrustedConfig_assetTypes = untrustedConfig.assetTypes;
|
|
@@ -3241,4 +3552,4 @@ const getUnifiedAnalyticsLibraryAssetsAdapterFactory = (luvio) => {
|
|
|
3241
3552
|
};
|
|
3242
3553
|
};
|
|
3243
3554
|
|
|
3244
|
-
export { createDashboardAdapterFactory, createWorkspaceAdapterFactory, deleteDashboardAdapterFactory, deleteVisualizationAdapterFactory, getDashboardByNameAdapterFactory, getDashboardsAdapterFactory, getListViewAnalyticsLibraryAdapterFactory, getUnifiedAnalyticsLibraryAssetsAdapterFactory, getVisualizationAdapterFactory, getVisualizationsAdapterFactory, getWorkspacesAdapterFactory, queryAssetsAdapterFactory, updateDashboardAdapterFactory };
|
|
3555
|
+
export { createDashboardAdapterFactory, createWorkspaceAdapterFactory, deleteDashboardAdapterFactory, deleteVisualizationAdapterFactory, getDashboardByNameAdapterFactory, getDashboardsAdapterFactory, getListViewAnalyticsLibraryAdapterFactory, getSubscriptionDigestConfigAdapterFactory, getUnifiedAnalyticsLibraryAssetsAdapterFactory, getVisualizationAdapterFactory, getVisualizationsAdapterFactory, getWorkspacesAdapterFactory, queryAssetsAdapterFactory, updateDashboardAdapterFactory, updateSubscriptionDigestConfigAdapterFactory };
|