@salesforce/lds-adapters-service-network-data-category 1.248.0 → 1.249.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/service-network-data-category.js +324 -186
- package/dist/es/es2018/types/src/generated/adapters/getChildCategories.d.ts +33 -0
- package/dist/es/es2018/types/src/generated/adapters/getParentNetworkDataCategoryPath.d.ts +4 -4
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/getConnectCommunitiesNetworkDataCategoryChildCategoryByCommunityIdAndNetworkDataCategoryId.d.ts +23 -0
- package/dist/es/es2018/types/src/generated/types/NetworkDataCategoryRepresentation.d.ts +3 -3
- package/package.json +1 -1
- package/sfdc/index.js +350 -204
- package/src/raml/api.raml +35 -2
- package/src/raml/luvio.raml +5 -1
- /package/dist/es/es2018/types/src/generated/resources/{getConnectCommunitiesNetworkDataCategoryParentNetworkDataCategoryPathByCommunityIdAndNetworkDataCategoryId.d.ts → getConnectCommunitiesNetworkDataCategoryParentPathByCommunityIdAndNetworkDataCategoryId.d.ts} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$6, typeCheckConfig as typeCheckConfig$7, StoreKeyMap, createResourceParams as createResourceParams$7 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -173,7 +173,7 @@ function validate$9(obj, path = 'ServiceCatalogItemRepresentation') {
|
|
|
173
173
|
})();
|
|
174
174
|
return v_error === undefined ? null : v_error;
|
|
175
175
|
}
|
|
176
|
-
const select$
|
|
176
|
+
const select$f = function ServiceCatalogItemRepresentationSelect() {
|
|
177
177
|
return {
|
|
178
178
|
kind: 'Fragment',
|
|
179
179
|
version: VERSION$8,
|
|
@@ -277,8 +277,8 @@ const RepresentationType$4 = 'ServiceCatalogItemCollectionRepresentation';
|
|
|
277
277
|
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
278
278
|
return input;
|
|
279
279
|
}
|
|
280
|
-
const select$
|
|
281
|
-
const { selections: ServiceCatalogItemRepresentation__selections, opaque: ServiceCatalogItemRepresentation__opaque, } = select$
|
|
280
|
+
const select$e = function ServiceCatalogItemCollectionRepresentationSelect() {
|
|
281
|
+
const { selections: ServiceCatalogItemRepresentation__selections, opaque: ServiceCatalogItemRepresentation__opaque, } = select$f();
|
|
282
282
|
return {
|
|
283
283
|
kind: 'Fragment',
|
|
284
284
|
version: VERSION$7,
|
|
@@ -328,22 +328,22 @@ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
function select$
|
|
332
|
-
return select$
|
|
331
|
+
function select$d(luvio, params) {
|
|
332
|
+
return select$e();
|
|
333
333
|
}
|
|
334
|
-
function keyBuilder$
|
|
334
|
+
function keyBuilder$d(luvio, params) {
|
|
335
335
|
return keyPrefix + '::ServiceCatalogItemCollectionRepresentation:(' + 'pageSize:' + params.queryParams.pageSize + ',' + 'pageNumber:' + params.queryParams.pageNumber + ',' + 'sortOrder:' + params.queryParams.sortOrder + ',' + 'sortedBy:' + params.queryParams.sortedBy + ',' + 'networkDataCategoryId:' + params.urlParams.networkDataCategoryId + ')';
|
|
336
336
|
}
|
|
337
|
-
function getResponseCacheKeys$
|
|
338
|
-
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$
|
|
337
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
338
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$d(luvio, resourceParams));
|
|
339
339
|
}
|
|
340
|
-
function ingestSuccess$
|
|
340
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
341
341
|
const { body } = response;
|
|
342
|
-
const key = keyBuilder$
|
|
342
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
343
343
|
luvio.storeIngest(key, ingest$4, body);
|
|
344
344
|
const snapshot = luvio.storeLookup({
|
|
345
345
|
recordId: key,
|
|
346
|
-
node: select$
|
|
346
|
+
node: select$d(),
|
|
347
347
|
variables: {},
|
|
348
348
|
}, snapshotRefresh);
|
|
349
349
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -354,13 +354,13 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
354
354
|
deepFreeze(snapshot.data);
|
|
355
355
|
return snapshot;
|
|
356
356
|
}
|
|
357
|
-
function ingestError$
|
|
358
|
-
const key = keyBuilder$
|
|
357
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
358
|
+
const key = keyBuilder$d(luvio, params);
|
|
359
359
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
360
360
|
luvio.storeIngestError(key, errorSnapshot);
|
|
361
361
|
return errorSnapshot;
|
|
362
362
|
}
|
|
363
|
-
function createResourceRequest$
|
|
363
|
+
function createResourceRequest$6(config) {
|
|
364
364
|
const headers = {};
|
|
365
365
|
return {
|
|
366
366
|
baseUri: '/services/data/v60.0',
|
|
@@ -374,7 +374,7 @@ function createResourceRequest$5(config) {
|
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
|
|
377
|
-
const adapterName$
|
|
377
|
+
const adapterName$6 = 'getServiceCatalogItems';
|
|
378
378
|
const getServiceCatalogItems_ConfigPropertyMetadata = [
|
|
379
379
|
generateParamConfigMetadata('networkDataCategoryId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
380
380
|
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
@@ -382,104 +382,104 @@ const getServiceCatalogItems_ConfigPropertyMetadata = [
|
|
|
382
382
|
generateParamConfigMetadata('sortOrder', false, 1 /* QueryParameter */, 0 /* String */),
|
|
383
383
|
generateParamConfigMetadata('sortedBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
384
384
|
];
|
|
385
|
-
const getServiceCatalogItems_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
386
|
-
const createResourceParams$
|
|
387
|
-
function keyBuilder$
|
|
388
|
-
const resourceParams = createResourceParams$
|
|
389
|
-
return keyBuilder$
|
|
385
|
+
const getServiceCatalogItems_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getServiceCatalogItems_ConfigPropertyMetadata);
|
|
386
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$7(getServiceCatalogItems_ConfigPropertyMetadata);
|
|
387
|
+
function keyBuilder$c(luvio, config) {
|
|
388
|
+
const resourceParams = createResourceParams$6(config);
|
|
389
|
+
return keyBuilder$d(luvio, resourceParams);
|
|
390
390
|
}
|
|
391
|
-
function typeCheckConfig$
|
|
391
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
392
392
|
const config = {};
|
|
393
|
-
typeCheckConfig$
|
|
393
|
+
typeCheckConfig$7(untrustedConfig, config, getServiceCatalogItems_ConfigPropertyMetadata);
|
|
394
394
|
return config;
|
|
395
395
|
}
|
|
396
|
-
function validateAdapterConfig$
|
|
396
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
397
397
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
398
398
|
return null;
|
|
399
399
|
}
|
|
400
400
|
if (process.env.NODE_ENV !== 'production') {
|
|
401
401
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
402
402
|
}
|
|
403
|
-
const config = typeCheckConfig$
|
|
403
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
404
404
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
405
405
|
return null;
|
|
406
406
|
}
|
|
407
407
|
return config;
|
|
408
408
|
}
|
|
409
|
-
function adapterFragment$
|
|
410
|
-
createResourceParams$
|
|
411
|
-
return select$
|
|
409
|
+
function adapterFragment$5(luvio, config) {
|
|
410
|
+
createResourceParams$6(config);
|
|
411
|
+
return select$d();
|
|
412
412
|
}
|
|
413
|
-
function onFetchResponseSuccess$
|
|
414
|
-
const snapshot = ingestSuccess$
|
|
413
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
414
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
415
415
|
config,
|
|
416
|
-
resolve: () => buildNetworkSnapshot$
|
|
416
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
417
417
|
});
|
|
418
418
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
419
419
|
}
|
|
420
|
-
function onFetchResponseError$
|
|
421
|
-
const snapshot = ingestError$
|
|
420
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
421
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
422
422
|
config,
|
|
423
|
-
resolve: () => buildNetworkSnapshot$
|
|
423
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
424
424
|
});
|
|
425
425
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
426
426
|
}
|
|
427
|
-
function buildNetworkSnapshot$
|
|
428
|
-
const resourceParams = createResourceParams$
|
|
429
|
-
const request = createResourceRequest$
|
|
427
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
428
|
+
const resourceParams = createResourceParams$6(config);
|
|
429
|
+
const request = createResourceRequest$6(resourceParams);
|
|
430
430
|
return luvio.dispatchResourceRequest(request, options)
|
|
431
431
|
.then((response) => {
|
|
432
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
432
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
433
433
|
const cache = new StoreKeyMap();
|
|
434
|
-
getResponseCacheKeys$
|
|
434
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
435
435
|
return cache;
|
|
436
436
|
});
|
|
437
437
|
}, (response) => {
|
|
438
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
438
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
439
439
|
});
|
|
440
440
|
}
|
|
441
|
-
function buildNetworkSnapshotCachePolicy$
|
|
442
|
-
return buildNetworkSnapshotCachePolicy$
|
|
441
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
442
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
443
443
|
}
|
|
444
|
-
function buildCachedSnapshotCachePolicy$
|
|
444
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
445
445
|
const { luvio, config } = context;
|
|
446
446
|
const selector = {
|
|
447
|
-
recordId: keyBuilder$
|
|
448
|
-
node: adapterFragment$
|
|
447
|
+
recordId: keyBuilder$c(luvio, config),
|
|
448
|
+
node: adapterFragment$5(luvio, config),
|
|
449
449
|
variables: {},
|
|
450
450
|
};
|
|
451
451
|
const cacheSnapshot = storeLookup(selector, {
|
|
452
452
|
config,
|
|
453
|
-
resolve: () => buildNetworkSnapshot$
|
|
453
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
454
454
|
});
|
|
455
455
|
return cacheSnapshot;
|
|
456
456
|
}
|
|
457
457
|
const getServiceCatalogItemsAdapterFactory = (luvio) => function NetworkDataCategory__getServiceCatalogItems(untrustedConfig, requestContext) {
|
|
458
|
-
const config = validateAdapterConfig$
|
|
458
|
+
const config = validateAdapterConfig$6(untrustedConfig, getServiceCatalogItems_ConfigPropertyNames);
|
|
459
459
|
// Invalid or incomplete config
|
|
460
460
|
if (config === null) {
|
|
461
461
|
return null;
|
|
462
462
|
}
|
|
463
463
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
464
|
-
buildCachedSnapshotCachePolicy$
|
|
464
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
465
465
|
};
|
|
466
466
|
|
|
467
|
-
function select$
|
|
468
|
-
return select$
|
|
467
|
+
function select$c(luvio, params) {
|
|
468
|
+
return select$e();
|
|
469
469
|
}
|
|
470
|
-
function keyBuilder$
|
|
470
|
+
function keyBuilder$b(luvio, params) {
|
|
471
471
|
return keyPrefix + '::ServiceCatalogItemCollectionRepresentation:(' + 'pageSize:' + params.queryParams.pageSize + ',' + 'pageNumber:' + params.queryParams.pageNumber + ',' + 'sortOrder:' + params.queryParams.sortOrder + ',' + 'sortedBy:' + params.queryParams.sortedBy + ',' + 'networkDataCategoryId:' + params.urlParams.networkDataCategoryId + ',' + 'communityId:' + params.urlParams.communityId + ')';
|
|
472
472
|
}
|
|
473
|
-
function getResponseCacheKeys$
|
|
474
|
-
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$
|
|
473
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
474
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
475
475
|
}
|
|
476
|
-
function ingestSuccess$
|
|
476
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
477
477
|
const { body } = response;
|
|
478
|
-
const key = keyBuilder$
|
|
478
|
+
const key = keyBuilder$b(luvio, resourceParams);
|
|
479
479
|
luvio.storeIngest(key, ingest$4, body);
|
|
480
480
|
const snapshot = luvio.storeLookup({
|
|
481
481
|
recordId: key,
|
|
482
|
-
node: select$
|
|
482
|
+
node: select$c(),
|
|
483
483
|
variables: {},
|
|
484
484
|
}, snapshotRefresh);
|
|
485
485
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -490,13 +490,13 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
490
490
|
deepFreeze(snapshot.data);
|
|
491
491
|
return snapshot;
|
|
492
492
|
}
|
|
493
|
-
function ingestError$
|
|
494
|
-
const key = keyBuilder$
|
|
493
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
494
|
+
const key = keyBuilder$b(luvio, params);
|
|
495
495
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
496
496
|
luvio.storeIngestError(key, errorSnapshot);
|
|
497
497
|
return errorSnapshot;
|
|
498
498
|
}
|
|
499
|
-
function createResourceRequest$
|
|
499
|
+
function createResourceRequest$5(config) {
|
|
500
500
|
const headers = {};
|
|
501
501
|
return {
|
|
502
502
|
baseUri: '/services/data/v60.0',
|
|
@@ -510,7 +510,7 @@ function createResourceRequest$4(config) {
|
|
|
510
510
|
};
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
-
const adapterName$
|
|
513
|
+
const adapterName$5 = 'getServiceCatalogItemsForCommunity';
|
|
514
514
|
const getServiceCatalogItemsForCommunity_ConfigPropertyMetadata = [
|
|
515
515
|
generateParamConfigMetadata('networkDataCategoryId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
516
516
|
generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
@@ -519,86 +519,86 @@ const getServiceCatalogItemsForCommunity_ConfigPropertyMetadata = [
|
|
|
519
519
|
generateParamConfigMetadata('sortOrder', false, 1 /* QueryParameter */, 0 /* String */),
|
|
520
520
|
generateParamConfigMetadata('sortedBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
521
521
|
];
|
|
522
|
-
const getServiceCatalogItemsForCommunity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
523
|
-
const createResourceParams$
|
|
524
|
-
function keyBuilder$
|
|
525
|
-
const resourceParams = createResourceParams$
|
|
526
|
-
return keyBuilder$
|
|
522
|
+
const getServiceCatalogItemsForCommunity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getServiceCatalogItemsForCommunity_ConfigPropertyMetadata);
|
|
523
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$7(getServiceCatalogItemsForCommunity_ConfigPropertyMetadata);
|
|
524
|
+
function keyBuilder$a(luvio, config) {
|
|
525
|
+
const resourceParams = createResourceParams$5(config);
|
|
526
|
+
return keyBuilder$b(luvio, resourceParams);
|
|
527
527
|
}
|
|
528
|
-
function typeCheckConfig$
|
|
528
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
529
529
|
const config = {};
|
|
530
|
-
typeCheckConfig$
|
|
530
|
+
typeCheckConfig$7(untrustedConfig, config, getServiceCatalogItemsForCommunity_ConfigPropertyMetadata);
|
|
531
531
|
return config;
|
|
532
532
|
}
|
|
533
|
-
function validateAdapterConfig$
|
|
533
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
534
534
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
535
535
|
return null;
|
|
536
536
|
}
|
|
537
537
|
if (process.env.NODE_ENV !== 'production') {
|
|
538
538
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
539
539
|
}
|
|
540
|
-
const config = typeCheckConfig$
|
|
540
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
541
541
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
542
542
|
return null;
|
|
543
543
|
}
|
|
544
544
|
return config;
|
|
545
545
|
}
|
|
546
|
-
function adapterFragment$
|
|
547
|
-
createResourceParams$
|
|
548
|
-
return select$
|
|
546
|
+
function adapterFragment$4(luvio, config) {
|
|
547
|
+
createResourceParams$5(config);
|
|
548
|
+
return select$c();
|
|
549
549
|
}
|
|
550
|
-
function onFetchResponseSuccess$
|
|
551
|
-
const snapshot = ingestSuccess$
|
|
550
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
551
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
552
552
|
config,
|
|
553
|
-
resolve: () => buildNetworkSnapshot$
|
|
553
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
554
554
|
});
|
|
555
555
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
556
556
|
}
|
|
557
|
-
function onFetchResponseError$
|
|
558
|
-
const snapshot = ingestError$
|
|
557
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
558
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
559
559
|
config,
|
|
560
|
-
resolve: () => buildNetworkSnapshot$
|
|
560
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
561
561
|
});
|
|
562
562
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
563
563
|
}
|
|
564
|
-
function buildNetworkSnapshot$
|
|
565
|
-
const resourceParams = createResourceParams$
|
|
566
|
-
const request = createResourceRequest$
|
|
564
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
565
|
+
const resourceParams = createResourceParams$5(config);
|
|
566
|
+
const request = createResourceRequest$5(resourceParams);
|
|
567
567
|
return luvio.dispatchResourceRequest(request, options)
|
|
568
568
|
.then((response) => {
|
|
569
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
569
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
570
570
|
const cache = new StoreKeyMap();
|
|
571
|
-
getResponseCacheKeys$
|
|
571
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
572
572
|
return cache;
|
|
573
573
|
});
|
|
574
574
|
}, (response) => {
|
|
575
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
575
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
576
576
|
});
|
|
577
577
|
}
|
|
578
|
-
function buildNetworkSnapshotCachePolicy$
|
|
579
|
-
return buildNetworkSnapshotCachePolicy$
|
|
578
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
579
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
580
580
|
}
|
|
581
|
-
function buildCachedSnapshotCachePolicy$
|
|
581
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
582
582
|
const { luvio, config } = context;
|
|
583
583
|
const selector = {
|
|
584
|
-
recordId: keyBuilder$
|
|
585
|
-
node: adapterFragment$
|
|
584
|
+
recordId: keyBuilder$a(luvio, config),
|
|
585
|
+
node: adapterFragment$4(luvio, config),
|
|
586
586
|
variables: {},
|
|
587
587
|
};
|
|
588
588
|
const cacheSnapshot = storeLookup(selector, {
|
|
589
589
|
config,
|
|
590
|
-
resolve: () => buildNetworkSnapshot$
|
|
590
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
591
591
|
});
|
|
592
592
|
return cacheSnapshot;
|
|
593
593
|
}
|
|
594
594
|
const getServiceCatalogItemsForCommunityAdapterFactory = (luvio) => function NetworkDataCategory__getServiceCatalogItemsForCommunity(untrustedConfig, requestContext) {
|
|
595
|
-
const config = validateAdapterConfig$
|
|
595
|
+
const config = validateAdapterConfig$5(untrustedConfig, getServiceCatalogItemsForCommunity_ConfigPropertyNames);
|
|
596
596
|
// Invalid or incomplete config
|
|
597
597
|
if (config === null) {
|
|
598
598
|
return null;
|
|
599
599
|
}
|
|
600
600
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
601
|
-
buildCachedSnapshotCachePolicy$
|
|
601
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
602
602
|
};
|
|
603
603
|
|
|
604
604
|
const VERSION$6 = "f3960577caf41d925ed00b2cc2e508e8";
|
|
@@ -640,7 +640,7 @@ function validate$7(obj, path = 'LightningKnowledgeArticleVersionRepresentation'
|
|
|
640
640
|
})();
|
|
641
641
|
return v_error === undefined ? null : v_error;
|
|
642
642
|
}
|
|
643
|
-
const select$
|
|
643
|
+
const select$b = function LightningKnowledgeArticleVersionRepresentationSelect() {
|
|
644
644
|
return {
|
|
645
645
|
kind: 'Fragment',
|
|
646
646
|
version: VERSION$6,
|
|
@@ -735,8 +735,8 @@ const RepresentationType$3 = 'LightningKnowledgeArticleVersionCollectionRepresen
|
|
|
735
735
|
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
736
736
|
return input;
|
|
737
737
|
}
|
|
738
|
-
const select$
|
|
739
|
-
const { selections: LightningKnowledgeArticleVersionRepresentation__selections, opaque: LightningKnowledgeArticleVersionRepresentation__opaque, } = select$
|
|
738
|
+
const select$a = function LightningKnowledgeArticleVersionCollectionRepresentationSelect() {
|
|
739
|
+
const { selections: LightningKnowledgeArticleVersionRepresentation__selections, opaque: LightningKnowledgeArticleVersionRepresentation__opaque, } = select$b();
|
|
740
740
|
return {
|
|
741
741
|
kind: 'Fragment',
|
|
742
742
|
version: VERSION$5,
|
|
@@ -786,22 +786,22 @@ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
786
786
|
});
|
|
787
787
|
}
|
|
788
788
|
|
|
789
|
-
function select$
|
|
790
|
-
return select$
|
|
789
|
+
function select$9(luvio, params) {
|
|
790
|
+
return select$a();
|
|
791
791
|
}
|
|
792
|
-
function keyBuilder$
|
|
792
|
+
function keyBuilder$9(luvio, params) {
|
|
793
793
|
return keyPrefix + '::LightningKnowledgeArticleVersionCollectionRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'pageNumber:' + params.queryParams.pageNumber + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'sortOrder:' + params.queryParams.sortOrder + ',' + 'sortedBy:' + params.queryParams.sortedBy + ',' + 'networkDataCategoryId:' + params.urlParams.networkDataCategoryId + ',' + 'communityId:' + params.urlParams.communityId + ')';
|
|
794
794
|
}
|
|
795
|
-
function getResponseCacheKeys$
|
|
796
|
-
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$
|
|
795
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
796
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
797
797
|
}
|
|
798
|
-
function ingestSuccess$
|
|
798
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
799
799
|
const { body } = response;
|
|
800
|
-
const key = keyBuilder$
|
|
800
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
801
801
|
luvio.storeIngest(key, ingest$3, body);
|
|
802
802
|
const snapshot = luvio.storeLookup({
|
|
803
803
|
recordId: key,
|
|
804
|
-
node: select$
|
|
804
|
+
node: select$9(),
|
|
805
805
|
variables: {},
|
|
806
806
|
}, snapshotRefresh);
|
|
807
807
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -812,13 +812,13 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
812
812
|
deepFreeze(snapshot.data);
|
|
813
813
|
return snapshot;
|
|
814
814
|
}
|
|
815
|
-
function ingestError$
|
|
816
|
-
const key = keyBuilder$
|
|
815
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
816
|
+
const key = keyBuilder$9(luvio, params);
|
|
817
817
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
818
818
|
luvio.storeIngestError(key, errorSnapshot);
|
|
819
819
|
return errorSnapshot;
|
|
820
820
|
}
|
|
821
|
-
function createResourceRequest$
|
|
821
|
+
function createResourceRequest$4(config) {
|
|
822
822
|
const headers = {};
|
|
823
823
|
return {
|
|
824
824
|
baseUri: '/services/data/v60.0',
|
|
@@ -832,7 +832,7 @@ function createResourceRequest$3(config) {
|
|
|
832
832
|
};
|
|
833
833
|
}
|
|
834
834
|
|
|
835
|
-
const adapterName$
|
|
835
|
+
const adapterName$4 = 'getArticlesForCategory';
|
|
836
836
|
const getArticlesForCategory_ConfigPropertyMetadata = [
|
|
837
837
|
generateParamConfigMetadata('networkDataCategoryId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
838
838
|
generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
@@ -842,89 +842,89 @@ const getArticlesForCategory_ConfigPropertyMetadata = [
|
|
|
842
842
|
generateParamConfigMetadata('sortOrder', false, 1 /* QueryParameter */, 0 /* String */),
|
|
843
843
|
generateParamConfigMetadata('sortedBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
844
844
|
];
|
|
845
|
-
const getArticlesForCategory_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
846
|
-
const createResourceParams$
|
|
847
|
-
function keyBuilder$
|
|
848
|
-
const resourceParams = createResourceParams$
|
|
849
|
-
return keyBuilder$
|
|
845
|
+
const getArticlesForCategory_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getArticlesForCategory_ConfigPropertyMetadata);
|
|
846
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(getArticlesForCategory_ConfigPropertyMetadata);
|
|
847
|
+
function keyBuilder$8(luvio, config) {
|
|
848
|
+
const resourceParams = createResourceParams$4(config);
|
|
849
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
850
850
|
}
|
|
851
|
-
function typeCheckConfig$
|
|
851
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
852
852
|
const config = {};
|
|
853
|
-
typeCheckConfig$
|
|
853
|
+
typeCheckConfig$7(untrustedConfig, config, getArticlesForCategory_ConfigPropertyMetadata);
|
|
854
854
|
return config;
|
|
855
855
|
}
|
|
856
|
-
function validateAdapterConfig$
|
|
856
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
857
857
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
858
858
|
return null;
|
|
859
859
|
}
|
|
860
860
|
if (process.env.NODE_ENV !== 'production') {
|
|
861
861
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
862
862
|
}
|
|
863
|
-
const config = typeCheckConfig$
|
|
863
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
864
864
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
865
865
|
return null;
|
|
866
866
|
}
|
|
867
867
|
return config;
|
|
868
868
|
}
|
|
869
|
-
function adapterFragment$
|
|
870
|
-
createResourceParams$
|
|
871
|
-
return select$
|
|
869
|
+
function adapterFragment$3(luvio, config) {
|
|
870
|
+
createResourceParams$4(config);
|
|
871
|
+
return select$9();
|
|
872
872
|
}
|
|
873
|
-
function onFetchResponseSuccess$
|
|
874
|
-
const snapshot = ingestSuccess$
|
|
873
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
874
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
875
875
|
config,
|
|
876
|
-
resolve: () => buildNetworkSnapshot$
|
|
876
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
877
877
|
});
|
|
878
878
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
879
879
|
}
|
|
880
|
-
function onFetchResponseError$
|
|
881
|
-
const snapshot = ingestError$
|
|
880
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
881
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
882
882
|
config,
|
|
883
|
-
resolve: () => buildNetworkSnapshot$
|
|
883
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
884
884
|
});
|
|
885
885
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
886
886
|
}
|
|
887
|
-
function buildNetworkSnapshot$
|
|
888
|
-
const resourceParams = createResourceParams$
|
|
889
|
-
const request = createResourceRequest$
|
|
887
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
888
|
+
const resourceParams = createResourceParams$4(config);
|
|
889
|
+
const request = createResourceRequest$4(resourceParams);
|
|
890
890
|
return luvio.dispatchResourceRequest(request, options)
|
|
891
891
|
.then((response) => {
|
|
892
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
892
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
893
893
|
const cache = new StoreKeyMap();
|
|
894
|
-
getResponseCacheKeys$
|
|
894
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
895
895
|
return cache;
|
|
896
896
|
});
|
|
897
897
|
}, (response) => {
|
|
898
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
898
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
899
899
|
});
|
|
900
900
|
}
|
|
901
|
-
function buildNetworkSnapshotCachePolicy$
|
|
902
|
-
return buildNetworkSnapshotCachePolicy$
|
|
901
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
902
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
903
903
|
}
|
|
904
|
-
function buildCachedSnapshotCachePolicy$
|
|
904
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
905
905
|
const { luvio, config } = context;
|
|
906
906
|
const selector = {
|
|
907
|
-
recordId: keyBuilder$
|
|
908
|
-
node: adapterFragment$
|
|
907
|
+
recordId: keyBuilder$8(luvio, config),
|
|
908
|
+
node: adapterFragment$3(luvio, config),
|
|
909
909
|
variables: {},
|
|
910
910
|
};
|
|
911
911
|
const cacheSnapshot = storeLookup(selector, {
|
|
912
912
|
config,
|
|
913
|
-
resolve: () => buildNetworkSnapshot$
|
|
913
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
914
914
|
});
|
|
915
915
|
return cacheSnapshot;
|
|
916
916
|
}
|
|
917
917
|
const getArticlesForCategoryAdapterFactory = (luvio) => function NetworkDataCategory__getArticlesForCategory(untrustedConfig, requestContext) {
|
|
918
|
-
const config = validateAdapterConfig$
|
|
918
|
+
const config = validateAdapterConfig$4(untrustedConfig, getArticlesForCategory_ConfigPropertyNames);
|
|
919
919
|
// Invalid or incomplete config
|
|
920
920
|
if (config === null) {
|
|
921
921
|
return null;
|
|
922
922
|
}
|
|
923
923
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
924
|
-
buildCachedSnapshotCachePolicy$
|
|
924
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
925
925
|
};
|
|
926
926
|
|
|
927
|
-
const VERSION$4 = "
|
|
927
|
+
const VERSION$4 = "249fa1fed903149ddf5e310c3fc8c1a9";
|
|
928
928
|
function validate$5(obj, path = 'NetworkDataCategoryRepresentation') {
|
|
929
929
|
const v_error = (() => {
|
|
930
930
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1064,38 +1064,38 @@ function validate$5(obj, path = 'NetworkDataCategoryRepresentation') {
|
|
|
1064
1064
|
return new TypeError(message);
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
|
-
if (obj.
|
|
1068
|
-
const
|
|
1069
|
-
const
|
|
1070
|
-
let
|
|
1071
|
-
const
|
|
1072
|
-
if (typeof
|
|
1073
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
1067
|
+
if (obj.relativeUrl !== undefined) {
|
|
1068
|
+
const obj_relativeUrl = obj.relativeUrl;
|
|
1069
|
+
const path_relativeUrl = path + '.relativeUrl';
|
|
1070
|
+
let obj_relativeUrl_union0 = null;
|
|
1071
|
+
const obj_relativeUrl_union0_error = (() => {
|
|
1072
|
+
if (typeof obj_relativeUrl !== 'string') {
|
|
1073
|
+
return new TypeError('Expected "string" but received "' + typeof obj_relativeUrl + '" (at "' + path_relativeUrl + '")');
|
|
1074
1074
|
}
|
|
1075
1075
|
})();
|
|
1076
|
-
if (
|
|
1077
|
-
|
|
1076
|
+
if (obj_relativeUrl_union0_error != null) {
|
|
1077
|
+
obj_relativeUrl_union0 = obj_relativeUrl_union0_error.message;
|
|
1078
1078
|
}
|
|
1079
|
-
let
|
|
1080
|
-
const
|
|
1081
|
-
if (
|
|
1082
|
-
return new TypeError('Expected "null" but received "' + typeof
|
|
1079
|
+
let obj_relativeUrl_union1 = null;
|
|
1080
|
+
const obj_relativeUrl_union1_error = (() => {
|
|
1081
|
+
if (obj_relativeUrl !== null) {
|
|
1082
|
+
return new TypeError('Expected "null" but received "' + typeof obj_relativeUrl + '" (at "' + path_relativeUrl + '")');
|
|
1083
1083
|
}
|
|
1084
1084
|
})();
|
|
1085
|
-
if (
|
|
1086
|
-
|
|
1085
|
+
if (obj_relativeUrl_union1_error != null) {
|
|
1086
|
+
obj_relativeUrl_union1 = obj_relativeUrl_union1_error.message;
|
|
1087
1087
|
}
|
|
1088
|
-
if (
|
|
1089
|
-
let message = 'Object doesn\'t match union (at "' +
|
|
1090
|
-
message += '\n' +
|
|
1091
|
-
message += '\n' +
|
|
1088
|
+
if (obj_relativeUrl_union0 && obj_relativeUrl_union1) {
|
|
1089
|
+
let message = 'Object doesn\'t match union (at "' + path_relativeUrl + '")';
|
|
1090
|
+
message += '\n' + obj_relativeUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1091
|
+
message += '\n' + obj_relativeUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1092
1092
|
return new TypeError(message);
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
1095
1095
|
})();
|
|
1096
1096
|
return v_error === undefined ? null : v_error;
|
|
1097
1097
|
}
|
|
1098
|
-
const select$
|
|
1098
|
+
const select$8 = function NetworkDataCategoryRepresentationSelect() {
|
|
1099
1099
|
return {
|
|
1100
1100
|
kind: 'Fragment',
|
|
1101
1101
|
version: VERSION$4,
|
|
@@ -1135,7 +1135,7 @@ const select$7 = function NetworkDataCategoryRepresentationSelect() {
|
|
|
1135
1135
|
required: false
|
|
1136
1136
|
},
|
|
1137
1137
|
{
|
|
1138
|
-
name: '
|
|
1138
|
+
name: 'relativeUrl',
|
|
1139
1139
|
kind: 'Scalar',
|
|
1140
1140
|
required: false
|
|
1141
1141
|
}
|
|
@@ -1215,16 +1215,16 @@ function equals$4(existing, incoming) {
|
|
|
1215
1215
|
return false;
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
|
-
const
|
|
1219
|
-
const
|
|
1218
|
+
const existing_relativeUrl = existing.relativeUrl;
|
|
1219
|
+
const incoming_relativeUrl = incoming.relativeUrl;
|
|
1220
1220
|
// if at least one of these optionals is defined
|
|
1221
|
-
if (
|
|
1221
|
+
if (existing_relativeUrl !== undefined || incoming_relativeUrl !== undefined) {
|
|
1222
1222
|
// if one of these is not defined we know the other is defined and therefore
|
|
1223
1223
|
// not equal
|
|
1224
|
-
if (
|
|
1224
|
+
if (existing_relativeUrl === undefined || incoming_relativeUrl === undefined) {
|
|
1225
1225
|
return false;
|
|
1226
1226
|
}
|
|
1227
|
-
if (!(
|
|
1227
|
+
if (!(existing_relativeUrl === incoming_relativeUrl)) {
|
|
1228
1228
|
return false;
|
|
1229
1229
|
}
|
|
1230
1230
|
}
|
|
@@ -1259,8 +1259,8 @@ const RepresentationType$2 = 'NetworkDataCategoryCollectionRepresentation';
|
|
|
1259
1259
|
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1260
1260
|
return input;
|
|
1261
1261
|
}
|
|
1262
|
-
const select$
|
|
1263
|
-
const { selections: NetworkDataCategoryRepresentation__selections, opaque: NetworkDataCategoryRepresentation__opaque, } = select$
|
|
1262
|
+
const select$7 = function NetworkDataCategoryCollectionRepresentationSelect() {
|
|
1263
|
+
const { selections: NetworkDataCategoryRepresentation__selections, opaque: NetworkDataCategoryRepresentation__opaque, } = select$8();
|
|
1264
1264
|
return {
|
|
1265
1265
|
kind: 'Fragment',
|
|
1266
1266
|
version: VERSION$3,
|
|
@@ -1310,11 +1310,145 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1310
1310
|
});
|
|
1311
1311
|
}
|
|
1312
1312
|
|
|
1313
|
-
function select$
|
|
1313
|
+
function select$6(luvio, params) {
|
|
1314
|
+
return select$7();
|
|
1315
|
+
}
|
|
1316
|
+
function keyBuilder$7(luvio, params) {
|
|
1317
|
+
return keyPrefix + '::NetworkDataCategoryCollectionRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'communityId:' + params.urlParams.communityId + ',' + 'networkDataCategoryId:' + params.urlParams.networkDataCategoryId + ')';
|
|
1318
|
+
}
|
|
1319
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1320
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
1321
|
+
}
|
|
1322
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
1323
|
+
const { body } = response;
|
|
1324
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
1325
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1326
|
+
const snapshot = luvio.storeLookup({
|
|
1327
|
+
recordId: key,
|
|
1328
|
+
node: select$6(),
|
|
1329
|
+
variables: {},
|
|
1330
|
+
}, snapshotRefresh);
|
|
1331
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1332
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1333
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
deepFreeze(snapshot.data);
|
|
1337
|
+
return snapshot;
|
|
1338
|
+
}
|
|
1339
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
1340
|
+
const key = keyBuilder$7(luvio, params);
|
|
1341
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1342
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1343
|
+
return errorSnapshot;
|
|
1344
|
+
}
|
|
1345
|
+
function createResourceRequest$3(config) {
|
|
1346
|
+
const headers = {};
|
|
1347
|
+
return {
|
|
1348
|
+
baseUri: '/services/data/v60.0',
|
|
1349
|
+
basePath: '/connect/communities/' + config.urlParams.communityId + '/network-data-category/' + config.urlParams.networkDataCategoryId + '/parent-path',
|
|
1350
|
+
method: 'get',
|
|
1351
|
+
body: null,
|
|
1352
|
+
urlParams: config.urlParams,
|
|
1353
|
+
queryParams: config.queryParams,
|
|
1354
|
+
headers,
|
|
1355
|
+
priority: 'normal',
|
|
1356
|
+
};
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
const adapterName$3 = 'getParentNetworkDataCategoryPath';
|
|
1360
|
+
const getParentNetworkDataCategoryPath_ConfigPropertyMetadata = [
|
|
1361
|
+
generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1362
|
+
generateParamConfigMetadata('networkDataCategoryId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1363
|
+
generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1364
|
+
];
|
|
1365
|
+
const getParentNetworkDataCategoryPath_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getParentNetworkDataCategoryPath_ConfigPropertyMetadata);
|
|
1366
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$7(getParentNetworkDataCategoryPath_ConfigPropertyMetadata);
|
|
1367
|
+
function keyBuilder$6(luvio, config) {
|
|
1368
|
+
const resourceParams = createResourceParams$3(config);
|
|
1369
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
1370
|
+
}
|
|
1371
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1372
|
+
const config = {};
|
|
1373
|
+
typeCheckConfig$7(untrustedConfig, config, getParentNetworkDataCategoryPath_ConfigPropertyMetadata);
|
|
1374
|
+
return config;
|
|
1375
|
+
}
|
|
1376
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1377
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1378
|
+
return null;
|
|
1379
|
+
}
|
|
1380
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1381
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1382
|
+
}
|
|
1383
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1384
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1385
|
+
return null;
|
|
1386
|
+
}
|
|
1387
|
+
return config;
|
|
1388
|
+
}
|
|
1389
|
+
function adapterFragment$2(luvio, config) {
|
|
1390
|
+
createResourceParams$3(config);
|
|
1314
1391
|
return select$6();
|
|
1315
1392
|
}
|
|
1393
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
1394
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
1395
|
+
config,
|
|
1396
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1397
|
+
});
|
|
1398
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1399
|
+
}
|
|
1400
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
1401
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
1402
|
+
config,
|
|
1403
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1404
|
+
});
|
|
1405
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1406
|
+
}
|
|
1407
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
1408
|
+
const resourceParams = createResourceParams$3(config);
|
|
1409
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1410
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1411
|
+
.then((response) => {
|
|
1412
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
1413
|
+
const cache = new StoreKeyMap();
|
|
1414
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1415
|
+
return cache;
|
|
1416
|
+
});
|
|
1417
|
+
}, (response) => {
|
|
1418
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1421
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1422
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
1423
|
+
}
|
|
1424
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1425
|
+
const { luvio, config } = context;
|
|
1426
|
+
const selector = {
|
|
1427
|
+
recordId: keyBuilder$6(luvio, config),
|
|
1428
|
+
node: adapterFragment$2(luvio, config),
|
|
1429
|
+
variables: {},
|
|
1430
|
+
};
|
|
1431
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1432
|
+
config,
|
|
1433
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1434
|
+
});
|
|
1435
|
+
return cacheSnapshot;
|
|
1436
|
+
}
|
|
1437
|
+
const getParentNetworkDataCategoryPathAdapterFactory = (luvio) => function NetworkDataCategory__getParentNetworkDataCategoryPath(untrustedConfig, requestContext) {
|
|
1438
|
+
const config = validateAdapterConfig$3(untrustedConfig, getParentNetworkDataCategoryPath_ConfigPropertyNames);
|
|
1439
|
+
// Invalid or incomplete config
|
|
1440
|
+
if (config === null) {
|
|
1441
|
+
return null;
|
|
1442
|
+
}
|
|
1443
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1444
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
1445
|
+
};
|
|
1446
|
+
|
|
1447
|
+
function select$5(luvio, params) {
|
|
1448
|
+
return select$7();
|
|
1449
|
+
}
|
|
1316
1450
|
function keyBuilder$5(luvio, params) {
|
|
1317
|
-
return keyPrefix + '::NetworkDataCategoryCollectionRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'communityId:' + params.urlParams.communityId + ',' + 'networkDataCategoryId:' + params.urlParams.networkDataCategoryId + ')';
|
|
1451
|
+
return keyPrefix + '::NetworkDataCategoryCollectionRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'pageNumber:' + params.queryParams.pageNumber + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'sortOrder:' + params.queryParams.sortOrder + ',' + 'sortedBy:' + params.queryParams.sortedBy + ',' + 'communityId:' + params.urlParams.communityId + ',' + 'networkDataCategoryId:' + params.urlParams.networkDataCategoryId + ')';
|
|
1318
1452
|
}
|
|
1319
1453
|
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1320
1454
|
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
@@ -1346,7 +1480,7 @@ function createResourceRequest$2(config) {
|
|
|
1346
1480
|
const headers = {};
|
|
1347
1481
|
return {
|
|
1348
1482
|
baseUri: '/services/data/v60.0',
|
|
1349
|
-
basePath: '/connect/communities/' + config.urlParams.communityId + '/network-data-category/' + config.urlParams.networkDataCategoryId + '/
|
|
1483
|
+
basePath: '/connect/communities/' + config.urlParams.communityId + '/network-data-category/' + config.urlParams.networkDataCategoryId + '/child-category',
|
|
1350
1484
|
method: 'get',
|
|
1351
1485
|
body: null,
|
|
1352
1486
|
urlParams: config.urlParams,
|
|
@@ -1356,21 +1490,25 @@ function createResourceRequest$2(config) {
|
|
|
1356
1490
|
};
|
|
1357
1491
|
}
|
|
1358
1492
|
|
|
1359
|
-
const adapterName$2 = '
|
|
1360
|
-
const
|
|
1493
|
+
const adapterName$2 = 'getChildCategories';
|
|
1494
|
+
const getChildCategories_ConfigPropertyMetadata = [
|
|
1361
1495
|
generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1362
1496
|
generateParamConfigMetadata('networkDataCategoryId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1363
1497
|
generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1498
|
+
generateParamConfigMetadata('pageNumber', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1499
|
+
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1500
|
+
generateParamConfigMetadata('sortOrder', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1501
|
+
generateParamConfigMetadata('sortedBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1364
1502
|
];
|
|
1365
|
-
const
|
|
1366
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
1503
|
+
const getChildCategories_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getChildCategories_ConfigPropertyMetadata);
|
|
1504
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$7(getChildCategories_ConfigPropertyMetadata);
|
|
1367
1505
|
function keyBuilder$4(luvio, config) {
|
|
1368
1506
|
const resourceParams = createResourceParams$2(config);
|
|
1369
1507
|
return keyBuilder$5(luvio, resourceParams);
|
|
1370
1508
|
}
|
|
1371
1509
|
function typeCheckConfig$2(untrustedConfig) {
|
|
1372
1510
|
const config = {};
|
|
1373
|
-
typeCheckConfig$
|
|
1511
|
+
typeCheckConfig$7(untrustedConfig, config, getChildCategories_ConfigPropertyMetadata);
|
|
1374
1512
|
return config;
|
|
1375
1513
|
}
|
|
1376
1514
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -1419,7 +1557,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
1419
1557
|
});
|
|
1420
1558
|
}
|
|
1421
1559
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1422
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1560
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
1423
1561
|
}
|
|
1424
1562
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1425
1563
|
const { luvio, config } = context;
|
|
@@ -1434,8 +1572,8 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
|
1434
1572
|
});
|
|
1435
1573
|
return cacheSnapshot;
|
|
1436
1574
|
}
|
|
1437
|
-
const
|
|
1438
|
-
const config = validateAdapterConfig$2(untrustedConfig,
|
|
1575
|
+
const getChildCategoriesAdapterFactory = (luvio) => function NetworkDataCategory__getChildCategories(untrustedConfig, requestContext) {
|
|
1576
|
+
const config = validateAdapterConfig$2(untrustedConfig, getChildCategories_ConfigPropertyNames);
|
|
1439
1577
|
// Invalid or incomplete config
|
|
1440
1578
|
if (config === null) {
|
|
1441
1579
|
return null;
|
|
@@ -1490,7 +1628,7 @@ function validate$3(obj, path = 'NetworkDataCategoryGroupRepresentation') {
|
|
|
1490
1628
|
return v_error === undefined ? null : v_error;
|
|
1491
1629
|
}
|
|
1492
1630
|
const select$4 = function NetworkDataCategoryGroupRepresentationSelect() {
|
|
1493
|
-
const { selections: NetworkDataCategoryRepresentation__selections, opaque: NetworkDataCategoryRepresentation__opaque, } = select$
|
|
1631
|
+
const { selections: NetworkDataCategoryRepresentation__selections, opaque: NetworkDataCategoryRepresentation__opaque, } = select$8();
|
|
1494
1632
|
return {
|
|
1495
1633
|
kind: 'Fragment',
|
|
1496
1634
|
version: VERSION$2,
|
|
@@ -1704,14 +1842,14 @@ const getNetworkDataCategories_ConfigPropertyMetadata = [
|
|
|
1704
1842
|
generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1705
1843
|
];
|
|
1706
1844
|
const getNetworkDataCategories_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getNetworkDataCategories_ConfigPropertyMetadata);
|
|
1707
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
1845
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$7(getNetworkDataCategories_ConfigPropertyMetadata);
|
|
1708
1846
|
function keyBuilder$1(luvio, config) {
|
|
1709
1847
|
const resourceParams = createResourceParams$1(config);
|
|
1710
1848
|
return keyBuilder$2(luvio, resourceParams);
|
|
1711
1849
|
}
|
|
1712
1850
|
function typeCheckConfig$1(untrustedConfig) {
|
|
1713
1851
|
const config = {};
|
|
1714
|
-
typeCheckConfig$
|
|
1852
|
+
typeCheckConfig$7(untrustedConfig, config, getNetworkDataCategories_ConfigPropertyMetadata);
|
|
1715
1853
|
return config;
|
|
1716
1854
|
}
|
|
1717
1855
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -1760,7 +1898,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
1760
1898
|
});
|
|
1761
1899
|
}
|
|
1762
1900
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1763
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1901
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1764
1902
|
}
|
|
1765
1903
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1766
1904
|
const { luvio, config } = context;
|
|
@@ -1919,10 +2057,10 @@ const updateNetworkDataCategories_ConfigPropertyMetadata = [
|
|
|
1919
2057
|
generateParamConfigMetadata('networkDataCategoryTree', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1920
2058
|
];
|
|
1921
2059
|
const updateNetworkDataCategories_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateNetworkDataCategories_ConfigPropertyMetadata);
|
|
1922
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
2060
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$7(updateNetworkDataCategories_ConfigPropertyMetadata);
|
|
1923
2061
|
function typeCheckConfig(untrustedConfig) {
|
|
1924
2062
|
const config = {};
|
|
1925
|
-
typeCheckConfig$
|
|
2063
|
+
typeCheckConfig$7(untrustedConfig, config, updateNetworkDataCategories_ConfigPropertyMetadata);
|
|
1926
2064
|
const untrustedConfig_networkDataCategoryTree = untrustedConfig.networkDataCategoryTree;
|
|
1927
2065
|
const referenceDataCategoryGroupCollectionInputRepresentationValidationError = validate$1(untrustedConfig_networkDataCategoryTree);
|
|
1928
2066
|
if (referenceDataCategoryGroupCollectionInputRepresentationValidationError === null) {
|
|
@@ -1972,4 +2110,4 @@ const updateNetworkDataCategoriesAdapterFactory = (luvio) => {
|
|
|
1972
2110
|
};
|
|
1973
2111
|
};
|
|
1974
2112
|
|
|
1975
|
-
export { getArticlesForCategoryAdapterFactory, getNetworkDataCategoriesAdapterFactory, getParentNetworkDataCategoryPathAdapterFactory, getServiceCatalogItemsAdapterFactory, getServiceCatalogItemsForCommunityAdapterFactory, updateNetworkDataCategoriesAdapterFactory };
|
|
2113
|
+
export { getArticlesForCategoryAdapterFactory, getChildCategoriesAdapterFactory, getNetworkDataCategoriesAdapterFactory, getParentNetworkDataCategoryPathAdapterFactory, getServiceCatalogItemsAdapterFactory, getServiceCatalogItemsForCommunityAdapterFactory, updateNetworkDataCategoriesAdapterFactory };
|