@salesforce/lds-adapters-platform-appexchange 1.334.0 → 1.336.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/platform-appexchange.js +335 -124
- package/dist/es/es2018/types/src/generated/adapters/searchListings.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +2 -3
- package/dist/es/es2018/types/src/generated/resources/postConnectAppexchangeSearchListings.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/AppExchangeSearchListingCollectionRepresentation.d.ts +17 -5
- package/dist/es/es2018/types/src/generated/types/AppExchangeSearchListingsInputRepresentation.d.ts +79 -0
- package/package.json +3 -3
- package/sfdc/index.js +1141 -938
- package/src/raml/api.raml +332 -313
- package/src/raml/luvio.raml +4 -3
- package/dist/es/es2018/types/src/generated/adapters/getAppExchangeSearchListingCollection.d.ts +0 -44
- package/dist/es/es2018/types/src/generated/resources/getConnectAppexchangeSearchListings.d.ts +0 -32
|
@@ -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$1, typeCheckConfig as typeCheckConfig$3, StoreKeyMap, createResourceParams as createResourceParams$3 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -74,6 +74,19 @@ const keyPrefix = 'appexchange';
|
|
|
74
74
|
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
75
75
|
const { isArray: ArrayIsArray } = Array;
|
|
76
76
|
const { stringify: JSONStringify } = JSON;
|
|
77
|
+
function equalsArray(a, b, equalsItem) {
|
|
78
|
+
const aLength = a.length;
|
|
79
|
+
const bLength = b.length;
|
|
80
|
+
if (aLength !== bLength) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
for (let i = 0; i < aLength; i++) {
|
|
84
|
+
if (equalsItem(a[i], b[i]) === false) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
77
90
|
function createLink(ref) {
|
|
78
91
|
return {
|
|
79
92
|
__ref: serializeStructuredKey(ref),
|
|
@@ -3250,7 +3263,7 @@ function validate$5(obj, path = 'AppExchangeListingSolutionRepresentation') {
|
|
|
3250
3263
|
return v_error === undefined ? null : v_error;
|
|
3251
3264
|
}
|
|
3252
3265
|
|
|
3253
|
-
const VERSION$
|
|
3266
|
+
const VERSION$4 = "63d5e3efd71a374614cb5f690a60b6d9";
|
|
3254
3267
|
function validate$4(obj, path = 'AppExchangeListingDetailsRepresentation') {
|
|
3255
3268
|
const v_error = (() => {
|
|
3256
3269
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3454,15 +3467,15 @@ const RepresentationType$2 = 'AppExchangeListingDetailsRepresentation';
|
|
|
3454
3467
|
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
3455
3468
|
return input;
|
|
3456
3469
|
}
|
|
3457
|
-
const select$
|
|
3470
|
+
const select$7 = function AppExchangeListingDetailsRepresentationSelect() {
|
|
3458
3471
|
return {
|
|
3459
3472
|
kind: 'Fragment',
|
|
3460
|
-
version: VERSION$
|
|
3473
|
+
version: VERSION$4,
|
|
3461
3474
|
private: [],
|
|
3462
3475
|
opaque: true
|
|
3463
3476
|
};
|
|
3464
3477
|
};
|
|
3465
|
-
function equals$
|
|
3478
|
+
function equals$4(existing, incoming) {
|
|
3466
3479
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
3467
3480
|
return false;
|
|
3468
3481
|
}
|
|
@@ -3477,7 +3490,7 @@ const ingest$2 = function AppExchangeListingDetailsRepresentationIngest(input, p
|
|
|
3477
3490
|
}
|
|
3478
3491
|
const key = path.fullPath;
|
|
3479
3492
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 3000;
|
|
3480
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "appexchange", VERSION$
|
|
3493
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "appexchange", VERSION$4, RepresentationType$2, equals$4);
|
|
3481
3494
|
return createLink(key);
|
|
3482
3495
|
};
|
|
3483
3496
|
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -3490,22 +3503,22 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
3490
3503
|
});
|
|
3491
3504
|
}
|
|
3492
3505
|
|
|
3493
|
-
function select$
|
|
3494
|
-
return select$
|
|
3506
|
+
function select$6(luvio, params) {
|
|
3507
|
+
return select$7();
|
|
3495
3508
|
}
|
|
3496
|
-
function keyBuilder$
|
|
3509
|
+
function keyBuilder$3(luvio, params) {
|
|
3497
3510
|
return keyPrefix + '::AppExchangeListingDetailsRepresentation:(' + 'includeRelated:' + params.queryParams.includeRelated + ',' + 'listingId:' + params.urlParams.listingId + ')';
|
|
3498
3511
|
}
|
|
3499
3512
|
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
3500
|
-
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$
|
|
3513
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
3501
3514
|
}
|
|
3502
3515
|
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
3503
3516
|
const { body } = response;
|
|
3504
|
-
const key = keyBuilder$
|
|
3517
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
3505
3518
|
luvio.storeIngest(key, ingest$2, body);
|
|
3506
3519
|
const snapshot = luvio.storeLookup({
|
|
3507
3520
|
recordId: key,
|
|
3508
|
-
node: select$
|
|
3521
|
+
node: select$6(),
|
|
3509
3522
|
variables: {},
|
|
3510
3523
|
}, snapshotRefresh);
|
|
3511
3524
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3516,8 +3529,8 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3516
3529
|
deepFreeze(snapshot.data);
|
|
3517
3530
|
return snapshot;
|
|
3518
3531
|
}
|
|
3519
|
-
function ingestError
|
|
3520
|
-
const key = keyBuilder$
|
|
3532
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
3533
|
+
const key = keyBuilder$3(luvio, params);
|
|
3521
3534
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3522
3535
|
luvio.storeIngestError(key, errorSnapshot);
|
|
3523
3536
|
return errorSnapshot;
|
|
@@ -3525,7 +3538,7 @@ function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
|
3525
3538
|
function createResourceRequest$2(config) {
|
|
3526
3539
|
const headers = {};
|
|
3527
3540
|
return {
|
|
3528
|
-
baseUri: '/services/data/
|
|
3541
|
+
baseUri: '/services/data/v64.0',
|
|
3529
3542
|
basePath: '/connect/appexchange/listings/' + config.urlParams.listingId + '',
|
|
3530
3543
|
method: 'get',
|
|
3531
3544
|
body: null,
|
|
@@ -3543,9 +3556,9 @@ const getListingDetails_ConfigPropertyMetadata = [
|
|
|
3543
3556
|
];
|
|
3544
3557
|
const getListingDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getListingDetails_ConfigPropertyMetadata);
|
|
3545
3558
|
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(getListingDetails_ConfigPropertyMetadata);
|
|
3546
|
-
function keyBuilder$
|
|
3559
|
+
function keyBuilder$2(luvio, config) {
|
|
3547
3560
|
const resourceParams = createResourceParams$2(config);
|
|
3548
|
-
return keyBuilder$
|
|
3561
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
3549
3562
|
}
|
|
3550
3563
|
function typeCheckConfig$2(untrustedConfig) {
|
|
3551
3564
|
const config = {};
|
|
@@ -3565,19 +3578,19 @@ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
|
3565
3578
|
}
|
|
3566
3579
|
return config;
|
|
3567
3580
|
}
|
|
3568
|
-
function adapterFragment
|
|
3581
|
+
function adapterFragment(luvio, config) {
|
|
3569
3582
|
createResourceParams$2(config);
|
|
3570
|
-
return select$
|
|
3583
|
+
return select$6();
|
|
3571
3584
|
}
|
|
3572
|
-
function onFetchResponseSuccess
|
|
3585
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
3573
3586
|
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
3574
3587
|
config,
|
|
3575
3588
|
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3576
3589
|
});
|
|
3577
3590
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3578
3591
|
}
|
|
3579
|
-
function onFetchResponseError
|
|
3580
|
-
const snapshot = ingestError
|
|
3592
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
3593
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
3581
3594
|
config,
|
|
3582
3595
|
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3583
3596
|
});
|
|
@@ -3588,23 +3601,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
3588
3601
|
const request = createResourceRequest$2(resourceParams);
|
|
3589
3602
|
return luvio.dispatchResourceRequest(request, options)
|
|
3590
3603
|
.then((response) => {
|
|
3591
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess
|
|
3604
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
3592
3605
|
const cache = new StoreKeyMap();
|
|
3593
3606
|
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
3594
3607
|
return cache;
|
|
3595
3608
|
});
|
|
3596
3609
|
}, (response) => {
|
|
3597
|
-
return luvio.handleErrorResponse(() => onFetchResponseError
|
|
3610
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
3598
3611
|
});
|
|
3599
3612
|
}
|
|
3600
|
-
function buildNetworkSnapshotCachePolicy
|
|
3601
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3613
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
3614
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
3602
3615
|
}
|
|
3603
|
-
function buildCachedSnapshotCachePolicy
|
|
3616
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
3604
3617
|
const { luvio, config } = context;
|
|
3605
3618
|
const selector = {
|
|
3606
|
-
recordId: keyBuilder$
|
|
3607
|
-
node: adapterFragment
|
|
3619
|
+
recordId: keyBuilder$2(luvio, config),
|
|
3620
|
+
node: adapterFragment(luvio, config),
|
|
3608
3621
|
variables: {},
|
|
3609
3622
|
};
|
|
3610
3623
|
const cacheSnapshot = storeLookup(selector, {
|
|
@@ -3620,9 +3633,10 @@ const getListingDetailsAdapterFactory = (luvio) => function appexchange__getList
|
|
|
3620
3633
|
return null;
|
|
3621
3634
|
}
|
|
3622
3635
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3623
|
-
buildCachedSnapshotCachePolicy
|
|
3636
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
3624
3637
|
};
|
|
3625
3638
|
|
|
3639
|
+
const VERSION$3 = "10de01efdeabbe2f2446485b4b1f8103";
|
|
3626
3640
|
function validate$3(obj, path = 'AppExchangeListingLogoRepresentation') {
|
|
3627
3641
|
const v_error = (() => {
|
|
3628
3642
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3646,7 +3660,47 @@ function validate$3(obj, path = 'AppExchangeListingLogoRepresentation') {
|
|
|
3646
3660
|
})();
|
|
3647
3661
|
return v_error === undefined ? null : v_error;
|
|
3648
3662
|
}
|
|
3663
|
+
const select$5 = function AppExchangeListingLogoRepresentationSelect() {
|
|
3664
|
+
return {
|
|
3665
|
+
kind: 'Fragment',
|
|
3666
|
+
version: VERSION$3,
|
|
3667
|
+
private: [],
|
|
3668
|
+
selections: [
|
|
3669
|
+
{
|
|
3670
|
+
name: 'externalId',
|
|
3671
|
+
kind: 'Scalar'
|
|
3672
|
+
},
|
|
3673
|
+
{
|
|
3674
|
+
name: 'logoType',
|
|
3675
|
+
kind: 'Scalar'
|
|
3676
|
+
},
|
|
3677
|
+
{
|
|
3678
|
+
name: 'mediaId',
|
|
3679
|
+
kind: 'Scalar'
|
|
3680
|
+
}
|
|
3681
|
+
]
|
|
3682
|
+
};
|
|
3683
|
+
};
|
|
3684
|
+
function equals$3(existing, incoming) {
|
|
3685
|
+
const existing_externalId = existing.externalId;
|
|
3686
|
+
const incoming_externalId = incoming.externalId;
|
|
3687
|
+
if (!(existing_externalId === incoming_externalId)) {
|
|
3688
|
+
return false;
|
|
3689
|
+
}
|
|
3690
|
+
const existing_logoType = existing.logoType;
|
|
3691
|
+
const incoming_logoType = incoming.logoType;
|
|
3692
|
+
if (!(existing_logoType === incoming_logoType)) {
|
|
3693
|
+
return false;
|
|
3694
|
+
}
|
|
3695
|
+
const existing_mediaId = existing.mediaId;
|
|
3696
|
+
const incoming_mediaId = incoming.mediaId;
|
|
3697
|
+
if (!(existing_mediaId === incoming_mediaId)) {
|
|
3698
|
+
return false;
|
|
3699
|
+
}
|
|
3700
|
+
return true;
|
|
3701
|
+
}
|
|
3649
3702
|
|
|
3703
|
+
const VERSION$2 = "4c3e5e06b63b97e21a01138feab0ae5d";
|
|
3650
3704
|
function validate$2(obj, path = 'AppExchangeSearchListingRepresentation') {
|
|
3651
3705
|
const v_error = (() => {
|
|
3652
3706
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3738,8 +3792,160 @@ function validate$2(obj, path = 'AppExchangeSearchListingRepresentation') {
|
|
|
3738
3792
|
})();
|
|
3739
3793
|
return v_error === undefined ? null : v_error;
|
|
3740
3794
|
}
|
|
3795
|
+
const select$4 = function AppExchangeSearchListingRepresentationSelect() {
|
|
3796
|
+
const { selections: AppExchangeListingLogoRepresentation__selections, opaque: AppExchangeListingLogoRepresentation__opaque, } = select$5();
|
|
3797
|
+
return {
|
|
3798
|
+
kind: 'Fragment',
|
|
3799
|
+
version: VERSION$2,
|
|
3800
|
+
private: [],
|
|
3801
|
+
selections: [
|
|
3802
|
+
{
|
|
3803
|
+
name: 'averageRating',
|
|
3804
|
+
kind: 'Scalar'
|
|
3805
|
+
},
|
|
3806
|
+
{
|
|
3807
|
+
name: 'collectionName',
|
|
3808
|
+
kind: 'Scalar'
|
|
3809
|
+
},
|
|
3810
|
+
{
|
|
3811
|
+
name: 'description',
|
|
3812
|
+
kind: 'Scalar'
|
|
3813
|
+
},
|
|
3814
|
+
{
|
|
3815
|
+
name: 'documentPosition',
|
|
3816
|
+
kind: 'Scalar'
|
|
3817
|
+
},
|
|
3818
|
+
{
|
|
3819
|
+
name: 'documentTitle',
|
|
3820
|
+
kind: 'Scalar'
|
|
3821
|
+
},
|
|
3822
|
+
{
|
|
3823
|
+
name: 'listingCategories',
|
|
3824
|
+
kind: 'Scalar',
|
|
3825
|
+
plural: true
|
|
3826
|
+
},
|
|
3827
|
+
{
|
|
3828
|
+
name: 'logos',
|
|
3829
|
+
kind: 'Object',
|
|
3830
|
+
plural: true,
|
|
3831
|
+
selections: AppExchangeListingLogoRepresentation__selections
|
|
3832
|
+
},
|
|
3833
|
+
{
|
|
3834
|
+
name: 'oafId',
|
|
3835
|
+
kind: 'Scalar'
|
|
3836
|
+
},
|
|
3837
|
+
{
|
|
3838
|
+
name: 'pricing',
|
|
3839
|
+
kind: 'Scalar'
|
|
3840
|
+
},
|
|
3841
|
+
{
|
|
3842
|
+
name: 'publisher',
|
|
3843
|
+
kind: 'Scalar'
|
|
3844
|
+
},
|
|
3845
|
+
{
|
|
3846
|
+
name: 'reviewsAmount',
|
|
3847
|
+
kind: 'Scalar'
|
|
3848
|
+
},
|
|
3849
|
+
{
|
|
3850
|
+
name: 'sourceName',
|
|
3851
|
+
kind: 'Scalar'
|
|
3852
|
+
},
|
|
3853
|
+
{
|
|
3854
|
+
name: 'title',
|
|
3855
|
+
kind: 'Scalar'
|
|
3856
|
+
},
|
|
3857
|
+
{
|
|
3858
|
+
name: 'type',
|
|
3859
|
+
kind: 'Scalar'
|
|
3860
|
+
}
|
|
3861
|
+
]
|
|
3862
|
+
};
|
|
3863
|
+
};
|
|
3864
|
+
function equals$2(existing, incoming) {
|
|
3865
|
+
const existing_documentPosition = existing.documentPosition;
|
|
3866
|
+
const incoming_documentPosition = incoming.documentPosition;
|
|
3867
|
+
if (!(existing_documentPosition === incoming_documentPosition)) {
|
|
3868
|
+
return false;
|
|
3869
|
+
}
|
|
3870
|
+
const existing_reviewsAmount = existing.reviewsAmount;
|
|
3871
|
+
const incoming_reviewsAmount = incoming.reviewsAmount;
|
|
3872
|
+
if (!(existing_reviewsAmount === incoming_reviewsAmount)) {
|
|
3873
|
+
return false;
|
|
3874
|
+
}
|
|
3875
|
+
const existing_collectionName = existing.collectionName;
|
|
3876
|
+
const incoming_collectionName = incoming.collectionName;
|
|
3877
|
+
if (!(existing_collectionName === incoming_collectionName)) {
|
|
3878
|
+
return false;
|
|
3879
|
+
}
|
|
3880
|
+
const existing_description = existing.description;
|
|
3881
|
+
const incoming_description = incoming.description;
|
|
3882
|
+
if (!(existing_description === incoming_description)) {
|
|
3883
|
+
return false;
|
|
3884
|
+
}
|
|
3885
|
+
const existing_documentTitle = existing.documentTitle;
|
|
3886
|
+
const incoming_documentTitle = incoming.documentTitle;
|
|
3887
|
+
if (!(existing_documentTitle === incoming_documentTitle)) {
|
|
3888
|
+
return false;
|
|
3889
|
+
}
|
|
3890
|
+
const existing_oafId = existing.oafId;
|
|
3891
|
+
const incoming_oafId = incoming.oafId;
|
|
3892
|
+
if (!(existing_oafId === incoming_oafId)) {
|
|
3893
|
+
return false;
|
|
3894
|
+
}
|
|
3895
|
+
const existing_pricing = existing.pricing;
|
|
3896
|
+
const incoming_pricing = incoming.pricing;
|
|
3897
|
+
if (!(existing_pricing === incoming_pricing)) {
|
|
3898
|
+
return false;
|
|
3899
|
+
}
|
|
3900
|
+
const existing_publisher = existing.publisher;
|
|
3901
|
+
const incoming_publisher = incoming.publisher;
|
|
3902
|
+
if (!(existing_publisher === incoming_publisher)) {
|
|
3903
|
+
return false;
|
|
3904
|
+
}
|
|
3905
|
+
const existing_sourceName = existing.sourceName;
|
|
3906
|
+
const incoming_sourceName = incoming.sourceName;
|
|
3907
|
+
if (!(existing_sourceName === incoming_sourceName)) {
|
|
3908
|
+
return false;
|
|
3909
|
+
}
|
|
3910
|
+
const existing_title = existing.title;
|
|
3911
|
+
const incoming_title = incoming.title;
|
|
3912
|
+
if (!(existing_title === incoming_title)) {
|
|
3913
|
+
return false;
|
|
3914
|
+
}
|
|
3915
|
+
const existing_type = existing.type;
|
|
3916
|
+
const incoming_type = incoming.type;
|
|
3917
|
+
if (!(existing_type === incoming_type)) {
|
|
3918
|
+
return false;
|
|
3919
|
+
}
|
|
3920
|
+
const existing_averageRating = existing.averageRating;
|
|
3921
|
+
const incoming_averageRating = incoming.averageRating;
|
|
3922
|
+
if (!(existing_averageRating === incoming_averageRating)) {
|
|
3923
|
+
return false;
|
|
3924
|
+
}
|
|
3925
|
+
const existing_listingCategories = existing.listingCategories;
|
|
3926
|
+
const incoming_listingCategories = incoming.listingCategories;
|
|
3927
|
+
const equals_listingCategories_items = equalsArray(existing_listingCategories, incoming_listingCategories, (existing_listingCategories_item, incoming_listingCategories_item) => {
|
|
3928
|
+
if (!(existing_listingCategories_item === incoming_listingCategories_item)) {
|
|
3929
|
+
return false;
|
|
3930
|
+
}
|
|
3931
|
+
});
|
|
3932
|
+
if (equals_listingCategories_items === false) {
|
|
3933
|
+
return false;
|
|
3934
|
+
}
|
|
3935
|
+
const existing_logos = existing.logos;
|
|
3936
|
+
const incoming_logos = incoming.logos;
|
|
3937
|
+
const equals_logos_items = equalsArray(existing_logos, incoming_logos, (existing_logos_item, incoming_logos_item) => {
|
|
3938
|
+
if (!(equals$3(existing_logos_item, incoming_logos_item))) {
|
|
3939
|
+
return false;
|
|
3940
|
+
}
|
|
3941
|
+
});
|
|
3942
|
+
if (equals_logos_items === false) {
|
|
3943
|
+
return false;
|
|
3944
|
+
}
|
|
3945
|
+
return true;
|
|
3946
|
+
}
|
|
3741
3947
|
|
|
3742
|
-
const VERSION$1 = "
|
|
3948
|
+
const VERSION$1 = "8d9a771044db35da3a48fdd775bfe9b2";
|
|
3743
3949
|
function validate$1(obj, path = 'AppExchangeSearchListingCollectionRepresentation') {
|
|
3744
3950
|
const v_error = (() => {
|
|
3745
3951
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3760,6 +3966,11 @@ function validate$1(obj, path = 'AppExchangeSearchListingCollectionRepresentatio
|
|
|
3760
3966
|
return new TypeError(message);
|
|
3761
3967
|
}
|
|
3762
3968
|
}
|
|
3969
|
+
const obj_primaryKey = obj.primaryKey;
|
|
3970
|
+
const path_primaryKey = path + '.primaryKey';
|
|
3971
|
+
if (typeof obj_primaryKey !== 'string') {
|
|
3972
|
+
return new TypeError('Expected "string" but received "' + typeof obj_primaryKey + '" (at "' + path_primaryKey + '")');
|
|
3973
|
+
}
|
|
3763
3974
|
const obj_totalCount = obj.totalCount;
|
|
3764
3975
|
const path_totalCount = path + '.totalCount';
|
|
3765
3976
|
if (typeof obj_totalCount !== 'number' || (typeof obj_totalCount === 'number' && Math.floor(obj_totalCount) !== obj_totalCount)) {
|
|
@@ -3769,19 +3980,61 @@ function validate$1(obj, path = 'AppExchangeSearchListingCollectionRepresentatio
|
|
|
3769
3980
|
return v_error === undefined ? null : v_error;
|
|
3770
3981
|
}
|
|
3771
3982
|
const RepresentationType$1 = 'AppExchangeSearchListingCollectionRepresentation';
|
|
3983
|
+
function keyBuilder$1(luvio, config) {
|
|
3984
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.primaryKey;
|
|
3985
|
+
}
|
|
3986
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
3987
|
+
const keyParams = {
|
|
3988
|
+
primaryKey: object.primaryKey
|
|
3989
|
+
};
|
|
3990
|
+
return keyBuilder$1(luvio, keyParams);
|
|
3991
|
+
}
|
|
3772
3992
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
3773
3993
|
return input;
|
|
3774
3994
|
}
|
|
3775
3995
|
const select$3 = function AppExchangeSearchListingCollectionRepresentationSelect() {
|
|
3996
|
+
const { selections: AppExchangeSearchListingRepresentation__selections, opaque: AppExchangeSearchListingRepresentation__opaque, } = select$4();
|
|
3776
3997
|
return {
|
|
3777
3998
|
kind: 'Fragment',
|
|
3778
3999
|
version: VERSION$1,
|
|
3779
4000
|
private: [],
|
|
3780
|
-
|
|
4001
|
+
selections: [
|
|
4002
|
+
{
|
|
4003
|
+
name: 'listings',
|
|
4004
|
+
kind: 'Object',
|
|
4005
|
+
plural: true,
|
|
4006
|
+
selections: AppExchangeSearchListingRepresentation__selections
|
|
4007
|
+
},
|
|
4008
|
+
{
|
|
4009
|
+
name: 'primaryKey',
|
|
4010
|
+
kind: 'Scalar'
|
|
4011
|
+
},
|
|
4012
|
+
{
|
|
4013
|
+
name: 'totalCount',
|
|
4014
|
+
kind: 'Scalar'
|
|
4015
|
+
}
|
|
4016
|
+
]
|
|
3781
4017
|
};
|
|
3782
4018
|
};
|
|
3783
4019
|
function equals$1(existing, incoming) {
|
|
3784
|
-
|
|
4020
|
+
const existing_totalCount = existing.totalCount;
|
|
4021
|
+
const incoming_totalCount = incoming.totalCount;
|
|
4022
|
+
if (!(existing_totalCount === incoming_totalCount)) {
|
|
4023
|
+
return false;
|
|
4024
|
+
}
|
|
4025
|
+
const existing_primaryKey = existing.primaryKey;
|
|
4026
|
+
const incoming_primaryKey = incoming.primaryKey;
|
|
4027
|
+
if (!(existing_primaryKey === incoming_primaryKey)) {
|
|
4028
|
+
return false;
|
|
4029
|
+
}
|
|
4030
|
+
const existing_listings = existing.listings;
|
|
4031
|
+
const incoming_listings = incoming.listings;
|
|
4032
|
+
const equals_listings_items = equalsArray(existing_listings, incoming_listings, (existing_listings_item, incoming_listings_item) => {
|
|
4033
|
+
if (!(equals$2(existing_listings_item, incoming_listings_item))) {
|
|
4034
|
+
return false;
|
|
4035
|
+
}
|
|
4036
|
+
});
|
|
4037
|
+
if (equals_listings_items === false) {
|
|
3785
4038
|
return false;
|
|
3786
4039
|
}
|
|
3787
4040
|
return true;
|
|
@@ -3793,14 +4046,14 @@ const ingest$1 = function AppExchangeSearchListingCollectionRepresentationIngest
|
|
|
3793
4046
|
throw validateError;
|
|
3794
4047
|
}
|
|
3795
4048
|
}
|
|
3796
|
-
const key =
|
|
4049
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
3797
4050
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 3000;
|
|
3798
4051
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "appexchange", VERSION$1, RepresentationType$1, equals$1);
|
|
3799
4052
|
return createLink(key);
|
|
3800
4053
|
};
|
|
3801
4054
|
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
3802
4055
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3803
|
-
const rootKey =
|
|
4056
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
3804
4057
|
rootKeySet.set(rootKey, {
|
|
3805
4058
|
namespace: keyPrefix,
|
|
3806
4059
|
representationName: RepresentationType$1,
|
|
@@ -3811,21 +4064,18 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
3811
4064
|
function select$2(luvio, params) {
|
|
3812
4065
|
return select$3();
|
|
3813
4066
|
}
|
|
3814
|
-
function keyBuilder$2(luvio, params) {
|
|
3815
|
-
return keyPrefix + '::AppExchangeSearchListingCollectionRepresentation:(' + 'category:' + params.queryParams.category + ',' + 'edition:' + params.queryParams.edition + ',' + 'features:' + params.queryParams.features + ',' + 'impact:' + params.queryParams.impact + ',' + 'industry:' + params.queryParams.industry + ',' + 'keyword:' + params.queryParams.keyword + ',' + 'labs:' + params.queryParams.labs + ',' + 'language:' + params.queryParams.language + ',' + 'languages:' + params.queryParams.languages + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'persona:' + params.queryParams.persona + ',' + 'price:' + params.queryParams.price + ',' + 'product:' + params.queryParams.product + ',' + 'rating:' + params.queryParams.rating + ',' + 'sort:' + params.queryParams.sort + ',' + 'tech:' + params.queryParams.tech + ',' + 'type:' + params.queryParams.type + ')';
|
|
3816
|
-
}
|
|
3817
4067
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
3818
|
-
getTypeCacheKeys$1(storeKeyMap, luvio, response
|
|
4068
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
3819
4069
|
}
|
|
3820
|
-
function ingestSuccess$1(luvio, resourceParams, response
|
|
4070
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
3821
4071
|
const { body } = response;
|
|
3822
|
-
const key =
|
|
4072
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
3823
4073
|
luvio.storeIngest(key, ingest$1, body);
|
|
3824
4074
|
const snapshot = luvio.storeLookup({
|
|
3825
4075
|
recordId: key,
|
|
3826
4076
|
node: select$2(),
|
|
3827
4077
|
variables: {},
|
|
3828
|
-
}
|
|
4078
|
+
});
|
|
3829
4079
|
if (process.env.NODE_ENV !== 'production') {
|
|
3830
4080
|
if (snapshot.state !== 'Fulfilled') {
|
|
3831
4081
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
@@ -3834,56 +4084,46 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3834
4084
|
deepFreeze(snapshot.data);
|
|
3835
4085
|
return snapshot;
|
|
3836
4086
|
}
|
|
3837
|
-
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
3838
|
-
const key = keyBuilder$2(luvio, params);
|
|
3839
|
-
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3840
|
-
luvio.storeIngestError(key, errorSnapshot);
|
|
3841
|
-
return errorSnapshot;
|
|
3842
|
-
}
|
|
3843
4087
|
function createResourceRequest$1(config) {
|
|
3844
4088
|
const headers = {};
|
|
3845
4089
|
return {
|
|
3846
|
-
baseUri: '/services/data/
|
|
4090
|
+
baseUri: '/services/data/v64.0',
|
|
3847
4091
|
basePath: '/connect/appexchange/search-listings',
|
|
3848
|
-
method: '
|
|
3849
|
-
body:
|
|
4092
|
+
method: 'post',
|
|
4093
|
+
body: config.body,
|
|
3850
4094
|
urlParams: {},
|
|
3851
|
-
queryParams:
|
|
4095
|
+
queryParams: {},
|
|
3852
4096
|
headers,
|
|
3853
4097
|
priority: 'normal',
|
|
3854
4098
|
};
|
|
3855
4099
|
}
|
|
3856
4100
|
|
|
3857
|
-
const adapterName$1 = '
|
|
3858
|
-
const
|
|
3859
|
-
generateParamConfigMetadata('category', false,
|
|
3860
|
-
generateParamConfigMetadata('edition', false,
|
|
3861
|
-
generateParamConfigMetadata('features', false,
|
|
3862
|
-
generateParamConfigMetadata('impact', false,
|
|
3863
|
-
generateParamConfigMetadata('industry', false,
|
|
3864
|
-
generateParamConfigMetadata('keyword', false,
|
|
3865
|
-
generateParamConfigMetadata('labs', false,
|
|
3866
|
-
generateParamConfigMetadata('language', false,
|
|
3867
|
-
generateParamConfigMetadata('languages', false,
|
|
3868
|
-
generateParamConfigMetadata('page', false,
|
|
3869
|
-
generateParamConfigMetadata('pageSize', false,
|
|
3870
|
-
generateParamConfigMetadata('persona', false,
|
|
3871
|
-
generateParamConfigMetadata('price', false,
|
|
3872
|
-
generateParamConfigMetadata('product', false,
|
|
3873
|
-
generateParamConfigMetadata('rating', false,
|
|
3874
|
-
generateParamConfigMetadata('sort', false,
|
|
3875
|
-
generateParamConfigMetadata('tech', false,
|
|
3876
|
-
generateParamConfigMetadata('type', false,
|
|
4101
|
+
const adapterName$1 = 'searchListings';
|
|
4102
|
+
const searchListings_ConfigPropertyMetadata = [
|
|
4103
|
+
generateParamConfigMetadata('category', false, 2 /* Body */, 0 /* String */, true),
|
|
4104
|
+
generateParamConfigMetadata('edition', false, 2 /* Body */, 0 /* String */, true),
|
|
4105
|
+
generateParamConfigMetadata('features', false, 2 /* Body */, 0 /* String */, true),
|
|
4106
|
+
generateParamConfigMetadata('impact', false, 2 /* Body */, 0 /* String */, true),
|
|
4107
|
+
generateParamConfigMetadata('industry', false, 2 /* Body */, 0 /* String */, true),
|
|
4108
|
+
generateParamConfigMetadata('keyword', false, 2 /* Body */, 0 /* String */),
|
|
4109
|
+
generateParamConfigMetadata('labs', false, 2 /* Body */, 0 /* String */, true),
|
|
4110
|
+
generateParamConfigMetadata('language', false, 2 /* Body */, 0 /* String */),
|
|
4111
|
+
generateParamConfigMetadata('languages', false, 2 /* Body */, 0 /* String */, true),
|
|
4112
|
+
generateParamConfigMetadata('page', false, 2 /* Body */, 3 /* Integer */),
|
|
4113
|
+
generateParamConfigMetadata('pageSize', false, 2 /* Body */, 3 /* Integer */),
|
|
4114
|
+
generateParamConfigMetadata('persona', false, 2 /* Body */, 0 /* String */, true),
|
|
4115
|
+
generateParamConfigMetadata('price', false, 2 /* Body */, 0 /* String */, true),
|
|
4116
|
+
generateParamConfigMetadata('product', false, 2 /* Body */, 0 /* String */),
|
|
4117
|
+
generateParamConfigMetadata('rating', false, 2 /* Body */, 3 /* Integer */),
|
|
4118
|
+
generateParamConfigMetadata('sort', false, 2 /* Body */, 0 /* String */),
|
|
4119
|
+
generateParamConfigMetadata('tech', false, 2 /* Body */, 0 /* String */, true),
|
|
4120
|
+
generateParamConfigMetadata('type', false, 2 /* Body */, 0 /* String */),
|
|
3877
4121
|
];
|
|
3878
|
-
const
|
|
3879
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(
|
|
3880
|
-
function keyBuilder$1(luvio, config) {
|
|
3881
|
-
const resourceParams = createResourceParams$1(config);
|
|
3882
|
-
return keyBuilder$2(luvio, resourceParams);
|
|
3883
|
-
}
|
|
4122
|
+
const searchListings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, searchListings_ConfigPropertyMetadata);
|
|
4123
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(searchListings_ConfigPropertyMetadata);
|
|
3884
4124
|
function typeCheckConfig$1(untrustedConfig) {
|
|
3885
4125
|
const config = {};
|
|
3886
|
-
typeCheckConfig$3(untrustedConfig, config,
|
|
4126
|
+
typeCheckConfig$3(untrustedConfig, config, searchListings_ConfigPropertyMetadata);
|
|
3887
4127
|
return config;
|
|
3888
4128
|
}
|
|
3889
4129
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -3899,62 +4139,33 @@ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
|
3899
4139
|
}
|
|
3900
4140
|
return config;
|
|
3901
4141
|
}
|
|
3902
|
-
function adapterFragment(luvio, config) {
|
|
3903
|
-
createResourceParams$1(config);
|
|
3904
|
-
return select$2();
|
|
3905
|
-
}
|
|
3906
|
-
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
3907
|
-
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
3908
|
-
config,
|
|
3909
|
-
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3910
|
-
});
|
|
3911
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
3912
|
-
}
|
|
3913
|
-
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
3914
|
-
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
3915
|
-
config,
|
|
3916
|
-
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3917
|
-
});
|
|
3918
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
3919
|
-
}
|
|
3920
4142
|
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
3921
4143
|
const resourceParams = createResourceParams$1(config);
|
|
3922
4144
|
const request = createResourceRequest$1(resourceParams);
|
|
3923
4145
|
return luvio.dispatchResourceRequest(request, options)
|
|
3924
4146
|
.then((response) => {
|
|
3925
|
-
return luvio.handleSuccessResponse(() =>
|
|
4147
|
+
return luvio.handleSuccessResponse(() => {
|
|
4148
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
4149
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4150
|
+
}, () => {
|
|
3926
4151
|
const cache = new StoreKeyMap();
|
|
3927
4152
|
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
3928
4153
|
return cache;
|
|
3929
4154
|
});
|
|
3930
4155
|
}, (response) => {
|
|
3931
|
-
|
|
4156
|
+
deepFreeze(response);
|
|
4157
|
+
throw response;
|
|
3932
4158
|
});
|
|
3933
4159
|
}
|
|
3934
|
-
|
|
3935
|
-
return
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
variables: {},
|
|
4160
|
+
const searchListingsAdapterFactory = (luvio) => {
|
|
4161
|
+
return function searchListings(untrustedConfig) {
|
|
4162
|
+
const config = validateAdapterConfig$1(untrustedConfig, searchListings_ConfigPropertyNames);
|
|
4163
|
+
// Invalid or incomplete config
|
|
4164
|
+
if (config === null) {
|
|
4165
|
+
throw new Error('Invalid config for "searchListings"');
|
|
4166
|
+
}
|
|
4167
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
3943
4168
|
};
|
|
3944
|
-
const cacheSnapshot = storeLookup(selector, {
|
|
3945
|
-
config,
|
|
3946
|
-
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3947
|
-
});
|
|
3948
|
-
return cacheSnapshot;
|
|
3949
|
-
}
|
|
3950
|
-
const getAppExchangeSearchListingCollectionAdapterFactory = (luvio) => function appexchange__getAppExchangeSearchListingCollection(untrustedConfig, requestContext) {
|
|
3951
|
-
const config = validateAdapterConfig$1(untrustedConfig, getAppExchangeSearchListingCollection_ConfigPropertyNames);
|
|
3952
|
-
// Invalid or incomplete config
|
|
3953
|
-
if (config === null) {
|
|
3954
|
-
return null;
|
|
3955
|
-
}
|
|
3956
|
-
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3957
|
-
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
3958
4169
|
};
|
|
3959
4170
|
|
|
3960
4171
|
const VERSION = "b0309b3336a7e875a0cc40a008a340f9";
|
|
@@ -4067,7 +4278,7 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
4067
4278
|
function createResourceRequest(config) {
|
|
4068
4279
|
const headers = {};
|
|
4069
4280
|
return {
|
|
4070
|
-
baseUri: '/services/data/
|
|
4281
|
+
baseUri: '/services/data/v64.0',
|
|
4071
4282
|
basePath: '/connect/appexchange/user-events',
|
|
4072
4283
|
method: 'post',
|
|
4073
4284
|
body: config.body,
|
|
@@ -4156,4 +4367,4 @@ const postAppExchangeUserEventsAdapterFactory = (luvio) => {
|
|
|
4156
4367
|
};
|
|
4157
4368
|
};
|
|
4158
4369
|
|
|
4159
|
-
export {
|
|
4370
|
+
export { getListingDetailsAdapterFactory, postAppExchangeUserEventsAdapterFactory, searchListingsAdapterFactory };
|