@salesforce/lds-adapters-platform-appexchange 1.332.0-dev2 → 1.332.0-dev21
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 +560 -195
- 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/AppExchangeSearchListingRepresentation.d.ts +29 -29
- package/dist/es/es2018/types/src/generated/types/AppExchangeSearchListingsInputRepresentation.d.ts +79 -0
- package/package.json +3 -3
- package/sfdc/index.js +846 -489
- package/src/raml/api.raml +345 -312
- 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;
|
|
@@ -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,100 +3660,446 @@ 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 = "d0c891a7c7f849972936e052211f1ffe";
|
|
3650
3704
|
function validate$2(obj, path = 'AppExchangeSearchListingRepresentation') {
|
|
3651
3705
|
const v_error = (() => {
|
|
3652
3706
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3653
3707
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3654
3708
|
}
|
|
3655
|
-
obj.averageRating
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
if (
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
if (typeof obj_description !== 'string') {
|
|
3664
|
-
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3665
|
-
}
|
|
3666
|
-
const obj_documentPosition = obj.documentPosition;
|
|
3667
|
-
const path_documentPosition = path + '.documentPosition';
|
|
3668
|
-
if (typeof obj_documentPosition !== 'number' || (typeof obj_documentPosition === 'number' && Math.floor(obj_documentPosition) !== obj_documentPosition)) {
|
|
3669
|
-
return new TypeError('Expected "integer" but received "' + typeof obj_documentPosition + '" (at "' + path_documentPosition + '")');
|
|
3670
|
-
}
|
|
3671
|
-
const obj_documentTitle = obj.documentTitle;
|
|
3672
|
-
const path_documentTitle = path + '.documentTitle';
|
|
3673
|
-
if (typeof obj_documentTitle !== 'string') {
|
|
3674
|
-
return new TypeError('Expected "string" but received "' + typeof obj_documentTitle + '" (at "' + path_documentTitle + '")');
|
|
3675
|
-
}
|
|
3676
|
-
const obj_listingCategories = obj.listingCategories;
|
|
3677
|
-
const path_listingCategories = path + '.listingCategories';
|
|
3678
|
-
if (!ArrayIsArray(obj_listingCategories)) {
|
|
3679
|
-
return new TypeError('Expected "array" but received "' + typeof obj_listingCategories + '" (at "' + path_listingCategories + '")');
|
|
3680
|
-
}
|
|
3681
|
-
for (let i = 0; i < obj_listingCategories.length; i++) {
|
|
3682
|
-
const obj_listingCategories_item = obj_listingCategories[i];
|
|
3683
|
-
const path_listingCategories_item = path_listingCategories + '[' + i + ']';
|
|
3684
|
-
if (typeof obj_listingCategories_item !== 'string') {
|
|
3685
|
-
return new TypeError('Expected "string" but received "' + typeof obj_listingCategories_item + '" (at "' + path_listingCategories_item + '")');
|
|
3686
|
-
}
|
|
3687
|
-
}
|
|
3688
|
-
const obj_logos = obj.logos;
|
|
3689
|
-
const path_logos = path + '.logos';
|
|
3690
|
-
if (!ArrayIsArray(obj_logos)) {
|
|
3691
|
-
return new TypeError('Expected "array" but received "' + typeof obj_logos + '" (at "' + path_logos + '")');
|
|
3692
|
-
}
|
|
3693
|
-
for (let i = 0; i < obj_logos.length; i++) {
|
|
3694
|
-
const obj_logos_item = obj_logos[i];
|
|
3695
|
-
const path_logos_item = path_logos + '[' + i + ']';
|
|
3696
|
-
const referencepath_logos_itemValidationError = validate$3(obj_logos_item, path_logos_item);
|
|
3697
|
-
if (referencepath_logos_itemValidationError !== null) {
|
|
3698
|
-
let message = 'Object doesn\'t match AppExchangeListingLogoRepresentation (at "' + path_logos_item + '")\n';
|
|
3699
|
-
message += referencepath_logos_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3700
|
-
return new TypeError(message);
|
|
3709
|
+
if (obj.averageRating !== undefined) {
|
|
3710
|
+
obj.averageRating;
|
|
3711
|
+
}
|
|
3712
|
+
if (obj.collectionName !== undefined) {
|
|
3713
|
+
const obj_collectionName = obj.collectionName;
|
|
3714
|
+
const path_collectionName = path + '.collectionName';
|
|
3715
|
+
if (typeof obj_collectionName !== 'string') {
|
|
3716
|
+
return new TypeError('Expected "string" but received "' + typeof obj_collectionName + '" (at "' + path_collectionName + '")');
|
|
3701
3717
|
}
|
|
3702
3718
|
}
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3719
|
+
if (obj.description !== undefined) {
|
|
3720
|
+
const obj_description = obj.description;
|
|
3721
|
+
const path_description = path + '.description';
|
|
3722
|
+
if (typeof obj_description !== 'string') {
|
|
3723
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3724
|
+
}
|
|
3707
3725
|
}
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3726
|
+
if (obj.documentPosition !== undefined) {
|
|
3727
|
+
const obj_documentPosition = obj.documentPosition;
|
|
3728
|
+
const path_documentPosition = path + '.documentPosition';
|
|
3729
|
+
if (typeof obj_documentPosition !== 'number' || (typeof obj_documentPosition === 'number' && Math.floor(obj_documentPosition) !== obj_documentPosition)) {
|
|
3730
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_documentPosition + '" (at "' + path_documentPosition + '")');
|
|
3731
|
+
}
|
|
3712
3732
|
}
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3733
|
+
if (obj.documentTitle !== undefined) {
|
|
3734
|
+
const obj_documentTitle = obj.documentTitle;
|
|
3735
|
+
const path_documentTitle = path + '.documentTitle';
|
|
3736
|
+
if (typeof obj_documentTitle !== 'string') {
|
|
3737
|
+
return new TypeError('Expected "string" but received "' + typeof obj_documentTitle + '" (at "' + path_documentTitle + '")');
|
|
3738
|
+
}
|
|
3717
3739
|
}
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3740
|
+
if (obj.listingCategories !== undefined) {
|
|
3741
|
+
const obj_listingCategories = obj.listingCategories;
|
|
3742
|
+
const path_listingCategories = path + '.listingCategories';
|
|
3743
|
+
if (!ArrayIsArray(obj_listingCategories)) {
|
|
3744
|
+
return new TypeError('Expected "array" but received "' + typeof obj_listingCategories + '" (at "' + path_listingCategories + '")');
|
|
3745
|
+
}
|
|
3746
|
+
for (let i = 0; i < obj_listingCategories.length; i++) {
|
|
3747
|
+
const obj_listingCategories_item = obj_listingCategories[i];
|
|
3748
|
+
const path_listingCategories_item = path_listingCategories + '[' + i + ']';
|
|
3749
|
+
if (typeof obj_listingCategories_item !== 'string') {
|
|
3750
|
+
return new TypeError('Expected "string" but received "' + typeof obj_listingCategories_item + '" (at "' + path_listingCategories_item + '")');
|
|
3751
|
+
}
|
|
3752
|
+
}
|
|
3722
3753
|
}
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3754
|
+
if (obj.logos !== undefined) {
|
|
3755
|
+
const obj_logos = obj.logos;
|
|
3756
|
+
const path_logos = path + '.logos';
|
|
3757
|
+
if (!ArrayIsArray(obj_logos)) {
|
|
3758
|
+
return new TypeError('Expected "array" but received "' + typeof obj_logos + '" (at "' + path_logos + '")');
|
|
3759
|
+
}
|
|
3760
|
+
for (let i = 0; i < obj_logos.length; i++) {
|
|
3761
|
+
const obj_logos_item = obj_logos[i];
|
|
3762
|
+
const path_logos_item = path_logos + '[' + i + ']';
|
|
3763
|
+
const referencepath_logos_itemValidationError = validate$3(obj_logos_item, path_logos_item);
|
|
3764
|
+
if (referencepath_logos_itemValidationError !== null) {
|
|
3765
|
+
let message = 'Object doesn\'t match AppExchangeListingLogoRepresentation (at "' + path_logos_item + '")\n';
|
|
3766
|
+
message += referencepath_logos_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3767
|
+
return new TypeError(message);
|
|
3768
|
+
}
|
|
3769
|
+
}
|
|
3770
|
+
}
|
|
3771
|
+
if (obj.oafId !== undefined) {
|
|
3772
|
+
const obj_oafId = obj.oafId;
|
|
3773
|
+
const path_oafId = path + '.oafId';
|
|
3774
|
+
if (typeof obj_oafId !== 'string') {
|
|
3775
|
+
return new TypeError('Expected "string" but received "' + typeof obj_oafId + '" (at "' + path_oafId + '")');
|
|
3776
|
+
}
|
|
3777
|
+
}
|
|
3778
|
+
if (obj.pricing !== undefined) {
|
|
3779
|
+
const obj_pricing = obj.pricing;
|
|
3780
|
+
const path_pricing = path + '.pricing';
|
|
3781
|
+
if (typeof obj_pricing !== 'string') {
|
|
3782
|
+
return new TypeError('Expected "string" but received "' + typeof obj_pricing + '" (at "' + path_pricing + '")');
|
|
3783
|
+
}
|
|
3784
|
+
}
|
|
3785
|
+
if (obj.publisher !== undefined) {
|
|
3786
|
+
const obj_publisher = obj.publisher;
|
|
3787
|
+
const path_publisher = path + '.publisher';
|
|
3788
|
+
if (typeof obj_publisher !== 'string') {
|
|
3789
|
+
return new TypeError('Expected "string" but received "' + typeof obj_publisher + '" (at "' + path_publisher + '")');
|
|
3790
|
+
}
|
|
3727
3791
|
}
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3792
|
+
if (obj.reviewsAmount !== undefined) {
|
|
3793
|
+
const obj_reviewsAmount = obj.reviewsAmount;
|
|
3794
|
+
const path_reviewsAmount = path + '.reviewsAmount';
|
|
3795
|
+
if (typeof obj_reviewsAmount !== 'number' || (typeof obj_reviewsAmount === 'number' && Math.floor(obj_reviewsAmount) !== obj_reviewsAmount)) {
|
|
3796
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_reviewsAmount + '" (at "' + path_reviewsAmount + '")');
|
|
3797
|
+
}
|
|
3798
|
+
}
|
|
3799
|
+
if (obj.sourceName !== undefined) {
|
|
3800
|
+
const obj_sourceName = obj.sourceName;
|
|
3801
|
+
const path_sourceName = path + '.sourceName';
|
|
3802
|
+
if (typeof obj_sourceName !== 'string') {
|
|
3803
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sourceName + '" (at "' + path_sourceName + '")');
|
|
3804
|
+
}
|
|
3732
3805
|
}
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3806
|
+
if (obj.title !== undefined) {
|
|
3807
|
+
const obj_title = obj.title;
|
|
3808
|
+
const path_title = path + '.title';
|
|
3809
|
+
if (typeof obj_title !== 'string') {
|
|
3810
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
3811
|
+
}
|
|
3812
|
+
}
|
|
3813
|
+
if (obj.type !== undefined) {
|
|
3814
|
+
const obj_type = obj.type;
|
|
3815
|
+
const path_type = path + '.type';
|
|
3816
|
+
if (typeof obj_type !== 'string') {
|
|
3817
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
3818
|
+
}
|
|
3737
3819
|
}
|
|
3738
3820
|
})();
|
|
3739
3821
|
return v_error === undefined ? null : v_error;
|
|
3740
3822
|
}
|
|
3823
|
+
const select$4 = function AppExchangeSearchListingRepresentationSelect() {
|
|
3824
|
+
const { selections: AppExchangeListingLogoRepresentation__selections, opaque: AppExchangeListingLogoRepresentation__opaque, } = select$5();
|
|
3825
|
+
return {
|
|
3826
|
+
kind: 'Fragment',
|
|
3827
|
+
version: VERSION$2,
|
|
3828
|
+
private: [],
|
|
3829
|
+
selections: [
|
|
3830
|
+
{
|
|
3831
|
+
name: 'averageRating',
|
|
3832
|
+
kind: 'Scalar',
|
|
3833
|
+
required: false
|
|
3834
|
+
},
|
|
3835
|
+
{
|
|
3836
|
+
name: 'collectionName',
|
|
3837
|
+
kind: 'Scalar',
|
|
3838
|
+
required: false
|
|
3839
|
+
},
|
|
3840
|
+
{
|
|
3841
|
+
name: 'description',
|
|
3842
|
+
kind: 'Scalar',
|
|
3843
|
+
required: false
|
|
3844
|
+
},
|
|
3845
|
+
{
|
|
3846
|
+
name: 'documentPosition',
|
|
3847
|
+
kind: 'Scalar',
|
|
3848
|
+
required: false
|
|
3849
|
+
},
|
|
3850
|
+
{
|
|
3851
|
+
name: 'documentTitle',
|
|
3852
|
+
kind: 'Scalar',
|
|
3853
|
+
required: false
|
|
3854
|
+
},
|
|
3855
|
+
{
|
|
3856
|
+
name: 'listingCategories',
|
|
3857
|
+
kind: 'Scalar',
|
|
3858
|
+
plural: true,
|
|
3859
|
+
required: false
|
|
3860
|
+
},
|
|
3861
|
+
{
|
|
3862
|
+
name: 'logos',
|
|
3863
|
+
kind: 'Object',
|
|
3864
|
+
plural: true,
|
|
3865
|
+
selections: AppExchangeListingLogoRepresentation__selections,
|
|
3866
|
+
required: false
|
|
3867
|
+
},
|
|
3868
|
+
{
|
|
3869
|
+
name: 'oafId',
|
|
3870
|
+
kind: 'Scalar',
|
|
3871
|
+
required: false
|
|
3872
|
+
},
|
|
3873
|
+
{
|
|
3874
|
+
name: 'pricing',
|
|
3875
|
+
kind: 'Scalar',
|
|
3876
|
+
required: false
|
|
3877
|
+
},
|
|
3878
|
+
{
|
|
3879
|
+
name: 'publisher',
|
|
3880
|
+
kind: 'Scalar',
|
|
3881
|
+
required: false
|
|
3882
|
+
},
|
|
3883
|
+
{
|
|
3884
|
+
name: 'reviewsAmount',
|
|
3885
|
+
kind: 'Scalar',
|
|
3886
|
+
required: false
|
|
3887
|
+
},
|
|
3888
|
+
{
|
|
3889
|
+
name: 'sourceName',
|
|
3890
|
+
kind: 'Scalar',
|
|
3891
|
+
required: false
|
|
3892
|
+
},
|
|
3893
|
+
{
|
|
3894
|
+
name: 'title',
|
|
3895
|
+
kind: 'Scalar',
|
|
3896
|
+
required: false
|
|
3897
|
+
},
|
|
3898
|
+
{
|
|
3899
|
+
name: 'type',
|
|
3900
|
+
kind: 'Scalar',
|
|
3901
|
+
required: false
|
|
3902
|
+
}
|
|
3903
|
+
]
|
|
3904
|
+
};
|
|
3905
|
+
};
|
|
3906
|
+
function equals$2(existing, incoming) {
|
|
3907
|
+
const existing_documentPosition = existing.documentPosition;
|
|
3908
|
+
const incoming_documentPosition = incoming.documentPosition;
|
|
3909
|
+
// if at least one of these optionals is defined
|
|
3910
|
+
if (existing_documentPosition !== undefined || incoming_documentPosition !== undefined) {
|
|
3911
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
3912
|
+
// not equal
|
|
3913
|
+
if (existing_documentPosition === undefined || incoming_documentPosition === undefined) {
|
|
3914
|
+
return false;
|
|
3915
|
+
}
|
|
3916
|
+
if (!(existing_documentPosition === incoming_documentPosition)) {
|
|
3917
|
+
return false;
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3920
|
+
const existing_reviewsAmount = existing.reviewsAmount;
|
|
3921
|
+
const incoming_reviewsAmount = incoming.reviewsAmount;
|
|
3922
|
+
// if at least one of these optionals is defined
|
|
3923
|
+
if (existing_reviewsAmount !== undefined || incoming_reviewsAmount !== undefined) {
|
|
3924
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
3925
|
+
// not equal
|
|
3926
|
+
if (existing_reviewsAmount === undefined || incoming_reviewsAmount === undefined) {
|
|
3927
|
+
return false;
|
|
3928
|
+
}
|
|
3929
|
+
if (!(existing_reviewsAmount === incoming_reviewsAmount)) {
|
|
3930
|
+
return false;
|
|
3931
|
+
}
|
|
3932
|
+
}
|
|
3933
|
+
const existing_collectionName = existing.collectionName;
|
|
3934
|
+
const incoming_collectionName = incoming.collectionName;
|
|
3935
|
+
// if at least one of these optionals is defined
|
|
3936
|
+
if (existing_collectionName !== undefined || incoming_collectionName !== undefined) {
|
|
3937
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
3938
|
+
// not equal
|
|
3939
|
+
if (existing_collectionName === undefined || incoming_collectionName === undefined) {
|
|
3940
|
+
return false;
|
|
3941
|
+
}
|
|
3942
|
+
if (!(existing_collectionName === incoming_collectionName)) {
|
|
3943
|
+
return false;
|
|
3944
|
+
}
|
|
3945
|
+
}
|
|
3946
|
+
const existing_description = existing.description;
|
|
3947
|
+
const incoming_description = incoming.description;
|
|
3948
|
+
// if at least one of these optionals is defined
|
|
3949
|
+
if (existing_description !== undefined || incoming_description !== undefined) {
|
|
3950
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
3951
|
+
// not equal
|
|
3952
|
+
if (existing_description === undefined || incoming_description === undefined) {
|
|
3953
|
+
return false;
|
|
3954
|
+
}
|
|
3955
|
+
if (!(existing_description === incoming_description)) {
|
|
3956
|
+
return false;
|
|
3957
|
+
}
|
|
3958
|
+
}
|
|
3959
|
+
const existing_documentTitle = existing.documentTitle;
|
|
3960
|
+
const incoming_documentTitle = incoming.documentTitle;
|
|
3961
|
+
// if at least one of these optionals is defined
|
|
3962
|
+
if (existing_documentTitle !== undefined || incoming_documentTitle !== undefined) {
|
|
3963
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
3964
|
+
// not equal
|
|
3965
|
+
if (existing_documentTitle === undefined || incoming_documentTitle === undefined) {
|
|
3966
|
+
return false;
|
|
3967
|
+
}
|
|
3968
|
+
if (!(existing_documentTitle === incoming_documentTitle)) {
|
|
3969
|
+
return false;
|
|
3970
|
+
}
|
|
3971
|
+
}
|
|
3972
|
+
const existing_oafId = existing.oafId;
|
|
3973
|
+
const incoming_oafId = incoming.oafId;
|
|
3974
|
+
// if at least one of these optionals is defined
|
|
3975
|
+
if (existing_oafId !== undefined || incoming_oafId !== undefined) {
|
|
3976
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
3977
|
+
// not equal
|
|
3978
|
+
if (existing_oafId === undefined || incoming_oafId === undefined) {
|
|
3979
|
+
return false;
|
|
3980
|
+
}
|
|
3981
|
+
if (!(existing_oafId === incoming_oafId)) {
|
|
3982
|
+
return false;
|
|
3983
|
+
}
|
|
3984
|
+
}
|
|
3985
|
+
const existing_pricing = existing.pricing;
|
|
3986
|
+
const incoming_pricing = incoming.pricing;
|
|
3987
|
+
// if at least one of these optionals is defined
|
|
3988
|
+
if (existing_pricing !== undefined || incoming_pricing !== undefined) {
|
|
3989
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
3990
|
+
// not equal
|
|
3991
|
+
if (existing_pricing === undefined || incoming_pricing === undefined) {
|
|
3992
|
+
return false;
|
|
3993
|
+
}
|
|
3994
|
+
if (!(existing_pricing === incoming_pricing)) {
|
|
3995
|
+
return false;
|
|
3996
|
+
}
|
|
3997
|
+
}
|
|
3998
|
+
const existing_publisher = existing.publisher;
|
|
3999
|
+
const incoming_publisher = incoming.publisher;
|
|
4000
|
+
// if at least one of these optionals is defined
|
|
4001
|
+
if (existing_publisher !== undefined || incoming_publisher !== undefined) {
|
|
4002
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
4003
|
+
// not equal
|
|
4004
|
+
if (existing_publisher === undefined || incoming_publisher === undefined) {
|
|
4005
|
+
return false;
|
|
4006
|
+
}
|
|
4007
|
+
if (!(existing_publisher === incoming_publisher)) {
|
|
4008
|
+
return false;
|
|
4009
|
+
}
|
|
4010
|
+
}
|
|
4011
|
+
const existing_sourceName = existing.sourceName;
|
|
4012
|
+
const incoming_sourceName = incoming.sourceName;
|
|
4013
|
+
// if at least one of these optionals is defined
|
|
4014
|
+
if (existing_sourceName !== undefined || incoming_sourceName !== undefined) {
|
|
4015
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
4016
|
+
// not equal
|
|
4017
|
+
if (existing_sourceName === undefined || incoming_sourceName === undefined) {
|
|
4018
|
+
return false;
|
|
4019
|
+
}
|
|
4020
|
+
if (!(existing_sourceName === incoming_sourceName)) {
|
|
4021
|
+
return false;
|
|
4022
|
+
}
|
|
4023
|
+
}
|
|
4024
|
+
const existing_title = existing.title;
|
|
4025
|
+
const incoming_title = incoming.title;
|
|
4026
|
+
// if at least one of these optionals is defined
|
|
4027
|
+
if (existing_title !== undefined || incoming_title !== undefined) {
|
|
4028
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
4029
|
+
// not equal
|
|
4030
|
+
if (existing_title === undefined || incoming_title === undefined) {
|
|
4031
|
+
return false;
|
|
4032
|
+
}
|
|
4033
|
+
if (!(existing_title === incoming_title)) {
|
|
4034
|
+
return false;
|
|
4035
|
+
}
|
|
4036
|
+
}
|
|
4037
|
+
const existing_type = existing.type;
|
|
4038
|
+
const incoming_type = incoming.type;
|
|
4039
|
+
// if at least one of these optionals is defined
|
|
4040
|
+
if (existing_type !== undefined || incoming_type !== undefined) {
|
|
4041
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
4042
|
+
// not equal
|
|
4043
|
+
if (existing_type === undefined || incoming_type === undefined) {
|
|
4044
|
+
return false;
|
|
4045
|
+
}
|
|
4046
|
+
if (!(existing_type === incoming_type)) {
|
|
4047
|
+
return false;
|
|
4048
|
+
}
|
|
4049
|
+
}
|
|
4050
|
+
const existing_averageRating = existing.averageRating;
|
|
4051
|
+
const incoming_averageRating = incoming.averageRating;
|
|
4052
|
+
// if at least one of these optionals is defined
|
|
4053
|
+
if (existing_averageRating !== undefined || incoming_averageRating !== undefined) {
|
|
4054
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
4055
|
+
// not equal
|
|
4056
|
+
if (existing_averageRating === undefined || incoming_averageRating === undefined) {
|
|
4057
|
+
return false;
|
|
4058
|
+
}
|
|
4059
|
+
if (!(existing_averageRating === incoming_averageRating)) {
|
|
4060
|
+
return false;
|
|
4061
|
+
}
|
|
4062
|
+
}
|
|
4063
|
+
const existing_listingCategories = existing.listingCategories;
|
|
4064
|
+
const incoming_listingCategories = incoming.listingCategories;
|
|
4065
|
+
// if at least one of these optionals is defined
|
|
4066
|
+
if (existing_listingCategories !== undefined || incoming_listingCategories !== undefined) {
|
|
4067
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
4068
|
+
// not equal
|
|
4069
|
+
if (existing_listingCategories === undefined || incoming_listingCategories === undefined) {
|
|
4070
|
+
return false;
|
|
4071
|
+
}
|
|
4072
|
+
const equals_listingCategories_items = equalsArray(existing_listingCategories, incoming_listingCategories, (existing_listingCategories_item, incoming_listingCategories_item) => {
|
|
4073
|
+
if (!(existing_listingCategories_item === incoming_listingCategories_item)) {
|
|
4074
|
+
return false;
|
|
4075
|
+
}
|
|
4076
|
+
});
|
|
4077
|
+
if (equals_listingCategories_items === false) {
|
|
4078
|
+
return false;
|
|
4079
|
+
}
|
|
4080
|
+
}
|
|
4081
|
+
const existing_logos = existing.logos;
|
|
4082
|
+
const incoming_logos = incoming.logos;
|
|
4083
|
+
// if at least one of these optionals is defined
|
|
4084
|
+
if (existing_logos !== undefined || incoming_logos !== undefined) {
|
|
4085
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
4086
|
+
// not equal
|
|
4087
|
+
if (existing_logos === undefined || incoming_logos === undefined) {
|
|
4088
|
+
return false;
|
|
4089
|
+
}
|
|
4090
|
+
const equals_logos_items = equalsArray(existing_logos, incoming_logos, (existing_logos_item, incoming_logos_item) => {
|
|
4091
|
+
if (!(equals$3(existing_logos_item, incoming_logos_item))) {
|
|
4092
|
+
return false;
|
|
4093
|
+
}
|
|
4094
|
+
});
|
|
4095
|
+
if (equals_logos_items === false) {
|
|
4096
|
+
return false;
|
|
4097
|
+
}
|
|
4098
|
+
}
|
|
4099
|
+
return true;
|
|
4100
|
+
}
|
|
3741
4101
|
|
|
3742
|
-
const VERSION$1 = "
|
|
4102
|
+
const VERSION$1 = "8d9a771044db35da3a48fdd775bfe9b2";
|
|
3743
4103
|
function validate$1(obj, path = 'AppExchangeSearchListingCollectionRepresentation') {
|
|
3744
4104
|
const v_error = (() => {
|
|
3745
4105
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3760,6 +4120,11 @@ function validate$1(obj, path = 'AppExchangeSearchListingCollectionRepresentatio
|
|
|
3760
4120
|
return new TypeError(message);
|
|
3761
4121
|
}
|
|
3762
4122
|
}
|
|
4123
|
+
const obj_primaryKey = obj.primaryKey;
|
|
4124
|
+
const path_primaryKey = path + '.primaryKey';
|
|
4125
|
+
if (typeof obj_primaryKey !== 'string') {
|
|
4126
|
+
return new TypeError('Expected "string" but received "' + typeof obj_primaryKey + '" (at "' + path_primaryKey + '")');
|
|
4127
|
+
}
|
|
3763
4128
|
const obj_totalCount = obj.totalCount;
|
|
3764
4129
|
const path_totalCount = path + '.totalCount';
|
|
3765
4130
|
if (typeof obj_totalCount !== 'number' || (typeof obj_totalCount === 'number' && Math.floor(obj_totalCount) !== obj_totalCount)) {
|
|
@@ -3769,19 +4134,61 @@ function validate$1(obj, path = 'AppExchangeSearchListingCollectionRepresentatio
|
|
|
3769
4134
|
return v_error === undefined ? null : v_error;
|
|
3770
4135
|
}
|
|
3771
4136
|
const RepresentationType$1 = 'AppExchangeSearchListingCollectionRepresentation';
|
|
4137
|
+
function keyBuilder$1(luvio, config) {
|
|
4138
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.primaryKey;
|
|
4139
|
+
}
|
|
4140
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
4141
|
+
const keyParams = {
|
|
4142
|
+
primaryKey: object.primaryKey
|
|
4143
|
+
};
|
|
4144
|
+
return keyBuilder$1(luvio, keyParams);
|
|
4145
|
+
}
|
|
3772
4146
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
3773
4147
|
return input;
|
|
3774
4148
|
}
|
|
3775
4149
|
const select$3 = function AppExchangeSearchListingCollectionRepresentationSelect() {
|
|
4150
|
+
const { selections: AppExchangeSearchListingRepresentation__selections, opaque: AppExchangeSearchListingRepresentation__opaque, } = select$4();
|
|
3776
4151
|
return {
|
|
3777
4152
|
kind: 'Fragment',
|
|
3778
4153
|
version: VERSION$1,
|
|
3779
4154
|
private: [],
|
|
3780
|
-
|
|
4155
|
+
selections: [
|
|
4156
|
+
{
|
|
4157
|
+
name: 'listings',
|
|
4158
|
+
kind: 'Object',
|
|
4159
|
+
plural: true,
|
|
4160
|
+
selections: AppExchangeSearchListingRepresentation__selections
|
|
4161
|
+
},
|
|
4162
|
+
{
|
|
4163
|
+
name: 'primaryKey',
|
|
4164
|
+
kind: 'Scalar'
|
|
4165
|
+
},
|
|
4166
|
+
{
|
|
4167
|
+
name: 'totalCount',
|
|
4168
|
+
kind: 'Scalar'
|
|
4169
|
+
}
|
|
4170
|
+
]
|
|
3781
4171
|
};
|
|
3782
4172
|
};
|
|
3783
4173
|
function equals$1(existing, incoming) {
|
|
3784
|
-
|
|
4174
|
+
const existing_totalCount = existing.totalCount;
|
|
4175
|
+
const incoming_totalCount = incoming.totalCount;
|
|
4176
|
+
if (!(existing_totalCount === incoming_totalCount)) {
|
|
4177
|
+
return false;
|
|
4178
|
+
}
|
|
4179
|
+
const existing_primaryKey = existing.primaryKey;
|
|
4180
|
+
const incoming_primaryKey = incoming.primaryKey;
|
|
4181
|
+
if (!(existing_primaryKey === incoming_primaryKey)) {
|
|
4182
|
+
return false;
|
|
4183
|
+
}
|
|
4184
|
+
const existing_listings = existing.listings;
|
|
4185
|
+
const incoming_listings = incoming.listings;
|
|
4186
|
+
const equals_listings_items = equalsArray(existing_listings, incoming_listings, (existing_listings_item, incoming_listings_item) => {
|
|
4187
|
+
if (!(equals$2(existing_listings_item, incoming_listings_item))) {
|
|
4188
|
+
return false;
|
|
4189
|
+
}
|
|
4190
|
+
});
|
|
4191
|
+
if (equals_listings_items === false) {
|
|
3785
4192
|
return false;
|
|
3786
4193
|
}
|
|
3787
4194
|
return true;
|
|
@@ -3793,14 +4200,14 @@ const ingest$1 = function AppExchangeSearchListingCollectionRepresentationIngest
|
|
|
3793
4200
|
throw validateError;
|
|
3794
4201
|
}
|
|
3795
4202
|
}
|
|
3796
|
-
const key =
|
|
4203
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
3797
4204
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 3000;
|
|
3798
4205
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "appexchange", VERSION$1, RepresentationType$1, equals$1);
|
|
3799
4206
|
return createLink(key);
|
|
3800
4207
|
};
|
|
3801
4208
|
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
3802
4209
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3803
|
-
const rootKey =
|
|
4210
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
3804
4211
|
rootKeySet.set(rootKey, {
|
|
3805
4212
|
namespace: keyPrefix,
|
|
3806
4213
|
representationName: RepresentationType$1,
|
|
@@ -3811,21 +4218,18 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
3811
4218
|
function select$2(luvio, params) {
|
|
3812
4219
|
return select$3();
|
|
3813
4220
|
}
|
|
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
4221
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
3818
|
-
getTypeCacheKeys$1(storeKeyMap, luvio, response
|
|
4222
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
3819
4223
|
}
|
|
3820
|
-
function ingestSuccess$1(luvio, resourceParams, response
|
|
4224
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
3821
4225
|
const { body } = response;
|
|
3822
|
-
const key =
|
|
4226
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
3823
4227
|
luvio.storeIngest(key, ingest$1, body);
|
|
3824
4228
|
const snapshot = luvio.storeLookup({
|
|
3825
4229
|
recordId: key,
|
|
3826
4230
|
node: select$2(),
|
|
3827
4231
|
variables: {},
|
|
3828
|
-
}
|
|
4232
|
+
});
|
|
3829
4233
|
if (process.env.NODE_ENV !== 'production') {
|
|
3830
4234
|
if (snapshot.state !== 'Fulfilled') {
|
|
3831
4235
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
@@ -3834,56 +4238,46 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3834
4238
|
deepFreeze(snapshot.data);
|
|
3835
4239
|
return snapshot;
|
|
3836
4240
|
}
|
|
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
4241
|
function createResourceRequest$1(config) {
|
|
3844
4242
|
const headers = {};
|
|
3845
4243
|
return {
|
|
3846
4244
|
baseUri: '/services/data/v63.0',
|
|
3847
4245
|
basePath: '/connect/appexchange/search-listings',
|
|
3848
|
-
method: '
|
|
3849
|
-
body:
|
|
4246
|
+
method: 'post',
|
|
4247
|
+
body: config.body,
|
|
3850
4248
|
urlParams: {},
|
|
3851
|
-
queryParams:
|
|
4249
|
+
queryParams: {},
|
|
3852
4250
|
headers,
|
|
3853
4251
|
priority: 'normal',
|
|
3854
4252
|
};
|
|
3855
4253
|
}
|
|
3856
4254
|
|
|
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,
|
|
4255
|
+
const adapterName$1 = 'searchListings';
|
|
4256
|
+
const searchListings_ConfigPropertyMetadata = [
|
|
4257
|
+
generateParamConfigMetadata('category', false, 2 /* Body */, 0 /* String */, true),
|
|
4258
|
+
generateParamConfigMetadata('edition', false, 2 /* Body */, 0 /* String */, true),
|
|
4259
|
+
generateParamConfigMetadata('features', false, 2 /* Body */, 0 /* String */, true),
|
|
4260
|
+
generateParamConfigMetadata('impact', false, 2 /* Body */, 0 /* String */, true),
|
|
4261
|
+
generateParamConfigMetadata('industry', false, 2 /* Body */, 0 /* String */, true),
|
|
4262
|
+
generateParamConfigMetadata('keyword', false, 2 /* Body */, 0 /* String */),
|
|
4263
|
+
generateParamConfigMetadata('labs', false, 2 /* Body */, 0 /* String */, true),
|
|
4264
|
+
generateParamConfigMetadata('language', false, 2 /* Body */, 0 /* String */),
|
|
4265
|
+
generateParamConfigMetadata('languages', false, 2 /* Body */, 0 /* String */, true),
|
|
4266
|
+
generateParamConfigMetadata('page', false, 2 /* Body */, 3 /* Integer */),
|
|
4267
|
+
generateParamConfigMetadata('pageSize', false, 2 /* Body */, 3 /* Integer */),
|
|
4268
|
+
generateParamConfigMetadata('persona', false, 2 /* Body */, 0 /* String */, true),
|
|
4269
|
+
generateParamConfigMetadata('price', false, 2 /* Body */, 0 /* String */, true),
|
|
4270
|
+
generateParamConfigMetadata('product', false, 2 /* Body */, 0 /* String */),
|
|
4271
|
+
generateParamConfigMetadata('rating', false, 2 /* Body */, 3 /* Integer */),
|
|
4272
|
+
generateParamConfigMetadata('sort', false, 2 /* Body */, 0 /* String */),
|
|
4273
|
+
generateParamConfigMetadata('tech', false, 2 /* Body */, 0 /* String */, true),
|
|
4274
|
+
generateParamConfigMetadata('type', false, 2 /* Body */, 0 /* String */),
|
|
3877
4275
|
];
|
|
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
|
-
}
|
|
4276
|
+
const searchListings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, searchListings_ConfigPropertyMetadata);
|
|
4277
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(searchListings_ConfigPropertyMetadata);
|
|
3884
4278
|
function typeCheckConfig$1(untrustedConfig) {
|
|
3885
4279
|
const config = {};
|
|
3886
|
-
typeCheckConfig$3(untrustedConfig, config,
|
|
4280
|
+
typeCheckConfig$3(untrustedConfig, config, searchListings_ConfigPropertyMetadata);
|
|
3887
4281
|
return config;
|
|
3888
4282
|
}
|
|
3889
4283
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -3899,62 +4293,33 @@ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
|
3899
4293
|
}
|
|
3900
4294
|
return config;
|
|
3901
4295
|
}
|
|
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
4296
|
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
3921
4297
|
const resourceParams = createResourceParams$1(config);
|
|
3922
4298
|
const request = createResourceRequest$1(resourceParams);
|
|
3923
4299
|
return luvio.dispatchResourceRequest(request, options)
|
|
3924
4300
|
.then((response) => {
|
|
3925
|
-
return luvio.handleSuccessResponse(() =>
|
|
4301
|
+
return luvio.handleSuccessResponse(() => {
|
|
4302
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
4303
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4304
|
+
}, () => {
|
|
3926
4305
|
const cache = new StoreKeyMap();
|
|
3927
4306
|
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
3928
4307
|
return cache;
|
|
3929
4308
|
});
|
|
3930
4309
|
}, (response) => {
|
|
3931
|
-
|
|
4310
|
+
deepFreeze(response);
|
|
4311
|
+
throw response;
|
|
3932
4312
|
});
|
|
3933
4313
|
}
|
|
3934
|
-
|
|
3935
|
-
return
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
variables: {},
|
|
4314
|
+
const searchListingsAdapterFactory = (luvio) => {
|
|
4315
|
+
return function searchListings(untrustedConfig) {
|
|
4316
|
+
const config = validateAdapterConfig$1(untrustedConfig, searchListings_ConfigPropertyNames);
|
|
4317
|
+
// Invalid or incomplete config
|
|
4318
|
+
if (config === null) {
|
|
4319
|
+
throw new Error('Invalid config for "searchListings"');
|
|
4320
|
+
}
|
|
4321
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
3943
4322
|
};
|
|
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
4323
|
};
|
|
3959
4324
|
|
|
3960
4325
|
const VERSION = "b0309b3336a7e875a0cc40a008a340f9";
|
|
@@ -4156,4 +4521,4 @@ const postAppExchangeUserEventsAdapterFactory = (luvio) => {
|
|
|
4156
4521
|
};
|
|
4157
4522
|
};
|
|
4158
4523
|
|
|
4159
|
-
export {
|
|
4524
|
+
export { getListingDetailsAdapterFactory, postAppExchangeUserEventsAdapterFactory, searchListingsAdapterFactory };
|