@salesforce/lds-adapters-experience-model 1.100.2
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/LICENSE.txt +82 -0
- package/dist/es/es2018/experience-model.js +2234 -0
- package/dist/types/src/generated/adapters/adapter-utils.d.ts +66 -0
- package/dist/types/src/generated/adapters/getBlockType.d.ts +30 -0
- package/dist/types/src/generated/adapters/getBlockTypes.d.ts +34 -0
- package/dist/types/src/generated/adapters/getContentType.d.ts +30 -0
- package/dist/types/src/generated/adapters/getContentTypes.d.ts +34 -0
- package/dist/types/src/generated/adapters/getPropertyType.d.ts +30 -0
- package/dist/types/src/generated/adapters/getPropertyTypes.d.ts +31 -0
- package/dist/types/src/generated/artifacts/main.d.ts +6 -0
- package/dist/types/src/generated/artifacts/sfdc.d.ts +13 -0
- package/dist/types/src/generated/resources/deleteCmsDeploymentsByDeploymentId.d.ts +9 -0
- package/dist/types/src/generated/resources/deleteCmsSiteAuthorContentByContentKey.d.ts +14 -0
- package/dist/types/src/generated/resources/deleteConnectCmsContentJobsByJobId.d.ts +11 -0
- package/dist/types/src/generated/resources/deleteConnectCmsFoldersByFolderId.d.ts +11 -0
- package/dist/types/src/generated/resources/deleteConnectManagedContentContentSpacesContentsByContentSpaceIdAndManagedContentId.d.ts +10 -0
- package/dist/types/src/generated/resources/deleteConnectManagedContentContentSpacesMembersByContentSpaceIdAndMemberIdOrMe.d.ts +10 -0
- package/dist/types/src/generated/resources/getCmsContentsByContentKeyOrId.d.ts +18 -0
- package/dist/types/src/generated/resources/getCmsDeliveryCollectionByCollectionNameOrContentKeyAndTargetId.d.ts +21 -0
- package/dist/types/src/generated/resources/getCmsDeliveryCollectionMetadataByCollectionNameOrContentKeyAndTargetId.d.ts +19 -0
- package/dist/types/src/generated/resources/getCmsDeployments.d.ts +21 -0
- package/dist/types/src/generated/resources/getCmsSiteAuthorContentByContentKey.d.ts +18 -0
- package/dist/types/src/generated/resources/getCmsSiteAuthorContentContentKeys.d.ts +17 -0
- package/dist/types/src/generated/resources/getCmsSiteAuthorContentNodeByContentKeyAndContentNode.d.ts +16 -0
- package/dist/types/src/generated/resources/getCmsSiteAuthorContentNodesByContentKey.d.ts +18 -0
- package/dist/types/src/generated/resources/getCmsSpacesByContentSpaceId.d.ts +15 -0
- package/dist/types/src/generated/resources/getConnectCmsChannelsSearchableContentTypesByChannelId.d.ts +19 -0
- package/dist/types/src/generated/resources/getConnectCmsContent.d.ts +16 -0
- package/dist/types/src/generated/resources/getConnectCmsContentJobsByJobId.d.ts +15 -0
- package/dist/types/src/generated/resources/getConnectCmsContentTypesByContentTypeFQN.d.ts +20 -0
- package/dist/types/src/generated/resources/getConnectCmsContentVersionByManagedContentVersionId.d.ts +19 -0
- package/dist/types/src/generated/resources/getConnectCmsContentsVariantsByVariantId.d.ts +15 -0
- package/dist/types/src/generated/resources/getConnectCmsDeliveryChannels.d.ts +16 -0
- package/dist/types/src/generated/resources/getConnectCmsDeliveryChannelsContentsQueryByChannelId.d.ts +27 -0
- package/dist/types/src/generated/resources/getConnectCmsDeliveryChannelsContentsSearchByChannelId.d.ts +21 -0
- package/dist/types/src/generated/resources/getConnectCmsDeliveryChannelsMediaContentByChannelIdAndMediaGuid.d.ts +16 -0
- package/dist/types/src/generated/resources/getConnectCmsDeliveryRecordsContentsByRecordId.d.ts +22 -0
- package/dist/types/src/generated/resources/getConnectCmsFoldersByFolderId.d.ts +15 -0
- package/dist/types/src/generated/resources/getConnectCmsFoldersItemsByFolderId.d.ts +25 -0
- package/dist/types/src/generated/resources/getConnectCmsManagementChannels.d.ts +16 -0
- package/dist/types/src/generated/resources/getConnectCmsManagementChannelsByChannelId.d.ts +15 -0
- package/dist/types/src/generated/resources/getConnectCommunitiesManagedContentDeliveryByCommunityId.d.ts +25 -0
- package/dist/types/src/generated/resources/getConnectCommunitiesManagedContentDeliveryContentsByCommunityId.d.ts +27 -0
- package/dist/types/src/generated/resources/getConnectCommunitiesManagedContentDeliveryContentsSearchByCommunityId.d.ts +21 -0
- package/dist/types/src/generated/resources/getConnectExperienceModelBlockTypes.d.ts +23 -0
- package/dist/types/src/generated/resources/getConnectExperienceModelBlockTypesByFullyQualifiedName.d.ts +21 -0
- package/dist/types/src/generated/resources/getConnectExperienceModelContentTypes.d.ts +23 -0
- package/dist/types/src/generated/resources/getConnectExperienceModelContentTypesByFullyQualifiedName.d.ts +21 -0
- package/dist/types/src/generated/resources/getConnectExperienceModelPropertyTypes.d.ts +20 -0
- package/dist/types/src/generated/resources/getConnectExperienceModelPropertyTypesByFullyQualifiedName.d.ts +21 -0
- package/dist/types/src/generated/resources/getConnectManagedContentContentSpacesContentVersionsByContentSpaceIdAndManagedContentVersionId.d.ts +19 -0
- package/dist/types/src/generated/resources/getConnectManagedContentContentSpacesMembersByContentSpaceId.d.ts +15 -0
- package/dist/types/src/generated/resources/getConnectManagedContentContentSpacesMembersPermissionsByContentSpaceIdAndMemberIdOrMe.d.ts +16 -0
- package/dist/types/src/generated/resources/getConnectManagedContentRoles.d.ts +15 -0
- package/dist/types/src/generated/resources/patchCmsDeploymentsByDeploymentId.d.ts +9 -0
- package/dist/types/src/generated/resources/patchConnectCmsChannelsSearchableContentTypesByChannelId.d.ts +13 -0
- package/dist/types/src/generated/resources/patchConnectCmsContentVersionByManagedContentVersionId.d.ts +21 -0
- package/dist/types/src/generated/resources/patchConnectCmsFoldersByFolderId.d.ts +13 -0
- package/dist/types/src/generated/resources/patchConnectCmsFoldersItemsByFolderId.d.ts +13 -0
- package/dist/types/src/generated/resources/patchConnectCmsManagementChannelsByChannelId.d.ts +17 -0
- package/dist/types/src/generated/resources/patchConnectCmsSchedulesByDeploymentId.d.ts +13 -0
- package/dist/types/src/generated/resources/patchConnectManagedContentContentSpacesContentVersionsByContentSpaceIdAndManagedContentVersionId.d.ts +21 -0
- package/dist/types/src/generated/resources/patchConnectManagedContentContentSpacesContentsByContentSpaceIdAndManagedContentId.d.ts +14 -0
- package/dist/types/src/generated/resources/patchConnectManagedContentContentSpacesMembersByContentSpaceIdAndMemberIdOrMe.d.ts +14 -0
- package/dist/types/src/generated/resources/postCmsContents.d.ts +18 -0
- package/dist/types/src/generated/resources/postCmsDeliveryChannelsVariantsByChannelId.d.ts +16 -0
- package/dist/types/src/generated/resources/postCmsDeployments.d.ts +17 -0
- package/dist/types/src/generated/resources/postCmsSiteDeliveryContentsContentKeysByChannelId.d.ts +16 -0
- package/dist/types/src/generated/resources/postCmsSiteDeliveryContentsContentTypesByChannelId.d.ts +15 -0
- package/dist/types/src/generated/resources/postCmsSiteDeliveryContentsNodeIdsByChannelId.d.ts +16 -0
- package/dist/types/src/generated/resources/postConnectCmsContentJobsExport.d.ts +17 -0
- package/dist/types/src/generated/resources/postConnectCmsContentJobsImport.d.ts +16 -0
- package/dist/types/src/generated/resources/postConnectCmsContentSpacesVersionByContentSpaceId.d.ts +24 -0
- package/dist/types/src/generated/resources/postConnectCmsContentSpacesVersionsByContentSpaceId.d.ts +15 -0
- package/dist/types/src/generated/resources/postConnectCmsContentVariant.d.ts +18 -0
- package/dist/types/src/generated/resources/postConnectCmsFolders.d.ts +13 -0
- package/dist/types/src/generated/resources/postConnectCmsManagementChannels.d.ts +17 -0
- package/dist/types/src/generated/resources/postConnectCmsSchedules.d.ts +18 -0
- package/dist/types/src/generated/resources/postConnectManagedContentContentSpacesContentVersionsByContentSpaceId.d.ts +23 -0
- package/dist/types/src/generated/resources/postConnectManagedContentContentSpacesMembersByContentSpaceId.d.ts +16 -0
- package/dist/types/src/generated/resources/postConnectManagedContentTranslation.d.ts +15 -0
- package/dist/types/src/generated/resources/putConnectCmsContentVersionByManagedContentVersionId.d.ts +21 -0
- package/dist/types/src/generated/resources/putConnectCmsContentsVariantsByVariantId.d.ts +16 -0
- package/dist/types/src/generated/types/AbstractMCSFolderRepresentation.d.ts +35 -0
- package/dist/types/src/generated/types/AbstractMContentRepresentation.d.ts +50 -0
- package/dist/types/src/generated/types/ExperienceModelBlockTypeCollectionRepresentation.d.ts +43 -0
- package/dist/types/src/generated/types/ExperienceModelBlockTypeDetailRepresentation.d.ts +63 -0
- package/dist/types/src/generated/types/ExperienceModelBlockTypeSummaryRepresentation.d.ts +52 -0
- package/dist/types/src/generated/types/ExperienceModelContentTypeCollectionRepresentation.d.ts +43 -0
- package/dist/types/src/generated/types/ExperienceModelContentTypeDetailRepresentation.d.ts +55 -0
- package/dist/types/src/generated/types/ExperienceModelContentTypeSummaryRepresentation.d.ts +45 -0
- package/dist/types/src/generated/types/ExperienceModelPropertyTypeCollectionRepresentation.d.ts +43 -0
- package/dist/types/src/generated/types/ExperienceModelPropertyTypeDetailRepresentation.d.ts +55 -0
- package/dist/types/src/generated/types/ExperienceModelPropertyTypeSummaryRepresentation.d.ts +45 -0
- package/dist/types/src/generated/types/MCDeliveryV2VariantCollectionRepresentation.d.ts +30 -0
- package/dist/types/src/generated/types/MCDeliveryV2VariantInputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/MCDeliveryV2VariantRepresentation.d.ts +53 -0
- package/dist/types/src/generated/types/MCSiteContentCollectionRepresentation.d.ts +30 -0
- package/dist/types/src/generated/types/MCSiteContentRepresentation.d.ts +46 -0
- package/dist/types/src/generated/types/MCSiteDeliveryByContentKeysInputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/MCSiteDeliveryByContentTypesInputRepresentation.d.ts +29 -0
- package/dist/types/src/generated/types/MCSiteDeliveryByNodesInputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/MCSiteNodeCollectionRepresentation.d.ts +30 -0
- package/dist/types/src/generated/types/MCSiteNodeRepresentation.d.ts +45 -0
- package/dist/types/src/generated/types/MCSiteVariantRepresentation.d.ts +47 -0
- package/dist/types/src/generated/types/MContentBodyRepresentation.d.ts +33 -0
- package/dist/types/src/generated/types/MContentCollectionMetadataRepresentation.d.ts +39 -0
- package/dist/types/src/generated/types/MContentCollectionRepresentation.d.ts +51 -0
- package/dist/types/src/generated/types/MContentDetailRepresentation.d.ts +31 -0
- package/dist/types/src/generated/types/MContentSummaryRepresentation.d.ts +27 -0
- package/dist/types/src/generated/types/ManagedContentAssociationsInputRep.d.ts +33 -0
- package/dist/types/src/generated/types/ManagedContentAssociationsRepresentation.d.ts +30 -0
- package/dist/types/src/generated/types/ManagedContentBodyInputRep.d.ts +33 -0
- package/dist/types/src/generated/types/ManagedContentChannelCollectionRepresentation.d.ts +42 -0
- package/dist/types/src/generated/types/ManagedContentChannelInputRepresentation.d.ts +44 -0
- package/dist/types/src/generated/types/ManagedContentChannelRepresentation.d.ts +47 -0
- package/dist/types/src/generated/types/ManagedContentChildRepresentation.d.ts +35 -0
- package/dist/types/src/generated/types/ManagedContentCollectionRepresentation.d.ts +30 -0
- package/dist/types/src/generated/types/ManagedContentDateAndTimeNodeValueRepresentation.d.ts +34 -0
- package/dist/types/src/generated/types/ManagedContentDateNodeValueRepresentation.d.ts +30 -0
- package/dist/types/src/generated/types/ManagedContentDeploymentCollectionRepresentation.d.ts +39 -0
- package/dist/types/src/generated/types/ManagedContentDeploymentInputRepresentation.d.ts +44 -0
- package/dist/types/src/generated/types/ManagedContentDeploymentItemRepresentation.d.ts +41 -0
- package/dist/types/src/generated/types/ManagedContentDeploymentRepresentation.d.ts +51 -0
- package/dist/types/src/generated/types/ManagedContentDetailCollectionRepresentation.d.ts +33 -0
- package/dist/types/src/generated/types/ManagedContentDetailRepresentation.d.ts +38 -0
- package/dist/types/src/generated/types/ManagedContentDocumentRepresentation.d.ts +74 -0
- package/dist/types/src/generated/types/ManagedContentExportContentJobRequestInputRepresentation.d.ts +44 -0
- package/dist/types/src/generated/types/ManagedContentExportJobItemIdsInputList.d.ts +29 -0
- package/dist/types/src/generated/types/ManagedContentFolderSummaryRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/ManagedContentInputRep.d.ts +32 -0
- package/dist/types/src/generated/types/ManagedContentInputRepresentation.d.ts +45 -0
- package/dist/types/src/generated/types/ManagedContentJobRepresentation.d.ts +65 -0
- package/dist/types/src/generated/types/ManagedContentJobRequestInputRepresentation.d.ts +41 -0
- package/dist/types/src/generated/types/ManagedContentMediaNodeValueRepresentation.d.ts +57 -0
- package/dist/types/src/generated/types/ManagedContentMediaSourceNodeValueRepresentation.d.ts +51 -0
- package/dist/types/src/generated/types/ManagedContentNodeTypeRepresentation.d.ts +35 -0
- package/dist/types/src/generated/types/ManagedContentNodeValueRepresentation.d.ts +34 -0
- package/dist/types/src/generated/types/ManagedContentRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/ManagedContentScheduleInputRepresentation.d.ts +47 -0
- package/dist/types/src/generated/types/ManagedContentSearchResultCollectionRepresentation.d.ts +39 -0
- package/dist/types/src/generated/types/ManagedContentSearchResultContentTypeRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/ManagedContentSearchResultRepresentation.d.ts +45 -0
- package/dist/types/src/generated/types/ManagedContentSpaceFolderDetailRepresentation.d.ts +43 -0
- package/dist/types/src/generated/types/ManagedContentSpaceFolderInputRep.d.ts +32 -0
- package/dist/types/src/generated/types/ManagedContentSpaceFolderItemCollectionInputRep.d.ts +32 -0
- package/dist/types/src/generated/types/ManagedContentSpaceFolderItemCollectionRepresentation.d.ts +36 -0
- package/dist/types/src/generated/types/ManagedContentSpaceFolderItemRepresentation.d.ts +65 -0
- package/dist/types/src/generated/types/ManagedContentSpaceFolderRepresentation.d.ts +27 -0
- package/dist/types/src/generated/types/ManagedContentSpaceMemberCollectionRepresentation.d.ts +30 -0
- package/dist/types/src/generated/types/ManagedContentSpaceMemberInputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/ManagedContentSpaceMemberPermissionsRepresentation.d.ts +38 -0
- package/dist/types/src/generated/types/ManagedContentSpaceMemberRepresentation.d.ts +35 -0
- package/dist/types/src/generated/types/ManagedContentSpacePermissionRepresentation.d.ts +50 -0
- package/dist/types/src/generated/types/ManagedContentSpaceRepresentation.d.ts +56 -0
- package/dist/types/src/generated/types/ManagedContentSpaceRoleCollectionRepresentation.d.ts +30 -0
- package/dist/types/src/generated/types/ManagedContentSpaceRoleRepresentation.d.ts +35 -0
- package/dist/types/src/generated/types/ManagedContentSpaceSummaryRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/ManagedContentTextNodeValueRepresentation.d.ts +30 -0
- package/dist/types/src/generated/types/ManagedContentTranslationRepresentation.d.ts +65 -0
- package/dist/types/src/generated/types/ManagedContentTranslationRequestInputRep.d.ts +38 -0
- package/dist/types/src/generated/types/ManagedContentTypeRepresentation.d.ts +40 -0
- package/dist/types/src/generated/types/ManagedContentTypeSchemaRepresentation.d.ts +49 -0
- package/dist/types/src/generated/types/ManagedContentTypeSearchableCollectionRepresentation.d.ts +39 -0
- package/dist/types/src/generated/types/ManagedContentTypeSearchableInputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/ManagedContentTypeSearchableRepresentation.d.ts +38 -0
- package/dist/types/src/generated/types/ManagedContentTypeSummaryRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/ManagedContentTypeViewRepresentation.d.ts +39 -0
- package/dist/types/src/generated/types/ManagedContentUserSummaryRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/ManagedContentVariantRepresentation.d.ts +79 -0
- package/dist/types/src/generated/types/ManagedContentVariantUpdateInputRepresentation.d.ts +39 -0
- package/dist/types/src/generated/types/ManagedContentVariantV1InputRep.d.ts +47 -0
- package/dist/types/src/generated/types/ManagedContentVariantV1Representation.d.ts +50 -0
- package/dist/types/src/generated/types/ManagedContentVersionCollectionRepresentation.d.ts +50 -0
- package/dist/types/src/generated/types/ManagedContentVersionInputRep.d.ts +51 -0
- package/dist/types/src/generated/types/ManagedContentVersionInternalCollectionRepresentation.d.ts +33 -0
- package/dist/types/src/generated/types/ManagedContentVersionInternalRepresentation.d.ts +81 -0
- package/dist/types/src/generated/types/ManagedContentVersionRepresentation.d.ts +66 -0
- package/dist/types/src/generated/types/ManagedContentVersionSiteNodeCollectionRepresentation.d.ts +30 -0
- package/dist/types/src/generated/types/ManagedContentVersionSiteNodeRepresentation.d.ts +41 -0
- package/dist/types/src/generated/types/ManagedContentVersionV2CollectionInputRepresentation.d.ts +29 -0
- package/dist/types/src/generated/types/ManagedContentVersionV2CollectionRepresentation.d.ts +33 -0
- package/dist/types/src/generated/types/ManagedContentVersionV2InputRepresentation.d.ts +54 -0
- package/dist/types/src/generated/types/ManagedContentVersionV2Representation.d.ts +75 -0
- package/dist/types/src/generated/types/ReferenceRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/StreamedRepresentation.d.ts +26 -0
- package/dist/types/src/generated/types/TopicSummaryRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/type-utils.d.ts +39 -0
- package/dist/umd/es2018/experience-model.js +2247 -0
- package/dist/umd/es5/experience-model.js +2256 -0
- package/package.json +67 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +2306 -0
- package/src/raml/api.raml +3820 -0
- package/src/raml/luvio.raml +129 -0
|
@@ -0,0 +1,2256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
(function (global, factory) {
|
|
8
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@luvio/engine')) :
|
|
9
|
+
typeof define === 'function' && define.amd ? define(['exports', '@luvio/engine'], factory) :
|
|
10
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.experienceModel = {}, global.engine));
|
|
11
|
+
})(this, (function (exports, engine) { 'use strict';
|
|
12
|
+
|
|
13
|
+
var ObjectPrototypeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
14
|
+
var ObjectKeys$1 = Object.keys;
|
|
15
|
+
var ArrayIsArray$1 = Array.isArray;
|
|
16
|
+
/**
|
|
17
|
+
* Validates an adapter config is well-formed.
|
|
18
|
+
* @param config The config to validate.
|
|
19
|
+
* @param adapter The adapter validation configuration.
|
|
20
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
21
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
22
|
+
*/
|
|
23
|
+
function validateConfig(config, adapter, oneOf) {
|
|
24
|
+
var displayName = adapter.displayName;
|
|
25
|
+
var _a = adapter.parameters, required = _a.required, optional = _a.optional, unsupported = _a.unsupported;
|
|
26
|
+
if (config === undefined ||
|
|
27
|
+
required.every(function (req) { return ObjectPrototypeHasOwnProperty.call(config, req); }) === false) {
|
|
28
|
+
throw new TypeError("adapter ".concat(displayName, " configuration must specify ").concat(required.sort().join(', ')));
|
|
29
|
+
}
|
|
30
|
+
if (oneOf && oneOf.some(function (req) { return ObjectPrototypeHasOwnProperty.call(config, req); }) === false) {
|
|
31
|
+
throw new TypeError("adapter ".concat(displayName, " configuration must specify one of ").concat(oneOf.sort().join(', ')));
|
|
32
|
+
}
|
|
33
|
+
if (unsupported !== undefined &&
|
|
34
|
+
unsupported.some(function (req) { return ObjectPrototypeHasOwnProperty.call(config, req); })) {
|
|
35
|
+
throw new TypeError("adapter ".concat(displayName, " does not yet support ").concat(unsupported.sort().join(', ')));
|
|
36
|
+
}
|
|
37
|
+
var supported = required.concat(optional);
|
|
38
|
+
if (ObjectKeys$1(config).some(function (key) { return !supported.includes(key); })) {
|
|
39
|
+
throw new TypeError("adapter ".concat(displayName, " configuration supports only ").concat(supported.sort().join(', ')));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function untrustedIsObject(untrusted) {
|
|
43
|
+
return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
|
|
44
|
+
}
|
|
45
|
+
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
46
|
+
return configPropertyNames.parameters.required.every(function (req) { return req in config; });
|
|
47
|
+
}
|
|
48
|
+
var snapshotRefreshOptions = {
|
|
49
|
+
overrides: {
|
|
50
|
+
headers: {
|
|
51
|
+
'Cache-Control': 'no-cache',
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
var keyPrefix = 'ExperienceType';
|
|
56
|
+
|
|
57
|
+
var ObjectFreeze = Object.freeze, ObjectKeys = Object.keys;
|
|
58
|
+
var ArrayIsArray = Array.isArray;
|
|
59
|
+
var JSONStringify = JSON.stringify;
|
|
60
|
+
function deepFreeze$9(value) {
|
|
61
|
+
// No need to freeze primitives
|
|
62
|
+
if (typeof value !== 'object' || value === null) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (ArrayIsArray(value)) {
|
|
66
|
+
for (var i = 0, len = value.length; i < len; i += 1) {
|
|
67
|
+
deepFreeze$9(value[i]);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
var keys = ObjectKeys(value);
|
|
72
|
+
for (var i = 0, len = keys.length; i < len; i += 1) {
|
|
73
|
+
deepFreeze$9(value[keys[i]]);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
ObjectFreeze(value);
|
|
77
|
+
}
|
|
78
|
+
function createLink(ref) {
|
|
79
|
+
return {
|
|
80
|
+
__ref: engine.serializeStructuredKey(ref),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function validate$8(obj, path) {
|
|
85
|
+
if (path === void 0) { path = 'ExperienceModelBlockTypeSummaryRepresentation'; }
|
|
86
|
+
var v_error = (function () {
|
|
87
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
88
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
89
|
+
}
|
|
90
|
+
if (obj.description !== undefined) {
|
|
91
|
+
var obj_description = obj.description;
|
|
92
|
+
var path_description = path + '.description';
|
|
93
|
+
if (typeof obj_description !== 'string') {
|
|
94
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
var obj_detailUrl = obj.detailUrl;
|
|
98
|
+
var path_detailUrl = path + '.detailUrl';
|
|
99
|
+
if (typeof obj_detailUrl !== 'string') {
|
|
100
|
+
return new TypeError('Expected "string" but received "' + typeof obj_detailUrl + '" (at "' + path_detailUrl + '")');
|
|
101
|
+
}
|
|
102
|
+
var obj_developerName = obj.developerName;
|
|
103
|
+
var path_developerName = path + '.developerName';
|
|
104
|
+
if (typeof obj_developerName !== 'string') {
|
|
105
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
106
|
+
}
|
|
107
|
+
var obj_icon = obj.icon;
|
|
108
|
+
var path_icon = path + '.icon';
|
|
109
|
+
if (typeof obj_icon !== 'object' || ArrayIsArray(obj_icon) || obj_icon === null) {
|
|
110
|
+
return new TypeError('Expected "object" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
|
|
111
|
+
}
|
|
112
|
+
var obj_icon_keys = ObjectKeys(obj_icon);
|
|
113
|
+
for (var i = 0; i < obj_icon_keys.length; i++) {
|
|
114
|
+
var key = obj_icon_keys[i];
|
|
115
|
+
var obj_icon_prop = obj_icon[key];
|
|
116
|
+
var path_icon_prop = path_icon + '["' + key + '"]';
|
|
117
|
+
if (typeof obj_icon_prop !== 'string') {
|
|
118
|
+
return new TypeError('Expected "string" but received "' + typeof obj_icon_prop + '" (at "' + path_icon_prop + '")');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (obj.id !== undefined) {
|
|
122
|
+
var obj_id = obj.id;
|
|
123
|
+
var path_id = path + '.id';
|
|
124
|
+
if (typeof obj_id !== 'string') {
|
|
125
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
var obj_namespacePrefix = obj.namespacePrefix;
|
|
129
|
+
var path_namespacePrefix = path + '.namespacePrefix';
|
|
130
|
+
if (typeof obj_namespacePrefix !== 'string') {
|
|
131
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespacePrefix + '" (at "' + path_namespacePrefix + '")');
|
|
132
|
+
}
|
|
133
|
+
var obj_title = obj.title;
|
|
134
|
+
var path_title = path + '.title';
|
|
135
|
+
if (typeof obj_title !== 'string') {
|
|
136
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
137
|
+
}
|
|
138
|
+
})();
|
|
139
|
+
return v_error === undefined ? null : v_error;
|
|
140
|
+
}
|
|
141
|
+
function deepFreeze$8(input) {
|
|
142
|
+
var input_icon = input.icon;
|
|
143
|
+
var input_icon_keys = Object.keys(input_icon);
|
|
144
|
+
var input_icon_length = input_icon_keys.length;
|
|
145
|
+
for (var i = 0; i < input_icon_length; i++) {
|
|
146
|
+
input_icon_keys[i];
|
|
147
|
+
}
|
|
148
|
+
ObjectFreeze(input_icon);
|
|
149
|
+
ObjectFreeze(input);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
var TTL$5 = 3600000;
|
|
153
|
+
var VERSION$5 = "c4cd880e972cdf9faaa6db963fe35b31";
|
|
154
|
+
function validate$7(obj, path) {
|
|
155
|
+
if (path === void 0) { path = 'ExperienceModelBlockTypeCollectionRepresentation'; }
|
|
156
|
+
var v_error = (function () {
|
|
157
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
158
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
159
|
+
}
|
|
160
|
+
var obj_blockTypes = obj.blockTypes;
|
|
161
|
+
var path_blockTypes = path + '.blockTypes';
|
|
162
|
+
if (!ArrayIsArray(obj_blockTypes)) {
|
|
163
|
+
return new TypeError('Expected "array" but received "' + typeof obj_blockTypes + '" (at "' + path_blockTypes + '")');
|
|
164
|
+
}
|
|
165
|
+
for (var i = 0; i < obj_blockTypes.length; i++) {
|
|
166
|
+
var obj_blockTypes_item = obj_blockTypes[i];
|
|
167
|
+
var path_blockTypes_item = path_blockTypes + '[' + i + ']';
|
|
168
|
+
var referencepath_blockTypes_itemValidationError = validate$8(obj_blockTypes_item, path_blockTypes_item);
|
|
169
|
+
if (referencepath_blockTypes_itemValidationError !== null) {
|
|
170
|
+
var message = 'Object doesn\'t match ExperienceModelBlockTypeSummaryRepresentation (at "' + path_blockTypes_item + '")\n';
|
|
171
|
+
message += referencepath_blockTypes_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
172
|
+
return new TypeError(message);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
var obj_count = obj.count;
|
|
176
|
+
var path_count = path + '.count';
|
|
177
|
+
if (typeof obj_count !== 'number' || (typeof obj_count === 'number' && Math.floor(obj_count) !== obj_count)) {
|
|
178
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
179
|
+
}
|
|
180
|
+
var obj_currentPageUrl = obj.currentPageUrl;
|
|
181
|
+
var path_currentPageUrl = path + '.currentPageUrl';
|
|
182
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
183
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
184
|
+
}
|
|
185
|
+
if (obj.nextPageUrl !== undefined) {
|
|
186
|
+
var obj_nextPageUrl = obj.nextPageUrl;
|
|
187
|
+
var path_nextPageUrl = path + '.nextPageUrl';
|
|
188
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
189
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (obj.previousPageUrl !== undefined) {
|
|
193
|
+
var obj_previousPageUrl = obj.previousPageUrl;
|
|
194
|
+
var path_previousPageUrl = path + '.previousPageUrl';
|
|
195
|
+
if (typeof obj_previousPageUrl !== 'string') {
|
|
196
|
+
return new TypeError('Expected "string" but received "' + typeof obj_previousPageUrl + '" (at "' + path_previousPageUrl + '")');
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
})();
|
|
200
|
+
return v_error === undefined ? null : v_error;
|
|
201
|
+
}
|
|
202
|
+
var RepresentationType$5 = 'ExperienceModelBlockTypeCollectionRepresentation';
|
|
203
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
204
|
+
return input;
|
|
205
|
+
}
|
|
206
|
+
var select$b = function ExperienceModelBlockTypeCollectionRepresentationSelect() {
|
|
207
|
+
return {
|
|
208
|
+
kind: 'Fragment',
|
|
209
|
+
version: VERSION$5,
|
|
210
|
+
private: [],
|
|
211
|
+
opaque: true
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
function equals$5(existing, incoming) {
|
|
215
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
function deepFreeze$7(input) {
|
|
221
|
+
var input_blockTypes = input.blockTypes;
|
|
222
|
+
for (var i = 0; i < input_blockTypes.length; i++) {
|
|
223
|
+
var input_blockTypes_item = input_blockTypes[i];
|
|
224
|
+
deepFreeze$8(input_blockTypes_item);
|
|
225
|
+
}
|
|
226
|
+
ObjectFreeze(input_blockTypes);
|
|
227
|
+
ObjectFreeze(input);
|
|
228
|
+
}
|
|
229
|
+
var ingest$5 = function ExperienceModelBlockTypeCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
230
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
231
|
+
var validateError = validate$7(input);
|
|
232
|
+
if (validateError !== null) {
|
|
233
|
+
throw validateError;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
var key = path.fullPath;
|
|
237
|
+
var existingRecord = store.readEntry(key);
|
|
238
|
+
var ttlToUse = TTL$5;
|
|
239
|
+
var incomingRecord = normalize$5(input, store.readEntry(key), {
|
|
240
|
+
fullPath: key,
|
|
241
|
+
parent: path.parent,
|
|
242
|
+
propertyName: path.propertyName,
|
|
243
|
+
ttl: ttlToUse
|
|
244
|
+
});
|
|
245
|
+
deepFreeze$7(input);
|
|
246
|
+
if (existingRecord === undefined || equals$5(existingRecord, incomingRecord) === false) {
|
|
247
|
+
luvio.storePublish(key, incomingRecord);
|
|
248
|
+
}
|
|
249
|
+
{
|
|
250
|
+
var storeMetadataParams = {
|
|
251
|
+
ttl: ttlToUse,
|
|
252
|
+
namespace: "ExperienceType",
|
|
253
|
+
version: VERSION$5,
|
|
254
|
+
representationName: RepresentationType$5,
|
|
255
|
+
};
|
|
256
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
257
|
+
}
|
|
258
|
+
return createLink(key);
|
|
259
|
+
};
|
|
260
|
+
function getTypeCacheKeys$5(luvio, input, fullPathFactory) {
|
|
261
|
+
var rootKeySet = new engine.StoreKeyMap();
|
|
262
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
263
|
+
var rootKey = fullPathFactory();
|
|
264
|
+
rootKeySet.set(rootKey, {
|
|
265
|
+
namespace: keyPrefix,
|
|
266
|
+
representationName: RepresentationType$5,
|
|
267
|
+
mergeable: false
|
|
268
|
+
});
|
|
269
|
+
return rootKeySet;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
function select$a(luvio, params) {
|
|
273
|
+
return select$b();
|
|
274
|
+
}
|
|
275
|
+
function keyBuilder$b(luvio, params) {
|
|
276
|
+
return keyPrefix + '::ExperienceModelBlockTypeCollectionRepresentation:(' + 'contentTypeFullyQualifiedName:' + params.queryParams.contentTypeFullyQualifiedName + ',' + 'designConfigTarget:' + params.queryParams.designConfigTarget + ',' + 'fullyQualifiedNames:' + params.queryParams.fullyQualifiedNames + ',' + 'language:' + params.queryParams.language + ',' + 'mixinTypeFullyQualifiedNames:' + params.queryParams.mixinTypeFullyQualifiedNames + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'renditionConfigTarget:' + params.queryParams.renditionConfigTarget + ',' + 'typeClassFullyQualifiedNames:' + params.queryParams.typeClassFullyQualifiedNames + ')';
|
|
277
|
+
}
|
|
278
|
+
function getResponseCacheKeys$5(luvio, resourceParams, response) {
|
|
279
|
+
return getTypeCacheKeys$5(luvio, response, function () { return keyBuilder$b(luvio, resourceParams); });
|
|
280
|
+
}
|
|
281
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
282
|
+
var body = response.body;
|
|
283
|
+
var key = keyBuilder$b(luvio, resourceParams);
|
|
284
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
285
|
+
var snapshot = luvio.storeLookup({
|
|
286
|
+
recordId: key,
|
|
287
|
+
node: select$a(),
|
|
288
|
+
variables: {},
|
|
289
|
+
}, snapshotRefresh);
|
|
290
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
291
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
292
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return snapshot;
|
|
296
|
+
}
|
|
297
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
298
|
+
var key = keyBuilder$b(luvio, params);
|
|
299
|
+
var errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
300
|
+
var storeMetadataParams = {
|
|
301
|
+
ttl: TTL$5,
|
|
302
|
+
namespace: keyPrefix,
|
|
303
|
+
version: VERSION$5,
|
|
304
|
+
representationName: RepresentationType$5
|
|
305
|
+
};
|
|
306
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
307
|
+
return errorSnapshot;
|
|
308
|
+
}
|
|
309
|
+
function createResourceRequest$5(config) {
|
|
310
|
+
var headers = {};
|
|
311
|
+
return {
|
|
312
|
+
baseUri: '/services/data/v58.0',
|
|
313
|
+
basePath: '/connect/experience-model/block-types',
|
|
314
|
+
method: 'get',
|
|
315
|
+
body: null,
|
|
316
|
+
urlParams: {},
|
|
317
|
+
queryParams: config.queryParams,
|
|
318
|
+
headers: headers,
|
|
319
|
+
priority: 'normal',
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
var getBlockTypes_ConfigPropertyNames = {
|
|
324
|
+
displayName: 'getBlockTypes',
|
|
325
|
+
parameters: {
|
|
326
|
+
required: [],
|
|
327
|
+
optional: ['contentTypeFullyQualifiedName', 'designConfigTarget', 'fullyQualifiedNames', 'language', 'mixinTypeFullyQualifiedNames', 'page', 'pageSize', 'renditionConfigTarget', 'typeClassFullyQualifiedNames']
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
function createResourceParams$5(config) {
|
|
331
|
+
var resourceParams = {
|
|
332
|
+
queryParams: {
|
|
333
|
+
contentTypeFullyQualifiedName: config.contentTypeFullyQualifiedName, designConfigTarget: config.designConfigTarget, fullyQualifiedNames: config.fullyQualifiedNames, language: config.language, mixinTypeFullyQualifiedNames: config.mixinTypeFullyQualifiedNames, page: config.page, pageSize: config.pageSize, renditionConfigTarget: config.renditionConfigTarget, typeClassFullyQualifiedNames: config.typeClassFullyQualifiedNames
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
return resourceParams;
|
|
337
|
+
}
|
|
338
|
+
function keyBuilder$a(luvio, config) {
|
|
339
|
+
var resourceParams = createResourceParams$5(config);
|
|
340
|
+
return keyBuilder$b(luvio, resourceParams);
|
|
341
|
+
}
|
|
342
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
343
|
+
var config = {};
|
|
344
|
+
var untrustedConfig_contentTypeFullyQualifiedName = untrustedConfig.contentTypeFullyQualifiedName;
|
|
345
|
+
if (typeof untrustedConfig_contentTypeFullyQualifiedName === 'string') {
|
|
346
|
+
config.contentTypeFullyQualifiedName = untrustedConfig_contentTypeFullyQualifiedName;
|
|
347
|
+
}
|
|
348
|
+
var untrustedConfig_designConfigTarget = untrustedConfig.designConfigTarget;
|
|
349
|
+
if (typeof untrustedConfig_designConfigTarget === 'string') {
|
|
350
|
+
config.designConfigTarget = untrustedConfig_designConfigTarget;
|
|
351
|
+
}
|
|
352
|
+
var untrustedConfig_fullyQualifiedNames = untrustedConfig.fullyQualifiedNames;
|
|
353
|
+
if (ArrayIsArray$1(untrustedConfig_fullyQualifiedNames)) {
|
|
354
|
+
var untrustedConfig_fullyQualifiedNames_array = [];
|
|
355
|
+
for (var i = 0, arrayLength = untrustedConfig_fullyQualifiedNames.length; i < arrayLength; i++) {
|
|
356
|
+
var untrustedConfig_fullyQualifiedNames_item = untrustedConfig_fullyQualifiedNames[i];
|
|
357
|
+
if (typeof untrustedConfig_fullyQualifiedNames_item === 'string') {
|
|
358
|
+
untrustedConfig_fullyQualifiedNames_array.push(untrustedConfig_fullyQualifiedNames_item);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
config.fullyQualifiedNames = untrustedConfig_fullyQualifiedNames_array;
|
|
362
|
+
}
|
|
363
|
+
var untrustedConfig_language = untrustedConfig.language;
|
|
364
|
+
if (typeof untrustedConfig_language === 'string') {
|
|
365
|
+
config.language = untrustedConfig_language;
|
|
366
|
+
}
|
|
367
|
+
var untrustedConfig_mixinTypeFullyQualifiedNames = untrustedConfig.mixinTypeFullyQualifiedNames;
|
|
368
|
+
if (ArrayIsArray$1(untrustedConfig_mixinTypeFullyQualifiedNames)) {
|
|
369
|
+
var untrustedConfig_mixinTypeFullyQualifiedNames_array = [];
|
|
370
|
+
for (var i = 0, arrayLength = untrustedConfig_mixinTypeFullyQualifiedNames.length; i < arrayLength; i++) {
|
|
371
|
+
var untrustedConfig_mixinTypeFullyQualifiedNames_item = untrustedConfig_mixinTypeFullyQualifiedNames[i];
|
|
372
|
+
if (typeof untrustedConfig_mixinTypeFullyQualifiedNames_item === 'string') {
|
|
373
|
+
untrustedConfig_mixinTypeFullyQualifiedNames_array.push(untrustedConfig_mixinTypeFullyQualifiedNames_item);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
config.mixinTypeFullyQualifiedNames = untrustedConfig_mixinTypeFullyQualifiedNames_array;
|
|
377
|
+
}
|
|
378
|
+
var untrustedConfig_page = untrustedConfig.page;
|
|
379
|
+
if (typeof untrustedConfig_page === 'number' && Math.floor(untrustedConfig_page) === untrustedConfig_page) {
|
|
380
|
+
config.page = untrustedConfig_page;
|
|
381
|
+
}
|
|
382
|
+
var untrustedConfig_pageSize = untrustedConfig.pageSize;
|
|
383
|
+
if (typeof untrustedConfig_pageSize === 'number' && Math.floor(untrustedConfig_pageSize) === untrustedConfig_pageSize) {
|
|
384
|
+
config.pageSize = untrustedConfig_pageSize;
|
|
385
|
+
}
|
|
386
|
+
var untrustedConfig_renditionConfigTarget = untrustedConfig.renditionConfigTarget;
|
|
387
|
+
if (typeof untrustedConfig_renditionConfigTarget === 'string') {
|
|
388
|
+
config.renditionConfigTarget = untrustedConfig_renditionConfigTarget;
|
|
389
|
+
}
|
|
390
|
+
var untrustedConfig_typeClassFullyQualifiedNames = untrustedConfig.typeClassFullyQualifiedNames;
|
|
391
|
+
if (ArrayIsArray$1(untrustedConfig_typeClassFullyQualifiedNames)) {
|
|
392
|
+
var untrustedConfig_typeClassFullyQualifiedNames_array = [];
|
|
393
|
+
for (var i = 0, arrayLength = untrustedConfig_typeClassFullyQualifiedNames.length; i < arrayLength; i++) {
|
|
394
|
+
var untrustedConfig_typeClassFullyQualifiedNames_item = untrustedConfig_typeClassFullyQualifiedNames[i];
|
|
395
|
+
if (typeof untrustedConfig_typeClassFullyQualifiedNames_item === 'string') {
|
|
396
|
+
untrustedConfig_typeClassFullyQualifiedNames_array.push(untrustedConfig_typeClassFullyQualifiedNames_item);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
config.typeClassFullyQualifiedNames = untrustedConfig_typeClassFullyQualifiedNames_array;
|
|
400
|
+
}
|
|
401
|
+
return config;
|
|
402
|
+
}
|
|
403
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
404
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
405
|
+
return null;
|
|
406
|
+
}
|
|
407
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
408
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
409
|
+
}
|
|
410
|
+
var config = typeCheckConfig$5(untrustedConfig);
|
|
411
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
412
|
+
return null;
|
|
413
|
+
}
|
|
414
|
+
return config;
|
|
415
|
+
}
|
|
416
|
+
function adapterFragment$5(luvio, config) {
|
|
417
|
+
createResourceParams$5(config);
|
|
418
|
+
return select$a();
|
|
419
|
+
}
|
|
420
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
421
|
+
var snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
422
|
+
config: config,
|
|
423
|
+
resolve: function () { return buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions); }
|
|
424
|
+
});
|
|
425
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
426
|
+
}
|
|
427
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
428
|
+
var snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
429
|
+
config: config,
|
|
430
|
+
resolve: function () { return buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions); }
|
|
431
|
+
});
|
|
432
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
433
|
+
}
|
|
434
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
435
|
+
var resourceParams = createResourceParams$5(config);
|
|
436
|
+
var request = createResourceRequest$5(resourceParams);
|
|
437
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
438
|
+
.then(function (response) {
|
|
439
|
+
return luvio.handleSuccessResponse(function () { return onFetchResponseSuccess$5(luvio, config, resourceParams, response); }, function () { return getResponseCacheKeys$5(luvio, resourceParams, response.body); });
|
|
440
|
+
}, function (response) {
|
|
441
|
+
return luvio.handleErrorResponse(function () { return onFetchResponseError$5(luvio, config, resourceParams, response); });
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
445
|
+
var luvio = context.luvio, config = context.config;
|
|
446
|
+
var networkPriority = coercedAdapterRequestContext.networkPriority, requestCorrelator = coercedAdapterRequestContext.requestCorrelator, eventObservers = coercedAdapterRequestContext.eventObservers;
|
|
447
|
+
var dispatchOptions = {
|
|
448
|
+
resourceRequestContext: {
|
|
449
|
+
requestCorrelator: requestCorrelator,
|
|
450
|
+
luvioRequestMethod: undefined,
|
|
451
|
+
},
|
|
452
|
+
eventObservers: eventObservers
|
|
453
|
+
};
|
|
454
|
+
if (networkPriority !== 'normal') {
|
|
455
|
+
dispatchOptions.overrides = {
|
|
456
|
+
priority: networkPriority
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
return buildNetworkSnapshot$5(luvio, config, dispatchOptions);
|
|
460
|
+
}
|
|
461
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
462
|
+
var luvio = context.luvio, config = context.config;
|
|
463
|
+
var selector = {
|
|
464
|
+
recordId: keyBuilder$a(luvio, config),
|
|
465
|
+
node: adapterFragment$5(luvio, config),
|
|
466
|
+
variables: {},
|
|
467
|
+
};
|
|
468
|
+
var cacheSnapshot = storeLookup(selector, {
|
|
469
|
+
config: config,
|
|
470
|
+
resolve: function () { return buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions); }
|
|
471
|
+
});
|
|
472
|
+
return cacheSnapshot;
|
|
473
|
+
}
|
|
474
|
+
var getBlockTypesAdapterFactory = function (luvio) { return function ExperienceType__getBlockTypes(untrustedConfig, requestContext) {
|
|
475
|
+
var config = validateAdapterConfig$5(untrustedConfig, getBlockTypes_ConfigPropertyNames);
|
|
476
|
+
// Invalid or incomplete config
|
|
477
|
+
if (config === null) {
|
|
478
|
+
return null;
|
|
479
|
+
}
|
|
480
|
+
return luvio.applyCachePolicy((requestContext || {}), { config: config, luvio: luvio }, // BuildSnapshotContext
|
|
481
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
482
|
+
}; };
|
|
483
|
+
|
|
484
|
+
var TTL$4 = 3600000;
|
|
485
|
+
var VERSION$4 = "5a3f5e1d42d8f0aa089e888ddac06972";
|
|
486
|
+
function validate$6(obj, path) {
|
|
487
|
+
if (path === void 0) { path = 'ExperienceModelBlockTypeDetailRepresentation'; }
|
|
488
|
+
var v_error = (function () {
|
|
489
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
490
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
491
|
+
}
|
|
492
|
+
if (obj.description !== undefined) {
|
|
493
|
+
var obj_description = obj.description;
|
|
494
|
+
var path_description = path + '.description';
|
|
495
|
+
if (typeof obj_description !== 'string') {
|
|
496
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
if (obj.designConfig !== undefined) {
|
|
500
|
+
var obj_designConfig = obj.designConfig;
|
|
501
|
+
var path_designConfig = path + '.designConfig';
|
|
502
|
+
if (typeof obj_designConfig !== 'object' || ArrayIsArray(obj_designConfig) || obj_designConfig === null) {
|
|
503
|
+
return new TypeError('Expected "object" but received "' + typeof obj_designConfig + '" (at "' + path_designConfig + '")');
|
|
504
|
+
}
|
|
505
|
+
var obj_designConfig_keys = ObjectKeys(obj_designConfig);
|
|
506
|
+
for (var i = 0; i < obj_designConfig_keys.length; i++) {
|
|
507
|
+
var key = obj_designConfig_keys[i];
|
|
508
|
+
var obj_designConfig_prop = obj_designConfig[key];
|
|
509
|
+
var path_designConfig_prop = path_designConfig + '["' + key + '"]';
|
|
510
|
+
if (obj_designConfig_prop === undefined) {
|
|
511
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_designConfig_prop + '" (at "' + path_designConfig_prop + '")');
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
var obj_developerName = obj.developerName;
|
|
516
|
+
var path_developerName = path + '.developerName';
|
|
517
|
+
if (typeof obj_developerName !== 'string') {
|
|
518
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
519
|
+
}
|
|
520
|
+
if (obj.id !== undefined) {
|
|
521
|
+
var obj_id = obj.id;
|
|
522
|
+
var path_id = path + '.id';
|
|
523
|
+
if (typeof obj_id !== 'string') {
|
|
524
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
var obj_namespacePrefix = obj.namespacePrefix;
|
|
528
|
+
var path_namespacePrefix = path + '.namespacePrefix';
|
|
529
|
+
if (typeof obj_namespacePrefix !== 'string') {
|
|
530
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespacePrefix + '" (at "' + path_namespacePrefix + '")');
|
|
531
|
+
}
|
|
532
|
+
if (obj.renditionConfig !== undefined) {
|
|
533
|
+
var obj_renditionConfig = obj.renditionConfig;
|
|
534
|
+
var path_renditionConfig = path + '.renditionConfig';
|
|
535
|
+
if (typeof obj_renditionConfig !== 'object' || ArrayIsArray(obj_renditionConfig) || obj_renditionConfig === null) {
|
|
536
|
+
return new TypeError('Expected "object" but received "' + typeof obj_renditionConfig + '" (at "' + path_renditionConfig + '")');
|
|
537
|
+
}
|
|
538
|
+
var obj_renditionConfig_keys = ObjectKeys(obj_renditionConfig);
|
|
539
|
+
for (var i = 0; i < obj_renditionConfig_keys.length; i++) {
|
|
540
|
+
var key = obj_renditionConfig_keys[i];
|
|
541
|
+
var obj_renditionConfig_prop = obj_renditionConfig[key];
|
|
542
|
+
var path_renditionConfig_prop = path_renditionConfig + '["' + key + '"]';
|
|
543
|
+
if (obj_renditionConfig_prop === undefined) {
|
|
544
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_renditionConfig_prop + '" (at "' + path_renditionConfig_prop + '")');
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
var obj_schema = obj.schema;
|
|
549
|
+
var path_schema = path + '.schema';
|
|
550
|
+
if (typeof obj_schema !== 'object' || ArrayIsArray(obj_schema) || obj_schema === null) {
|
|
551
|
+
return new TypeError('Expected "object" but received "' + typeof obj_schema + '" (at "' + path_schema + '")');
|
|
552
|
+
}
|
|
553
|
+
var obj_schema_keys = ObjectKeys(obj_schema);
|
|
554
|
+
for (var i = 0; i < obj_schema_keys.length; i++) {
|
|
555
|
+
var key = obj_schema_keys[i];
|
|
556
|
+
var obj_schema_prop = obj_schema[key];
|
|
557
|
+
var path_schema_prop = path_schema + '["' + key + '"]';
|
|
558
|
+
if (obj_schema_prop === undefined) {
|
|
559
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_schema_prop + '" (at "' + path_schema_prop + '")');
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
if (obj.title !== undefined) {
|
|
563
|
+
var obj_title = obj.title;
|
|
564
|
+
var path_title = path + '.title';
|
|
565
|
+
if (typeof obj_title !== 'string') {
|
|
566
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
})();
|
|
570
|
+
return v_error === undefined ? null : v_error;
|
|
571
|
+
}
|
|
572
|
+
var RepresentationType$4 = 'ExperienceModelBlockTypeDetailRepresentation';
|
|
573
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
574
|
+
return input;
|
|
575
|
+
}
|
|
576
|
+
var select$9 = function ExperienceModelBlockTypeDetailRepresentationSelect() {
|
|
577
|
+
return {
|
|
578
|
+
kind: 'Fragment',
|
|
579
|
+
version: VERSION$4,
|
|
580
|
+
private: [],
|
|
581
|
+
opaque: true
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
function equals$4(existing, incoming) {
|
|
585
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
586
|
+
return false;
|
|
587
|
+
}
|
|
588
|
+
return true;
|
|
589
|
+
}
|
|
590
|
+
function deepFreeze$6(input) {
|
|
591
|
+
var input_designConfig = input.designConfig;
|
|
592
|
+
if (input_designConfig !== undefined) {
|
|
593
|
+
var input_designConfig_keys = Object.keys(input_designConfig);
|
|
594
|
+
var input_designConfig_length = input_designConfig_keys.length;
|
|
595
|
+
for (var i = 0; i < input_designConfig_length; i++) {
|
|
596
|
+
var key = input_designConfig_keys[i];
|
|
597
|
+
var input_designConfig_prop = input_designConfig[key];
|
|
598
|
+
deepFreeze$9(input_designConfig_prop);
|
|
599
|
+
}
|
|
600
|
+
ObjectFreeze(input_designConfig);
|
|
601
|
+
}
|
|
602
|
+
var input_renditionConfig = input.renditionConfig;
|
|
603
|
+
if (input_renditionConfig !== undefined) {
|
|
604
|
+
var input_renditionConfig_keys = Object.keys(input_renditionConfig);
|
|
605
|
+
var input_renditionConfig_length = input_renditionConfig_keys.length;
|
|
606
|
+
for (var i = 0; i < input_renditionConfig_length; i++) {
|
|
607
|
+
var key = input_renditionConfig_keys[i];
|
|
608
|
+
var input_renditionConfig_prop = input_renditionConfig[key];
|
|
609
|
+
deepFreeze$9(input_renditionConfig_prop);
|
|
610
|
+
}
|
|
611
|
+
ObjectFreeze(input_renditionConfig);
|
|
612
|
+
}
|
|
613
|
+
var input_schema = input.schema;
|
|
614
|
+
var input_schema_keys = Object.keys(input_schema);
|
|
615
|
+
var input_schema_length = input_schema_keys.length;
|
|
616
|
+
for (var i = 0; i < input_schema_length; i++) {
|
|
617
|
+
var key = input_schema_keys[i];
|
|
618
|
+
var input_schema_prop = input_schema[key];
|
|
619
|
+
deepFreeze$9(input_schema_prop);
|
|
620
|
+
}
|
|
621
|
+
ObjectFreeze(input_schema);
|
|
622
|
+
ObjectFreeze(input);
|
|
623
|
+
}
|
|
624
|
+
var ingest$4 = function ExperienceModelBlockTypeDetailRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
625
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
626
|
+
var validateError = validate$6(input);
|
|
627
|
+
if (validateError !== null) {
|
|
628
|
+
throw validateError;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
var key = path.fullPath;
|
|
632
|
+
var existingRecord = store.readEntry(key);
|
|
633
|
+
var ttlToUse = TTL$4;
|
|
634
|
+
var incomingRecord = normalize$4(input, store.readEntry(key), {
|
|
635
|
+
fullPath: key,
|
|
636
|
+
parent: path.parent,
|
|
637
|
+
propertyName: path.propertyName,
|
|
638
|
+
ttl: ttlToUse
|
|
639
|
+
});
|
|
640
|
+
deepFreeze$6(input);
|
|
641
|
+
if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
|
|
642
|
+
luvio.storePublish(key, incomingRecord);
|
|
643
|
+
}
|
|
644
|
+
{
|
|
645
|
+
var storeMetadataParams = {
|
|
646
|
+
ttl: ttlToUse,
|
|
647
|
+
namespace: "ExperienceType",
|
|
648
|
+
version: VERSION$4,
|
|
649
|
+
representationName: RepresentationType$4,
|
|
650
|
+
};
|
|
651
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
652
|
+
}
|
|
653
|
+
return createLink(key);
|
|
654
|
+
};
|
|
655
|
+
function getTypeCacheKeys$4(luvio, input, fullPathFactory) {
|
|
656
|
+
var rootKeySet = new engine.StoreKeyMap();
|
|
657
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
658
|
+
var rootKey = fullPathFactory();
|
|
659
|
+
rootKeySet.set(rootKey, {
|
|
660
|
+
namespace: keyPrefix,
|
|
661
|
+
representationName: RepresentationType$4,
|
|
662
|
+
mergeable: false
|
|
663
|
+
});
|
|
664
|
+
return rootKeySet;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
function select$8(luvio, params) {
|
|
668
|
+
return select$9();
|
|
669
|
+
}
|
|
670
|
+
function keyBuilder$9(luvio, params) {
|
|
671
|
+
return keyPrefix + '::ExperienceModelBlockTypeDetailRepresentation:(' + 'designConfigTarget:' + params.queryParams.designConfigTarget + ',' + 'includeSubSchemaDefinitions:' + params.queryParams.includeSubSchemaDefinitions + ',' + 'language:' + params.queryParams.language + ',' + 'renditionConfigTarget:' + params.queryParams.renditionConfigTarget + ',' + 'fullyQualifiedName:' + params.urlParams.fullyQualifiedName + ')';
|
|
672
|
+
}
|
|
673
|
+
function getResponseCacheKeys$4(luvio, resourceParams, response) {
|
|
674
|
+
return getTypeCacheKeys$4(luvio, response, function () { return keyBuilder$9(luvio, resourceParams); });
|
|
675
|
+
}
|
|
676
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
677
|
+
var body = response.body;
|
|
678
|
+
var key = keyBuilder$9(luvio, resourceParams);
|
|
679
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
680
|
+
var snapshot = luvio.storeLookup({
|
|
681
|
+
recordId: key,
|
|
682
|
+
node: select$8(),
|
|
683
|
+
variables: {},
|
|
684
|
+
}, snapshotRefresh);
|
|
685
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
686
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
687
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
return snapshot;
|
|
691
|
+
}
|
|
692
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
693
|
+
var key = keyBuilder$9(luvio, params);
|
|
694
|
+
var errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
695
|
+
var storeMetadataParams = {
|
|
696
|
+
ttl: TTL$4,
|
|
697
|
+
namespace: keyPrefix,
|
|
698
|
+
version: VERSION$4,
|
|
699
|
+
representationName: RepresentationType$4
|
|
700
|
+
};
|
|
701
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
702
|
+
return errorSnapshot;
|
|
703
|
+
}
|
|
704
|
+
function createResourceRequest$4(config) {
|
|
705
|
+
var headers = {};
|
|
706
|
+
return {
|
|
707
|
+
baseUri: '/services/data/v58.0',
|
|
708
|
+
basePath: '/connect/experience-model/block-types/' + config.urlParams.fullyQualifiedName + '',
|
|
709
|
+
method: 'get',
|
|
710
|
+
body: null,
|
|
711
|
+
urlParams: config.urlParams,
|
|
712
|
+
queryParams: config.queryParams,
|
|
713
|
+
headers: headers,
|
|
714
|
+
priority: 'normal',
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
var getBlockType_ConfigPropertyNames = {
|
|
719
|
+
displayName: 'getBlockType',
|
|
720
|
+
parameters: {
|
|
721
|
+
required: ['fullyQualifiedName'],
|
|
722
|
+
optional: ['designConfigTarget', 'includeSubSchemaDefinitions', 'language', 'renditionConfigTarget']
|
|
723
|
+
}
|
|
724
|
+
};
|
|
725
|
+
function createResourceParams$4(config) {
|
|
726
|
+
var resourceParams = {
|
|
727
|
+
urlParams: {
|
|
728
|
+
fullyQualifiedName: config.fullyQualifiedName
|
|
729
|
+
},
|
|
730
|
+
queryParams: {
|
|
731
|
+
designConfigTarget: config.designConfigTarget, includeSubSchemaDefinitions: config.includeSubSchemaDefinitions, language: config.language, renditionConfigTarget: config.renditionConfigTarget
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
return resourceParams;
|
|
735
|
+
}
|
|
736
|
+
function keyBuilder$8(luvio, config) {
|
|
737
|
+
var resourceParams = createResourceParams$4(config);
|
|
738
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
739
|
+
}
|
|
740
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
741
|
+
var config = {};
|
|
742
|
+
var untrustedConfig_fullyQualifiedName = untrustedConfig.fullyQualifiedName;
|
|
743
|
+
if (typeof untrustedConfig_fullyQualifiedName === 'string') {
|
|
744
|
+
config.fullyQualifiedName = untrustedConfig_fullyQualifiedName;
|
|
745
|
+
}
|
|
746
|
+
var untrustedConfig_designConfigTarget = untrustedConfig.designConfigTarget;
|
|
747
|
+
if (typeof untrustedConfig_designConfigTarget === 'string') {
|
|
748
|
+
config.designConfigTarget = untrustedConfig_designConfigTarget;
|
|
749
|
+
}
|
|
750
|
+
var untrustedConfig_includeSubSchemaDefinitions = untrustedConfig.includeSubSchemaDefinitions;
|
|
751
|
+
if (typeof untrustedConfig_includeSubSchemaDefinitions === 'boolean') {
|
|
752
|
+
config.includeSubSchemaDefinitions = untrustedConfig_includeSubSchemaDefinitions;
|
|
753
|
+
}
|
|
754
|
+
var untrustedConfig_language = untrustedConfig.language;
|
|
755
|
+
if (typeof untrustedConfig_language === 'string') {
|
|
756
|
+
config.language = untrustedConfig_language;
|
|
757
|
+
}
|
|
758
|
+
var untrustedConfig_renditionConfigTarget = untrustedConfig.renditionConfigTarget;
|
|
759
|
+
if (typeof untrustedConfig_renditionConfigTarget === 'string') {
|
|
760
|
+
config.renditionConfigTarget = untrustedConfig_renditionConfigTarget;
|
|
761
|
+
}
|
|
762
|
+
return config;
|
|
763
|
+
}
|
|
764
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
765
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
766
|
+
return null;
|
|
767
|
+
}
|
|
768
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
769
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
770
|
+
}
|
|
771
|
+
var config = typeCheckConfig$4(untrustedConfig);
|
|
772
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
773
|
+
return null;
|
|
774
|
+
}
|
|
775
|
+
return config;
|
|
776
|
+
}
|
|
777
|
+
function adapterFragment$4(luvio, config) {
|
|
778
|
+
createResourceParams$4(config);
|
|
779
|
+
return select$8();
|
|
780
|
+
}
|
|
781
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
782
|
+
var snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
783
|
+
config: config,
|
|
784
|
+
resolve: function () { return buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions); }
|
|
785
|
+
});
|
|
786
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
787
|
+
}
|
|
788
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
789
|
+
var snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
790
|
+
config: config,
|
|
791
|
+
resolve: function () { return buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions); }
|
|
792
|
+
});
|
|
793
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
794
|
+
}
|
|
795
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
796
|
+
var resourceParams = createResourceParams$4(config);
|
|
797
|
+
var request = createResourceRequest$4(resourceParams);
|
|
798
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
799
|
+
.then(function (response) {
|
|
800
|
+
return luvio.handleSuccessResponse(function () { return onFetchResponseSuccess$4(luvio, config, resourceParams, response); }, function () { return getResponseCacheKeys$4(luvio, resourceParams, response.body); });
|
|
801
|
+
}, function (response) {
|
|
802
|
+
return luvio.handleErrorResponse(function () { return onFetchResponseError$4(luvio, config, resourceParams, response); });
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
806
|
+
var luvio = context.luvio, config = context.config;
|
|
807
|
+
var networkPriority = coercedAdapterRequestContext.networkPriority, requestCorrelator = coercedAdapterRequestContext.requestCorrelator, eventObservers = coercedAdapterRequestContext.eventObservers;
|
|
808
|
+
var dispatchOptions = {
|
|
809
|
+
resourceRequestContext: {
|
|
810
|
+
requestCorrelator: requestCorrelator,
|
|
811
|
+
luvioRequestMethod: undefined,
|
|
812
|
+
},
|
|
813
|
+
eventObservers: eventObservers
|
|
814
|
+
};
|
|
815
|
+
if (networkPriority !== 'normal') {
|
|
816
|
+
dispatchOptions.overrides = {
|
|
817
|
+
priority: networkPriority
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
return buildNetworkSnapshot$4(luvio, config, dispatchOptions);
|
|
821
|
+
}
|
|
822
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
823
|
+
var luvio = context.luvio, config = context.config;
|
|
824
|
+
var selector = {
|
|
825
|
+
recordId: keyBuilder$8(luvio, config),
|
|
826
|
+
node: adapterFragment$4(luvio, config),
|
|
827
|
+
variables: {},
|
|
828
|
+
};
|
|
829
|
+
var cacheSnapshot = storeLookup(selector, {
|
|
830
|
+
config: config,
|
|
831
|
+
resolve: function () { return buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions); }
|
|
832
|
+
});
|
|
833
|
+
return cacheSnapshot;
|
|
834
|
+
}
|
|
835
|
+
var getBlockTypeAdapterFactory = function (luvio) { return function ExperienceType__getBlockType(untrustedConfig, requestContext) {
|
|
836
|
+
var config = validateAdapterConfig$4(untrustedConfig, getBlockType_ConfigPropertyNames);
|
|
837
|
+
// Invalid or incomplete config
|
|
838
|
+
if (config === null) {
|
|
839
|
+
return null;
|
|
840
|
+
}
|
|
841
|
+
return luvio.applyCachePolicy((requestContext || {}), { config: config, luvio: luvio }, // BuildSnapshotContext
|
|
842
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
843
|
+
}; };
|
|
844
|
+
|
|
845
|
+
function validate$5(obj, path) {
|
|
846
|
+
if (path === void 0) { path = 'ExperienceModelContentTypeSummaryRepresentation'; }
|
|
847
|
+
var v_error = (function () {
|
|
848
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
849
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
850
|
+
}
|
|
851
|
+
if (obj.description !== undefined) {
|
|
852
|
+
var obj_description = obj.description;
|
|
853
|
+
var path_description = path + '.description';
|
|
854
|
+
if (typeof obj_description !== 'string') {
|
|
855
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
var obj_detailUrl = obj.detailUrl;
|
|
859
|
+
var path_detailUrl = path + '.detailUrl';
|
|
860
|
+
if (typeof obj_detailUrl !== 'string') {
|
|
861
|
+
return new TypeError('Expected "string" but received "' + typeof obj_detailUrl + '" (at "' + path_detailUrl + '")');
|
|
862
|
+
}
|
|
863
|
+
var obj_developerName = obj.developerName;
|
|
864
|
+
var path_developerName = path + '.developerName';
|
|
865
|
+
if (typeof obj_developerName !== 'string') {
|
|
866
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
867
|
+
}
|
|
868
|
+
if (obj.id !== undefined) {
|
|
869
|
+
var obj_id = obj.id;
|
|
870
|
+
var path_id = path + '.id';
|
|
871
|
+
if (typeof obj_id !== 'string') {
|
|
872
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
if (obj.namespacePrefix !== undefined) {
|
|
876
|
+
var obj_namespacePrefix = obj.namespacePrefix;
|
|
877
|
+
var path_namespacePrefix = path + '.namespacePrefix';
|
|
878
|
+
if (typeof obj_namespacePrefix !== 'string') {
|
|
879
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespacePrefix + '" (at "' + path_namespacePrefix + '")');
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
if (obj.title !== undefined) {
|
|
883
|
+
var obj_title = obj.title;
|
|
884
|
+
var path_title = path + '.title';
|
|
885
|
+
if (typeof obj_title !== 'string') {
|
|
886
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
})();
|
|
890
|
+
return v_error === undefined ? null : v_error;
|
|
891
|
+
}
|
|
892
|
+
function deepFreeze$5(input) {
|
|
893
|
+
ObjectFreeze(input);
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
var TTL$3 = 3600000;
|
|
897
|
+
var VERSION$3 = "30f1f19149230f10ac9197e0d9769c88";
|
|
898
|
+
function validate$4(obj, path) {
|
|
899
|
+
if (path === void 0) { path = 'ExperienceModelContentTypeCollectionRepresentation'; }
|
|
900
|
+
var v_error = (function () {
|
|
901
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
902
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
903
|
+
}
|
|
904
|
+
var obj_contentTypes = obj.contentTypes;
|
|
905
|
+
var path_contentTypes = path + '.contentTypes';
|
|
906
|
+
if (!ArrayIsArray(obj_contentTypes)) {
|
|
907
|
+
return new TypeError('Expected "array" but received "' + typeof obj_contentTypes + '" (at "' + path_contentTypes + '")');
|
|
908
|
+
}
|
|
909
|
+
for (var i = 0; i < obj_contentTypes.length; i++) {
|
|
910
|
+
var obj_contentTypes_item = obj_contentTypes[i];
|
|
911
|
+
var path_contentTypes_item = path_contentTypes + '[' + i + ']';
|
|
912
|
+
var referencepath_contentTypes_itemValidationError = validate$5(obj_contentTypes_item, path_contentTypes_item);
|
|
913
|
+
if (referencepath_contentTypes_itemValidationError !== null) {
|
|
914
|
+
var message = 'Object doesn\'t match ExperienceModelContentTypeSummaryRepresentation (at "' + path_contentTypes_item + '")\n';
|
|
915
|
+
message += referencepath_contentTypes_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
916
|
+
return new TypeError(message);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
var obj_count = obj.count;
|
|
920
|
+
var path_count = path + '.count';
|
|
921
|
+
if (typeof obj_count !== 'number' || (typeof obj_count === 'number' && Math.floor(obj_count) !== obj_count)) {
|
|
922
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
923
|
+
}
|
|
924
|
+
if (obj.currentPageUrl !== undefined) {
|
|
925
|
+
var obj_currentPageUrl = obj.currentPageUrl;
|
|
926
|
+
var path_currentPageUrl = path + '.currentPageUrl';
|
|
927
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
928
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
if (obj.nextPageUrl !== undefined) {
|
|
932
|
+
var obj_nextPageUrl = obj.nextPageUrl;
|
|
933
|
+
var path_nextPageUrl = path + '.nextPageUrl';
|
|
934
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
935
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
if (obj.previousPageUrl !== undefined) {
|
|
939
|
+
var obj_previousPageUrl = obj.previousPageUrl;
|
|
940
|
+
var path_previousPageUrl = path + '.previousPageUrl';
|
|
941
|
+
if (typeof obj_previousPageUrl !== 'string') {
|
|
942
|
+
return new TypeError('Expected "string" but received "' + typeof obj_previousPageUrl + '" (at "' + path_previousPageUrl + '")');
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
})();
|
|
946
|
+
return v_error === undefined ? null : v_error;
|
|
947
|
+
}
|
|
948
|
+
var RepresentationType$3 = 'ExperienceModelContentTypeCollectionRepresentation';
|
|
949
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
950
|
+
return input;
|
|
951
|
+
}
|
|
952
|
+
var select$7 = function ExperienceModelContentTypeCollectionRepresentationSelect() {
|
|
953
|
+
return {
|
|
954
|
+
kind: 'Fragment',
|
|
955
|
+
version: VERSION$3,
|
|
956
|
+
private: [],
|
|
957
|
+
opaque: true
|
|
958
|
+
};
|
|
959
|
+
};
|
|
960
|
+
function equals$3(existing, incoming) {
|
|
961
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
962
|
+
return false;
|
|
963
|
+
}
|
|
964
|
+
return true;
|
|
965
|
+
}
|
|
966
|
+
function deepFreeze$4(input) {
|
|
967
|
+
var input_contentTypes = input.contentTypes;
|
|
968
|
+
for (var i = 0; i < input_contentTypes.length; i++) {
|
|
969
|
+
var input_contentTypes_item = input_contentTypes[i];
|
|
970
|
+
deepFreeze$5(input_contentTypes_item);
|
|
971
|
+
}
|
|
972
|
+
ObjectFreeze(input_contentTypes);
|
|
973
|
+
ObjectFreeze(input);
|
|
974
|
+
}
|
|
975
|
+
var ingest$3 = function ExperienceModelContentTypeCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
976
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
977
|
+
var validateError = validate$4(input);
|
|
978
|
+
if (validateError !== null) {
|
|
979
|
+
throw validateError;
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
var key = path.fullPath;
|
|
983
|
+
var existingRecord = store.readEntry(key);
|
|
984
|
+
var ttlToUse = TTL$3;
|
|
985
|
+
var incomingRecord = normalize$3(input, store.readEntry(key), {
|
|
986
|
+
fullPath: key,
|
|
987
|
+
parent: path.parent,
|
|
988
|
+
propertyName: path.propertyName,
|
|
989
|
+
ttl: ttlToUse
|
|
990
|
+
});
|
|
991
|
+
deepFreeze$4(input);
|
|
992
|
+
if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
|
|
993
|
+
luvio.storePublish(key, incomingRecord);
|
|
994
|
+
}
|
|
995
|
+
{
|
|
996
|
+
var storeMetadataParams = {
|
|
997
|
+
ttl: ttlToUse,
|
|
998
|
+
namespace: "ExperienceType",
|
|
999
|
+
version: VERSION$3,
|
|
1000
|
+
representationName: RepresentationType$3,
|
|
1001
|
+
};
|
|
1002
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1003
|
+
}
|
|
1004
|
+
return createLink(key);
|
|
1005
|
+
};
|
|
1006
|
+
function getTypeCacheKeys$3(luvio, input, fullPathFactory) {
|
|
1007
|
+
var rootKeySet = new engine.StoreKeyMap();
|
|
1008
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1009
|
+
var rootKey = fullPathFactory();
|
|
1010
|
+
rootKeySet.set(rootKey, {
|
|
1011
|
+
namespace: keyPrefix,
|
|
1012
|
+
representationName: RepresentationType$3,
|
|
1013
|
+
mergeable: false
|
|
1014
|
+
});
|
|
1015
|
+
return rootKeySet;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
function select$6(luvio, params) {
|
|
1019
|
+
return select$7();
|
|
1020
|
+
}
|
|
1021
|
+
function keyBuilder$7(luvio, params) {
|
|
1022
|
+
return keyPrefix + '::ExperienceModelContentTypeCollectionRepresentation:(' + 'contextRecordId:' + params.queryParams.contextRecordId + ',' + 'designConfigTarget:' + params.queryParams.designConfigTarget + ',' + 'fullyQualifiedNames:' + params.queryParams.fullyQualifiedNames + ',' + 'language:' + params.queryParams.language + ',' + 'mixinTypeFullyQualifiedNames:' + params.queryParams.mixinTypeFullyQualifiedNames + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'renditionConfigTarget:' + params.queryParams.renditionConfigTarget + ',' + 'typeClassFullyQualifiedNames:' + params.queryParams.typeClassFullyQualifiedNames + ')';
|
|
1023
|
+
}
|
|
1024
|
+
function getResponseCacheKeys$3(luvio, resourceParams, response) {
|
|
1025
|
+
return getTypeCacheKeys$3(luvio, response, function () { return keyBuilder$7(luvio, resourceParams); });
|
|
1026
|
+
}
|
|
1027
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
1028
|
+
var body = response.body;
|
|
1029
|
+
var key = keyBuilder$7(luvio, resourceParams);
|
|
1030
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1031
|
+
var snapshot = luvio.storeLookup({
|
|
1032
|
+
recordId: key,
|
|
1033
|
+
node: select$6(),
|
|
1034
|
+
variables: {},
|
|
1035
|
+
}, snapshotRefresh);
|
|
1036
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1037
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1038
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
return snapshot;
|
|
1042
|
+
}
|
|
1043
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
1044
|
+
var key = keyBuilder$7(luvio, params);
|
|
1045
|
+
var errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1046
|
+
var storeMetadataParams = {
|
|
1047
|
+
ttl: TTL$3,
|
|
1048
|
+
namespace: keyPrefix,
|
|
1049
|
+
version: VERSION$3,
|
|
1050
|
+
representationName: RepresentationType$3
|
|
1051
|
+
};
|
|
1052
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1053
|
+
return errorSnapshot;
|
|
1054
|
+
}
|
|
1055
|
+
function createResourceRequest$3(config) {
|
|
1056
|
+
var headers = {};
|
|
1057
|
+
return {
|
|
1058
|
+
baseUri: '/services/data/v58.0',
|
|
1059
|
+
basePath: '/connect/experience-model/content-types',
|
|
1060
|
+
method: 'get',
|
|
1061
|
+
body: null,
|
|
1062
|
+
urlParams: {},
|
|
1063
|
+
queryParams: config.queryParams,
|
|
1064
|
+
headers: headers,
|
|
1065
|
+
priority: 'normal',
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
var getContentTypes_ConfigPropertyNames = {
|
|
1070
|
+
displayName: 'getContentTypes',
|
|
1071
|
+
parameters: {
|
|
1072
|
+
required: [],
|
|
1073
|
+
optional: ['contextRecordId', 'designConfigTarget', 'fullyQualifiedNames', 'language', 'mixinTypeFullyQualifiedNames', 'page', 'pageSize', 'renditionConfigTarget', 'typeClassFullyQualifiedNames']
|
|
1074
|
+
}
|
|
1075
|
+
};
|
|
1076
|
+
function createResourceParams$3(config) {
|
|
1077
|
+
var resourceParams = {
|
|
1078
|
+
queryParams: {
|
|
1079
|
+
contextRecordId: config.contextRecordId, designConfigTarget: config.designConfigTarget, fullyQualifiedNames: config.fullyQualifiedNames, language: config.language, mixinTypeFullyQualifiedNames: config.mixinTypeFullyQualifiedNames, page: config.page, pageSize: config.pageSize, renditionConfigTarget: config.renditionConfigTarget, typeClassFullyQualifiedNames: config.typeClassFullyQualifiedNames
|
|
1080
|
+
}
|
|
1081
|
+
};
|
|
1082
|
+
return resourceParams;
|
|
1083
|
+
}
|
|
1084
|
+
function keyBuilder$6(luvio, config) {
|
|
1085
|
+
var resourceParams = createResourceParams$3(config);
|
|
1086
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
1087
|
+
}
|
|
1088
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1089
|
+
var config = {};
|
|
1090
|
+
var untrustedConfig_contextRecordId = untrustedConfig.contextRecordId;
|
|
1091
|
+
if (typeof untrustedConfig_contextRecordId === 'string') {
|
|
1092
|
+
config.contextRecordId = untrustedConfig_contextRecordId;
|
|
1093
|
+
}
|
|
1094
|
+
var untrustedConfig_designConfigTarget = untrustedConfig.designConfigTarget;
|
|
1095
|
+
if (typeof untrustedConfig_designConfigTarget === 'string') {
|
|
1096
|
+
config.designConfigTarget = untrustedConfig_designConfigTarget;
|
|
1097
|
+
}
|
|
1098
|
+
var untrustedConfig_fullyQualifiedNames = untrustedConfig.fullyQualifiedNames;
|
|
1099
|
+
if (ArrayIsArray$1(untrustedConfig_fullyQualifiedNames)) {
|
|
1100
|
+
var untrustedConfig_fullyQualifiedNames_array = [];
|
|
1101
|
+
for (var i = 0, arrayLength = untrustedConfig_fullyQualifiedNames.length; i < arrayLength; i++) {
|
|
1102
|
+
var untrustedConfig_fullyQualifiedNames_item = untrustedConfig_fullyQualifiedNames[i];
|
|
1103
|
+
if (typeof untrustedConfig_fullyQualifiedNames_item === 'string') {
|
|
1104
|
+
untrustedConfig_fullyQualifiedNames_array.push(untrustedConfig_fullyQualifiedNames_item);
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
config.fullyQualifiedNames = untrustedConfig_fullyQualifiedNames_array;
|
|
1108
|
+
}
|
|
1109
|
+
var untrustedConfig_language = untrustedConfig.language;
|
|
1110
|
+
if (typeof untrustedConfig_language === 'string') {
|
|
1111
|
+
config.language = untrustedConfig_language;
|
|
1112
|
+
}
|
|
1113
|
+
var untrustedConfig_mixinTypeFullyQualifiedNames = untrustedConfig.mixinTypeFullyQualifiedNames;
|
|
1114
|
+
if (ArrayIsArray$1(untrustedConfig_mixinTypeFullyQualifiedNames)) {
|
|
1115
|
+
var untrustedConfig_mixinTypeFullyQualifiedNames_array = [];
|
|
1116
|
+
for (var i = 0, arrayLength = untrustedConfig_mixinTypeFullyQualifiedNames.length; i < arrayLength; i++) {
|
|
1117
|
+
var untrustedConfig_mixinTypeFullyQualifiedNames_item = untrustedConfig_mixinTypeFullyQualifiedNames[i];
|
|
1118
|
+
if (typeof untrustedConfig_mixinTypeFullyQualifiedNames_item === 'string') {
|
|
1119
|
+
untrustedConfig_mixinTypeFullyQualifiedNames_array.push(untrustedConfig_mixinTypeFullyQualifiedNames_item);
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
config.mixinTypeFullyQualifiedNames = untrustedConfig_mixinTypeFullyQualifiedNames_array;
|
|
1123
|
+
}
|
|
1124
|
+
var untrustedConfig_page = untrustedConfig.page;
|
|
1125
|
+
if (typeof untrustedConfig_page === 'number' && Math.floor(untrustedConfig_page) === untrustedConfig_page) {
|
|
1126
|
+
config.page = untrustedConfig_page;
|
|
1127
|
+
}
|
|
1128
|
+
var untrustedConfig_pageSize = untrustedConfig.pageSize;
|
|
1129
|
+
if (typeof untrustedConfig_pageSize === 'number' && Math.floor(untrustedConfig_pageSize) === untrustedConfig_pageSize) {
|
|
1130
|
+
config.pageSize = untrustedConfig_pageSize;
|
|
1131
|
+
}
|
|
1132
|
+
var untrustedConfig_renditionConfigTarget = untrustedConfig.renditionConfigTarget;
|
|
1133
|
+
if (typeof untrustedConfig_renditionConfigTarget === 'string') {
|
|
1134
|
+
config.renditionConfigTarget = untrustedConfig_renditionConfigTarget;
|
|
1135
|
+
}
|
|
1136
|
+
var untrustedConfig_typeClassFullyQualifiedNames = untrustedConfig.typeClassFullyQualifiedNames;
|
|
1137
|
+
if (ArrayIsArray$1(untrustedConfig_typeClassFullyQualifiedNames)) {
|
|
1138
|
+
var untrustedConfig_typeClassFullyQualifiedNames_array = [];
|
|
1139
|
+
for (var i = 0, arrayLength = untrustedConfig_typeClassFullyQualifiedNames.length; i < arrayLength; i++) {
|
|
1140
|
+
var untrustedConfig_typeClassFullyQualifiedNames_item = untrustedConfig_typeClassFullyQualifiedNames[i];
|
|
1141
|
+
if (typeof untrustedConfig_typeClassFullyQualifiedNames_item === 'string') {
|
|
1142
|
+
untrustedConfig_typeClassFullyQualifiedNames_array.push(untrustedConfig_typeClassFullyQualifiedNames_item);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
config.typeClassFullyQualifiedNames = untrustedConfig_typeClassFullyQualifiedNames_array;
|
|
1146
|
+
}
|
|
1147
|
+
return config;
|
|
1148
|
+
}
|
|
1149
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1150
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1151
|
+
return null;
|
|
1152
|
+
}
|
|
1153
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1154
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1155
|
+
}
|
|
1156
|
+
var config = typeCheckConfig$3(untrustedConfig);
|
|
1157
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1158
|
+
return null;
|
|
1159
|
+
}
|
|
1160
|
+
return config;
|
|
1161
|
+
}
|
|
1162
|
+
function adapterFragment$3(luvio, config) {
|
|
1163
|
+
createResourceParams$3(config);
|
|
1164
|
+
return select$6();
|
|
1165
|
+
}
|
|
1166
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
1167
|
+
var snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
1168
|
+
config: config,
|
|
1169
|
+
resolve: function () { return buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions); }
|
|
1170
|
+
});
|
|
1171
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
1172
|
+
}
|
|
1173
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
1174
|
+
var snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
1175
|
+
config: config,
|
|
1176
|
+
resolve: function () { return buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions); }
|
|
1177
|
+
});
|
|
1178
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
1179
|
+
}
|
|
1180
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1181
|
+
var resourceParams = createResourceParams$3(config);
|
|
1182
|
+
var request = createResourceRequest$3(resourceParams);
|
|
1183
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1184
|
+
.then(function (response) {
|
|
1185
|
+
return luvio.handleSuccessResponse(function () { return onFetchResponseSuccess$3(luvio, config, resourceParams, response); }, function () { return getResponseCacheKeys$3(luvio, resourceParams, response.body); });
|
|
1186
|
+
}, function (response) {
|
|
1187
|
+
return luvio.handleErrorResponse(function () { return onFetchResponseError$3(luvio, config, resourceParams, response); });
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
1191
|
+
var luvio = context.luvio, config = context.config;
|
|
1192
|
+
var networkPriority = coercedAdapterRequestContext.networkPriority, requestCorrelator = coercedAdapterRequestContext.requestCorrelator, eventObservers = coercedAdapterRequestContext.eventObservers;
|
|
1193
|
+
var dispatchOptions = {
|
|
1194
|
+
resourceRequestContext: {
|
|
1195
|
+
requestCorrelator: requestCorrelator,
|
|
1196
|
+
luvioRequestMethod: undefined,
|
|
1197
|
+
},
|
|
1198
|
+
eventObservers: eventObservers
|
|
1199
|
+
};
|
|
1200
|
+
if (networkPriority !== 'normal') {
|
|
1201
|
+
dispatchOptions.overrides = {
|
|
1202
|
+
priority: networkPriority
|
|
1203
|
+
};
|
|
1204
|
+
}
|
|
1205
|
+
return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
|
|
1206
|
+
}
|
|
1207
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
1208
|
+
var luvio = context.luvio, config = context.config;
|
|
1209
|
+
var selector = {
|
|
1210
|
+
recordId: keyBuilder$6(luvio, config),
|
|
1211
|
+
node: adapterFragment$3(luvio, config),
|
|
1212
|
+
variables: {},
|
|
1213
|
+
};
|
|
1214
|
+
var cacheSnapshot = storeLookup(selector, {
|
|
1215
|
+
config: config,
|
|
1216
|
+
resolve: function () { return buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions); }
|
|
1217
|
+
});
|
|
1218
|
+
return cacheSnapshot;
|
|
1219
|
+
}
|
|
1220
|
+
var getContentTypesAdapterFactory = function (luvio) { return function ExperienceType__getContentTypes(untrustedConfig, requestContext) {
|
|
1221
|
+
var config = validateAdapterConfig$3(untrustedConfig, getContentTypes_ConfigPropertyNames);
|
|
1222
|
+
// Invalid or incomplete config
|
|
1223
|
+
if (config === null) {
|
|
1224
|
+
return null;
|
|
1225
|
+
}
|
|
1226
|
+
return luvio.applyCachePolicy((requestContext || {}), { config: config, luvio: luvio }, // BuildSnapshotContext
|
|
1227
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
1228
|
+
}; };
|
|
1229
|
+
|
|
1230
|
+
var TTL$2 = 3600000;
|
|
1231
|
+
var VERSION$2 = "fb0265f1d37480d0821fd97a29a0f9c2";
|
|
1232
|
+
function validate$3(obj, path) {
|
|
1233
|
+
if (path === void 0) { path = 'ExperienceModelContentTypeDetailRepresentation'; }
|
|
1234
|
+
var v_error = (function () {
|
|
1235
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1236
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1237
|
+
}
|
|
1238
|
+
if (obj.description !== undefined) {
|
|
1239
|
+
var obj_description = obj.description;
|
|
1240
|
+
var path_description = path + '.description';
|
|
1241
|
+
if (typeof obj_description !== 'string') {
|
|
1242
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
if (obj.designConfig !== undefined) {
|
|
1246
|
+
var obj_designConfig = obj.designConfig;
|
|
1247
|
+
var path_designConfig = path + '.designConfig';
|
|
1248
|
+
if (obj_designConfig === undefined) {
|
|
1249
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_designConfig + '" (at "' + path_designConfig + '")');
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
var obj_developerName = obj.developerName;
|
|
1253
|
+
var path_developerName = path + '.developerName';
|
|
1254
|
+
if (typeof obj_developerName !== 'string') {
|
|
1255
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
1256
|
+
}
|
|
1257
|
+
if (obj.id !== undefined) {
|
|
1258
|
+
var obj_id = obj.id;
|
|
1259
|
+
var path_id = path + '.id';
|
|
1260
|
+
if (typeof obj_id !== 'string') {
|
|
1261
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
if (obj.namespacePrefix !== undefined) {
|
|
1265
|
+
var obj_namespacePrefix = obj.namespacePrefix;
|
|
1266
|
+
var path_namespacePrefix = path + '.namespacePrefix';
|
|
1267
|
+
if (typeof obj_namespacePrefix !== 'string') {
|
|
1268
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespacePrefix + '" (at "' + path_namespacePrefix + '")');
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
if (obj.renditionConfig !== undefined) {
|
|
1272
|
+
var obj_renditionConfig = obj.renditionConfig;
|
|
1273
|
+
var path_renditionConfig = path + '.renditionConfig';
|
|
1274
|
+
if (obj_renditionConfig === undefined) {
|
|
1275
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_renditionConfig + '" (at "' + path_renditionConfig + '")');
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
var obj_schema = obj.schema;
|
|
1279
|
+
var path_schema = path + '.schema';
|
|
1280
|
+
if (typeof obj_schema !== 'object' || ArrayIsArray(obj_schema) || obj_schema === null) {
|
|
1281
|
+
return new TypeError('Expected "object" but received "' + typeof obj_schema + '" (at "' + path_schema + '")');
|
|
1282
|
+
}
|
|
1283
|
+
var obj_schema_keys = ObjectKeys(obj_schema);
|
|
1284
|
+
for (var i = 0; i < obj_schema_keys.length; i++) {
|
|
1285
|
+
var key = obj_schema_keys[i];
|
|
1286
|
+
var obj_schema_prop = obj_schema[key];
|
|
1287
|
+
var path_schema_prop = path_schema + '["' + key + '"]';
|
|
1288
|
+
if (obj_schema_prop === undefined) {
|
|
1289
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_schema_prop + '" (at "' + path_schema_prop + '")');
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
if (obj.title !== undefined) {
|
|
1293
|
+
var obj_title = obj.title;
|
|
1294
|
+
var path_title = path + '.title';
|
|
1295
|
+
if (typeof obj_title !== 'string') {
|
|
1296
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
})();
|
|
1300
|
+
return v_error === undefined ? null : v_error;
|
|
1301
|
+
}
|
|
1302
|
+
var RepresentationType$2 = 'ExperienceModelContentTypeDetailRepresentation';
|
|
1303
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1304
|
+
return input;
|
|
1305
|
+
}
|
|
1306
|
+
var select$5 = function ExperienceModelContentTypeDetailRepresentationSelect() {
|
|
1307
|
+
return {
|
|
1308
|
+
kind: 'Fragment',
|
|
1309
|
+
version: VERSION$2,
|
|
1310
|
+
private: [],
|
|
1311
|
+
opaque: true
|
|
1312
|
+
};
|
|
1313
|
+
};
|
|
1314
|
+
function equals$2(existing, incoming) {
|
|
1315
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1316
|
+
return false;
|
|
1317
|
+
}
|
|
1318
|
+
return true;
|
|
1319
|
+
}
|
|
1320
|
+
function deepFreeze$3(input) {
|
|
1321
|
+
var input_designConfig = input.designConfig;
|
|
1322
|
+
if (input_designConfig !== undefined) {
|
|
1323
|
+
deepFreeze$9(input_designConfig);
|
|
1324
|
+
}
|
|
1325
|
+
var input_renditionConfig = input.renditionConfig;
|
|
1326
|
+
if (input_renditionConfig !== undefined) {
|
|
1327
|
+
deepFreeze$9(input_renditionConfig);
|
|
1328
|
+
}
|
|
1329
|
+
var input_schema = input.schema;
|
|
1330
|
+
var input_schema_keys = Object.keys(input_schema);
|
|
1331
|
+
var input_schema_length = input_schema_keys.length;
|
|
1332
|
+
for (var i = 0; i < input_schema_length; i++) {
|
|
1333
|
+
var key = input_schema_keys[i];
|
|
1334
|
+
var input_schema_prop = input_schema[key];
|
|
1335
|
+
deepFreeze$9(input_schema_prop);
|
|
1336
|
+
}
|
|
1337
|
+
ObjectFreeze(input_schema);
|
|
1338
|
+
ObjectFreeze(input);
|
|
1339
|
+
}
|
|
1340
|
+
var ingest$2 = function ExperienceModelContentTypeDetailRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1341
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1342
|
+
var validateError = validate$3(input);
|
|
1343
|
+
if (validateError !== null) {
|
|
1344
|
+
throw validateError;
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
var key = path.fullPath;
|
|
1348
|
+
var existingRecord = store.readEntry(key);
|
|
1349
|
+
var ttlToUse = TTL$2;
|
|
1350
|
+
var incomingRecord = normalize$2(input, store.readEntry(key), {
|
|
1351
|
+
fullPath: key,
|
|
1352
|
+
parent: path.parent,
|
|
1353
|
+
propertyName: path.propertyName,
|
|
1354
|
+
ttl: ttlToUse
|
|
1355
|
+
});
|
|
1356
|
+
deepFreeze$3(input);
|
|
1357
|
+
if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
|
|
1358
|
+
luvio.storePublish(key, incomingRecord);
|
|
1359
|
+
}
|
|
1360
|
+
{
|
|
1361
|
+
var storeMetadataParams = {
|
|
1362
|
+
ttl: ttlToUse,
|
|
1363
|
+
namespace: "ExperienceType",
|
|
1364
|
+
version: VERSION$2,
|
|
1365
|
+
representationName: RepresentationType$2,
|
|
1366
|
+
};
|
|
1367
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1368
|
+
}
|
|
1369
|
+
return createLink(key);
|
|
1370
|
+
};
|
|
1371
|
+
function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
|
|
1372
|
+
var rootKeySet = new engine.StoreKeyMap();
|
|
1373
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1374
|
+
var rootKey = fullPathFactory();
|
|
1375
|
+
rootKeySet.set(rootKey, {
|
|
1376
|
+
namespace: keyPrefix,
|
|
1377
|
+
representationName: RepresentationType$2,
|
|
1378
|
+
mergeable: false
|
|
1379
|
+
});
|
|
1380
|
+
return rootKeySet;
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
function select$4(luvio, params) {
|
|
1384
|
+
return select$5();
|
|
1385
|
+
}
|
|
1386
|
+
function keyBuilder$5(luvio, params) {
|
|
1387
|
+
return keyPrefix + '::ExperienceModelContentTypeDetailRepresentation:(' + 'designConfigTarget:' + params.queryParams.designConfigTarget + ',' + 'includeSubSchemaDefinitions:' + params.queryParams.includeSubSchemaDefinitions + ',' + 'language:' + params.queryParams.language + ',' + 'renditionConfigTarget:' + params.queryParams.renditionConfigTarget + ',' + 'fullyQualifiedName:' + params.urlParams.fullyQualifiedName + ')';
|
|
1388
|
+
}
|
|
1389
|
+
function getResponseCacheKeys$2(luvio, resourceParams, response) {
|
|
1390
|
+
return getTypeCacheKeys$2(luvio, response, function () { return keyBuilder$5(luvio, resourceParams); });
|
|
1391
|
+
}
|
|
1392
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1393
|
+
var body = response.body;
|
|
1394
|
+
var key = keyBuilder$5(luvio, resourceParams);
|
|
1395
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1396
|
+
var snapshot = luvio.storeLookup({
|
|
1397
|
+
recordId: key,
|
|
1398
|
+
node: select$4(),
|
|
1399
|
+
variables: {},
|
|
1400
|
+
}, snapshotRefresh);
|
|
1401
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1402
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1403
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
return snapshot;
|
|
1407
|
+
}
|
|
1408
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
1409
|
+
var key = keyBuilder$5(luvio, params);
|
|
1410
|
+
var errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1411
|
+
var storeMetadataParams = {
|
|
1412
|
+
ttl: TTL$2,
|
|
1413
|
+
namespace: keyPrefix,
|
|
1414
|
+
version: VERSION$2,
|
|
1415
|
+
representationName: RepresentationType$2
|
|
1416
|
+
};
|
|
1417
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1418
|
+
return errorSnapshot;
|
|
1419
|
+
}
|
|
1420
|
+
function createResourceRequest$2(config) {
|
|
1421
|
+
var headers = {};
|
|
1422
|
+
return {
|
|
1423
|
+
baseUri: '/services/data/v58.0',
|
|
1424
|
+
basePath: '/connect/experience-model/content-types/' + config.urlParams.fullyQualifiedName + '',
|
|
1425
|
+
method: 'get',
|
|
1426
|
+
body: null,
|
|
1427
|
+
urlParams: config.urlParams,
|
|
1428
|
+
queryParams: config.queryParams,
|
|
1429
|
+
headers: headers,
|
|
1430
|
+
priority: 'normal',
|
|
1431
|
+
};
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
var getContentType_ConfigPropertyNames = {
|
|
1435
|
+
displayName: 'getContentType',
|
|
1436
|
+
parameters: {
|
|
1437
|
+
required: ['fullyQualifiedName'],
|
|
1438
|
+
optional: ['designConfigTarget', 'includeSubSchemaDefinitions', 'language', 'renditionConfigTarget']
|
|
1439
|
+
}
|
|
1440
|
+
};
|
|
1441
|
+
function createResourceParams$2(config) {
|
|
1442
|
+
var resourceParams = {
|
|
1443
|
+
urlParams: {
|
|
1444
|
+
fullyQualifiedName: config.fullyQualifiedName
|
|
1445
|
+
},
|
|
1446
|
+
queryParams: {
|
|
1447
|
+
designConfigTarget: config.designConfigTarget, includeSubSchemaDefinitions: config.includeSubSchemaDefinitions, language: config.language, renditionConfigTarget: config.renditionConfigTarget
|
|
1448
|
+
}
|
|
1449
|
+
};
|
|
1450
|
+
return resourceParams;
|
|
1451
|
+
}
|
|
1452
|
+
function keyBuilder$4(luvio, config) {
|
|
1453
|
+
var resourceParams = createResourceParams$2(config);
|
|
1454
|
+
return keyBuilder$5(luvio, resourceParams);
|
|
1455
|
+
}
|
|
1456
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1457
|
+
var config = {};
|
|
1458
|
+
var untrustedConfig_fullyQualifiedName = untrustedConfig.fullyQualifiedName;
|
|
1459
|
+
if (typeof untrustedConfig_fullyQualifiedName === 'string') {
|
|
1460
|
+
config.fullyQualifiedName = untrustedConfig_fullyQualifiedName;
|
|
1461
|
+
}
|
|
1462
|
+
var untrustedConfig_designConfigTarget = untrustedConfig.designConfigTarget;
|
|
1463
|
+
if (typeof untrustedConfig_designConfigTarget === 'string') {
|
|
1464
|
+
config.designConfigTarget = untrustedConfig_designConfigTarget;
|
|
1465
|
+
}
|
|
1466
|
+
var untrustedConfig_includeSubSchemaDefinitions = untrustedConfig.includeSubSchemaDefinitions;
|
|
1467
|
+
if (typeof untrustedConfig_includeSubSchemaDefinitions === 'boolean') {
|
|
1468
|
+
config.includeSubSchemaDefinitions = untrustedConfig_includeSubSchemaDefinitions;
|
|
1469
|
+
}
|
|
1470
|
+
var untrustedConfig_language = untrustedConfig.language;
|
|
1471
|
+
if (typeof untrustedConfig_language === 'string') {
|
|
1472
|
+
config.language = untrustedConfig_language;
|
|
1473
|
+
}
|
|
1474
|
+
var untrustedConfig_renditionConfigTarget = untrustedConfig.renditionConfigTarget;
|
|
1475
|
+
if (typeof untrustedConfig_renditionConfigTarget === 'string') {
|
|
1476
|
+
config.renditionConfigTarget = untrustedConfig_renditionConfigTarget;
|
|
1477
|
+
}
|
|
1478
|
+
return config;
|
|
1479
|
+
}
|
|
1480
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1481
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1482
|
+
return null;
|
|
1483
|
+
}
|
|
1484
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1485
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1486
|
+
}
|
|
1487
|
+
var config = typeCheckConfig$2(untrustedConfig);
|
|
1488
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1489
|
+
return null;
|
|
1490
|
+
}
|
|
1491
|
+
return config;
|
|
1492
|
+
}
|
|
1493
|
+
function adapterFragment$2(luvio, config) {
|
|
1494
|
+
createResourceParams$2(config);
|
|
1495
|
+
return select$4();
|
|
1496
|
+
}
|
|
1497
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
1498
|
+
var snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1499
|
+
config: config,
|
|
1500
|
+
resolve: function () { return buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions); }
|
|
1501
|
+
});
|
|
1502
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
1503
|
+
}
|
|
1504
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
1505
|
+
var snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
1506
|
+
config: config,
|
|
1507
|
+
resolve: function () { return buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions); }
|
|
1508
|
+
});
|
|
1509
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
1510
|
+
}
|
|
1511
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1512
|
+
var resourceParams = createResourceParams$2(config);
|
|
1513
|
+
var request = createResourceRequest$2(resourceParams);
|
|
1514
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1515
|
+
.then(function (response) {
|
|
1516
|
+
return luvio.handleSuccessResponse(function () { return onFetchResponseSuccess$2(luvio, config, resourceParams, response); }, function () { return getResponseCacheKeys$2(luvio, resourceParams, response.body); });
|
|
1517
|
+
}, function (response) {
|
|
1518
|
+
return luvio.handleErrorResponse(function () { return onFetchResponseError$2(luvio, config, resourceParams, response); });
|
|
1519
|
+
});
|
|
1520
|
+
}
|
|
1521
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1522
|
+
var luvio = context.luvio, config = context.config;
|
|
1523
|
+
var networkPriority = coercedAdapterRequestContext.networkPriority, requestCorrelator = coercedAdapterRequestContext.requestCorrelator, eventObservers = coercedAdapterRequestContext.eventObservers;
|
|
1524
|
+
var dispatchOptions = {
|
|
1525
|
+
resourceRequestContext: {
|
|
1526
|
+
requestCorrelator: requestCorrelator,
|
|
1527
|
+
luvioRequestMethod: undefined,
|
|
1528
|
+
},
|
|
1529
|
+
eventObservers: eventObservers
|
|
1530
|
+
};
|
|
1531
|
+
if (networkPriority !== 'normal') {
|
|
1532
|
+
dispatchOptions.overrides = {
|
|
1533
|
+
priority: networkPriority
|
|
1534
|
+
};
|
|
1535
|
+
}
|
|
1536
|
+
return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
|
|
1537
|
+
}
|
|
1538
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1539
|
+
var luvio = context.luvio, config = context.config;
|
|
1540
|
+
var selector = {
|
|
1541
|
+
recordId: keyBuilder$4(luvio, config),
|
|
1542
|
+
node: adapterFragment$2(luvio, config),
|
|
1543
|
+
variables: {},
|
|
1544
|
+
};
|
|
1545
|
+
var cacheSnapshot = storeLookup(selector, {
|
|
1546
|
+
config: config,
|
|
1547
|
+
resolve: function () { return buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions); }
|
|
1548
|
+
});
|
|
1549
|
+
return cacheSnapshot;
|
|
1550
|
+
}
|
|
1551
|
+
var getContentTypeAdapterFactory = function (luvio) { return function ExperienceType__getContentType(untrustedConfig, requestContext) {
|
|
1552
|
+
var config = validateAdapterConfig$2(untrustedConfig, getContentType_ConfigPropertyNames);
|
|
1553
|
+
// Invalid or incomplete config
|
|
1554
|
+
if (config === null) {
|
|
1555
|
+
return null;
|
|
1556
|
+
}
|
|
1557
|
+
return luvio.applyCachePolicy((requestContext || {}), { config: config, luvio: luvio }, // BuildSnapshotContext
|
|
1558
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
1559
|
+
}; };
|
|
1560
|
+
|
|
1561
|
+
function validate$2(obj, path) {
|
|
1562
|
+
if (path === void 0) { path = 'ExperienceModelPropertyTypeSummaryRepresentation'; }
|
|
1563
|
+
var v_error = (function () {
|
|
1564
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1565
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1566
|
+
}
|
|
1567
|
+
if (obj.description !== undefined) {
|
|
1568
|
+
var obj_description = obj.description;
|
|
1569
|
+
var path_description = path + '.description';
|
|
1570
|
+
if (typeof obj_description !== 'string') {
|
|
1571
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
var obj_detailUrl = obj.detailUrl;
|
|
1575
|
+
var path_detailUrl = path + '.detailUrl';
|
|
1576
|
+
if (typeof obj_detailUrl !== 'string') {
|
|
1577
|
+
return new TypeError('Expected "string" but received "' + typeof obj_detailUrl + '" (at "' + path_detailUrl + '")');
|
|
1578
|
+
}
|
|
1579
|
+
var obj_developerName = obj.developerName;
|
|
1580
|
+
var path_developerName = path + '.developerName';
|
|
1581
|
+
if (typeof obj_developerName !== 'string') {
|
|
1582
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
1583
|
+
}
|
|
1584
|
+
if (obj.id !== undefined) {
|
|
1585
|
+
var obj_id = obj.id;
|
|
1586
|
+
var path_id = path + '.id';
|
|
1587
|
+
if (typeof obj_id !== 'string') {
|
|
1588
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
var obj_namespacePrefix = obj.namespacePrefix;
|
|
1592
|
+
var path_namespacePrefix = path + '.namespacePrefix';
|
|
1593
|
+
if (typeof obj_namespacePrefix !== 'string') {
|
|
1594
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespacePrefix + '" (at "' + path_namespacePrefix + '")');
|
|
1595
|
+
}
|
|
1596
|
+
if (obj.title !== undefined) {
|
|
1597
|
+
var obj_title = obj.title;
|
|
1598
|
+
var path_title = path + '.title';
|
|
1599
|
+
if (typeof obj_title !== 'string') {
|
|
1600
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
})();
|
|
1604
|
+
return v_error === undefined ? null : v_error;
|
|
1605
|
+
}
|
|
1606
|
+
function deepFreeze$2(input) {
|
|
1607
|
+
ObjectFreeze(input);
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
var TTL$1 = 3600000;
|
|
1611
|
+
var VERSION$1 = "172e544645942d550fc1f07812bb85b6";
|
|
1612
|
+
function validate$1(obj, path) {
|
|
1613
|
+
if (path === void 0) { path = 'ExperienceModelPropertyTypeCollectionRepresentation'; }
|
|
1614
|
+
var v_error = (function () {
|
|
1615
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1616
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1617
|
+
}
|
|
1618
|
+
var obj_count = obj.count;
|
|
1619
|
+
var path_count = path + '.count';
|
|
1620
|
+
if (typeof obj_count !== 'number' || (typeof obj_count === 'number' && Math.floor(obj_count) !== obj_count)) {
|
|
1621
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
1622
|
+
}
|
|
1623
|
+
if (obj.currentPageUrl !== undefined) {
|
|
1624
|
+
var obj_currentPageUrl = obj.currentPageUrl;
|
|
1625
|
+
var path_currentPageUrl = path + '.currentPageUrl';
|
|
1626
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
1627
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
if (obj.nextPageUrl !== undefined) {
|
|
1631
|
+
var obj_nextPageUrl = obj.nextPageUrl;
|
|
1632
|
+
var path_nextPageUrl = path + '.nextPageUrl';
|
|
1633
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
1634
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
if (obj.previousPageUrl !== undefined) {
|
|
1638
|
+
var obj_previousPageUrl = obj.previousPageUrl;
|
|
1639
|
+
var path_previousPageUrl = path + '.previousPageUrl';
|
|
1640
|
+
if (typeof obj_previousPageUrl !== 'string') {
|
|
1641
|
+
return new TypeError('Expected "string" but received "' + typeof obj_previousPageUrl + '" (at "' + path_previousPageUrl + '")');
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
var obj_propertyTypes = obj.propertyTypes;
|
|
1645
|
+
var path_propertyTypes = path + '.propertyTypes';
|
|
1646
|
+
if (!ArrayIsArray(obj_propertyTypes)) {
|
|
1647
|
+
return new TypeError('Expected "array" but received "' + typeof obj_propertyTypes + '" (at "' + path_propertyTypes + '")');
|
|
1648
|
+
}
|
|
1649
|
+
for (var i = 0; i < obj_propertyTypes.length; i++) {
|
|
1650
|
+
var obj_propertyTypes_item = obj_propertyTypes[i];
|
|
1651
|
+
var path_propertyTypes_item = path_propertyTypes + '[' + i + ']';
|
|
1652
|
+
var referencepath_propertyTypes_itemValidationError = validate$2(obj_propertyTypes_item, path_propertyTypes_item);
|
|
1653
|
+
if (referencepath_propertyTypes_itemValidationError !== null) {
|
|
1654
|
+
var message = 'Object doesn\'t match ExperienceModelPropertyTypeSummaryRepresentation (at "' + path_propertyTypes_item + '")\n';
|
|
1655
|
+
message += referencepath_propertyTypes_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
1656
|
+
return new TypeError(message);
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
})();
|
|
1660
|
+
return v_error === undefined ? null : v_error;
|
|
1661
|
+
}
|
|
1662
|
+
var RepresentationType$1 = 'ExperienceModelPropertyTypeCollectionRepresentation';
|
|
1663
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1664
|
+
return input;
|
|
1665
|
+
}
|
|
1666
|
+
var select$3 = function ExperienceModelPropertyTypeCollectionRepresentationSelect() {
|
|
1667
|
+
return {
|
|
1668
|
+
kind: 'Fragment',
|
|
1669
|
+
version: VERSION$1,
|
|
1670
|
+
private: [],
|
|
1671
|
+
opaque: true
|
|
1672
|
+
};
|
|
1673
|
+
};
|
|
1674
|
+
function equals$1(existing, incoming) {
|
|
1675
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1676
|
+
return false;
|
|
1677
|
+
}
|
|
1678
|
+
return true;
|
|
1679
|
+
}
|
|
1680
|
+
function deepFreeze$1(input) {
|
|
1681
|
+
var input_propertyTypes = input.propertyTypes;
|
|
1682
|
+
for (var i = 0; i < input_propertyTypes.length; i++) {
|
|
1683
|
+
var input_propertyTypes_item = input_propertyTypes[i];
|
|
1684
|
+
deepFreeze$2(input_propertyTypes_item);
|
|
1685
|
+
}
|
|
1686
|
+
ObjectFreeze(input_propertyTypes);
|
|
1687
|
+
ObjectFreeze(input);
|
|
1688
|
+
}
|
|
1689
|
+
var ingest$1 = function ExperienceModelPropertyTypeCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1690
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1691
|
+
var validateError = validate$1(input);
|
|
1692
|
+
if (validateError !== null) {
|
|
1693
|
+
throw validateError;
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
var key = path.fullPath;
|
|
1697
|
+
var existingRecord = store.readEntry(key);
|
|
1698
|
+
var ttlToUse = TTL$1;
|
|
1699
|
+
var incomingRecord = normalize$1(input, store.readEntry(key), {
|
|
1700
|
+
fullPath: key,
|
|
1701
|
+
parent: path.parent,
|
|
1702
|
+
propertyName: path.propertyName,
|
|
1703
|
+
ttl: ttlToUse
|
|
1704
|
+
});
|
|
1705
|
+
deepFreeze$1(input);
|
|
1706
|
+
if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
|
|
1707
|
+
luvio.storePublish(key, incomingRecord);
|
|
1708
|
+
}
|
|
1709
|
+
{
|
|
1710
|
+
var storeMetadataParams = {
|
|
1711
|
+
ttl: ttlToUse,
|
|
1712
|
+
namespace: "ExperienceType",
|
|
1713
|
+
version: VERSION$1,
|
|
1714
|
+
representationName: RepresentationType$1,
|
|
1715
|
+
};
|
|
1716
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1717
|
+
}
|
|
1718
|
+
return createLink(key);
|
|
1719
|
+
};
|
|
1720
|
+
function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
|
|
1721
|
+
var rootKeySet = new engine.StoreKeyMap();
|
|
1722
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1723
|
+
var rootKey = fullPathFactory();
|
|
1724
|
+
rootKeySet.set(rootKey, {
|
|
1725
|
+
namespace: keyPrefix,
|
|
1726
|
+
representationName: RepresentationType$1,
|
|
1727
|
+
mergeable: false
|
|
1728
|
+
});
|
|
1729
|
+
return rootKeySet;
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
function select$2(luvio, params) {
|
|
1733
|
+
return select$3();
|
|
1734
|
+
}
|
|
1735
|
+
function keyBuilder$3(luvio, params) {
|
|
1736
|
+
return keyPrefix + '::ExperienceModelPropertyTypeCollectionRepresentation:(' + 'designConfigTarget:' + params.queryParams.designConfigTarget + ',' + 'fullyQualifiedNames:' + params.queryParams.fullyQualifiedNames + ',' + 'language:' + params.queryParams.language + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'renditionConfigTarget:' + params.queryParams.renditionConfigTarget + ')';
|
|
1737
|
+
}
|
|
1738
|
+
function getResponseCacheKeys$1(luvio, resourceParams, response) {
|
|
1739
|
+
return getTypeCacheKeys$1(luvio, response, function () { return keyBuilder$3(luvio, resourceParams); });
|
|
1740
|
+
}
|
|
1741
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
1742
|
+
var body = response.body;
|
|
1743
|
+
var key = keyBuilder$3(luvio, resourceParams);
|
|
1744
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1745
|
+
var snapshot = luvio.storeLookup({
|
|
1746
|
+
recordId: key,
|
|
1747
|
+
node: select$2(),
|
|
1748
|
+
variables: {},
|
|
1749
|
+
}, snapshotRefresh);
|
|
1750
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1751
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1752
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
return snapshot;
|
|
1756
|
+
}
|
|
1757
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1758
|
+
var key = keyBuilder$3(luvio, params);
|
|
1759
|
+
var errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1760
|
+
var storeMetadataParams = {
|
|
1761
|
+
ttl: TTL$1,
|
|
1762
|
+
namespace: keyPrefix,
|
|
1763
|
+
version: VERSION$1,
|
|
1764
|
+
representationName: RepresentationType$1
|
|
1765
|
+
};
|
|
1766
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1767
|
+
return errorSnapshot;
|
|
1768
|
+
}
|
|
1769
|
+
function createResourceRequest$1(config) {
|
|
1770
|
+
var headers = {};
|
|
1771
|
+
return {
|
|
1772
|
+
baseUri: '/services/data/v58.0',
|
|
1773
|
+
basePath: '/connect/experience-model/property-types',
|
|
1774
|
+
method: 'get',
|
|
1775
|
+
body: null,
|
|
1776
|
+
urlParams: {},
|
|
1777
|
+
queryParams: config.queryParams,
|
|
1778
|
+
headers: headers,
|
|
1779
|
+
priority: 'normal',
|
|
1780
|
+
};
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
var getPropertyTypes_ConfigPropertyNames = {
|
|
1784
|
+
displayName: 'getPropertyTypes',
|
|
1785
|
+
parameters: {
|
|
1786
|
+
required: [],
|
|
1787
|
+
optional: ['designConfigTarget', 'fullyQualifiedNames', 'language', 'page', 'pageSize', 'renditionConfigTarget']
|
|
1788
|
+
}
|
|
1789
|
+
};
|
|
1790
|
+
function createResourceParams$1(config) {
|
|
1791
|
+
var resourceParams = {
|
|
1792
|
+
queryParams: {
|
|
1793
|
+
designConfigTarget: config.designConfigTarget, fullyQualifiedNames: config.fullyQualifiedNames, language: config.language, page: config.page, pageSize: config.pageSize, renditionConfigTarget: config.renditionConfigTarget
|
|
1794
|
+
}
|
|
1795
|
+
};
|
|
1796
|
+
return resourceParams;
|
|
1797
|
+
}
|
|
1798
|
+
function keyBuilder$2(luvio, config) {
|
|
1799
|
+
var resourceParams = createResourceParams$1(config);
|
|
1800
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
1801
|
+
}
|
|
1802
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1803
|
+
var config = {};
|
|
1804
|
+
var untrustedConfig_designConfigTarget = untrustedConfig.designConfigTarget;
|
|
1805
|
+
if (typeof untrustedConfig_designConfigTarget === 'string') {
|
|
1806
|
+
config.designConfigTarget = untrustedConfig_designConfigTarget;
|
|
1807
|
+
}
|
|
1808
|
+
var untrustedConfig_fullyQualifiedNames = untrustedConfig.fullyQualifiedNames;
|
|
1809
|
+
if (ArrayIsArray$1(untrustedConfig_fullyQualifiedNames)) {
|
|
1810
|
+
var untrustedConfig_fullyQualifiedNames_array = [];
|
|
1811
|
+
for (var i = 0, arrayLength = untrustedConfig_fullyQualifiedNames.length; i < arrayLength; i++) {
|
|
1812
|
+
var untrustedConfig_fullyQualifiedNames_item = untrustedConfig_fullyQualifiedNames[i];
|
|
1813
|
+
if (typeof untrustedConfig_fullyQualifiedNames_item === 'string') {
|
|
1814
|
+
untrustedConfig_fullyQualifiedNames_array.push(untrustedConfig_fullyQualifiedNames_item);
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
config.fullyQualifiedNames = untrustedConfig_fullyQualifiedNames_array;
|
|
1818
|
+
}
|
|
1819
|
+
var untrustedConfig_language = untrustedConfig.language;
|
|
1820
|
+
if (typeof untrustedConfig_language === 'string') {
|
|
1821
|
+
config.language = untrustedConfig_language;
|
|
1822
|
+
}
|
|
1823
|
+
var untrustedConfig_page = untrustedConfig.page;
|
|
1824
|
+
if (typeof untrustedConfig_page === 'number' && Math.floor(untrustedConfig_page) === untrustedConfig_page) {
|
|
1825
|
+
config.page = untrustedConfig_page;
|
|
1826
|
+
}
|
|
1827
|
+
var untrustedConfig_pageSize = untrustedConfig.pageSize;
|
|
1828
|
+
if (typeof untrustedConfig_pageSize === 'number' && Math.floor(untrustedConfig_pageSize) === untrustedConfig_pageSize) {
|
|
1829
|
+
config.pageSize = untrustedConfig_pageSize;
|
|
1830
|
+
}
|
|
1831
|
+
var untrustedConfig_renditionConfigTarget = untrustedConfig.renditionConfigTarget;
|
|
1832
|
+
if (typeof untrustedConfig_renditionConfigTarget === 'string') {
|
|
1833
|
+
config.renditionConfigTarget = untrustedConfig_renditionConfigTarget;
|
|
1834
|
+
}
|
|
1835
|
+
return config;
|
|
1836
|
+
}
|
|
1837
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1838
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1839
|
+
return null;
|
|
1840
|
+
}
|
|
1841
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1842
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1843
|
+
}
|
|
1844
|
+
var config = typeCheckConfig$1(untrustedConfig);
|
|
1845
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1846
|
+
return null;
|
|
1847
|
+
}
|
|
1848
|
+
return config;
|
|
1849
|
+
}
|
|
1850
|
+
function adapterFragment$1(luvio, config) {
|
|
1851
|
+
createResourceParams$1(config);
|
|
1852
|
+
return select$2();
|
|
1853
|
+
}
|
|
1854
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1855
|
+
var snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
1856
|
+
config: config,
|
|
1857
|
+
resolve: function () { return buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions); }
|
|
1858
|
+
});
|
|
1859
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
1860
|
+
}
|
|
1861
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1862
|
+
var snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1863
|
+
config: config,
|
|
1864
|
+
resolve: function () { return buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions); }
|
|
1865
|
+
});
|
|
1866
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
1867
|
+
}
|
|
1868
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1869
|
+
var resourceParams = createResourceParams$1(config);
|
|
1870
|
+
var request = createResourceRequest$1(resourceParams);
|
|
1871
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1872
|
+
.then(function (response) {
|
|
1873
|
+
return luvio.handleSuccessResponse(function () { return onFetchResponseSuccess$1(luvio, config, resourceParams, response); }, function () { return getResponseCacheKeys$1(luvio, resourceParams, response.body); });
|
|
1874
|
+
}, function (response) {
|
|
1875
|
+
return luvio.handleErrorResponse(function () { return onFetchResponseError$1(luvio, config, resourceParams, response); });
|
|
1876
|
+
});
|
|
1877
|
+
}
|
|
1878
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1879
|
+
var luvio = context.luvio, config = context.config;
|
|
1880
|
+
var networkPriority = coercedAdapterRequestContext.networkPriority, requestCorrelator = coercedAdapterRequestContext.requestCorrelator, eventObservers = coercedAdapterRequestContext.eventObservers;
|
|
1881
|
+
var dispatchOptions = {
|
|
1882
|
+
resourceRequestContext: {
|
|
1883
|
+
requestCorrelator: requestCorrelator,
|
|
1884
|
+
luvioRequestMethod: undefined,
|
|
1885
|
+
},
|
|
1886
|
+
eventObservers: eventObservers
|
|
1887
|
+
};
|
|
1888
|
+
if (networkPriority !== 'normal') {
|
|
1889
|
+
dispatchOptions.overrides = {
|
|
1890
|
+
priority: networkPriority
|
|
1891
|
+
};
|
|
1892
|
+
}
|
|
1893
|
+
return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
|
|
1894
|
+
}
|
|
1895
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1896
|
+
var luvio = context.luvio, config = context.config;
|
|
1897
|
+
var selector = {
|
|
1898
|
+
recordId: keyBuilder$2(luvio, config),
|
|
1899
|
+
node: adapterFragment$1(luvio, config),
|
|
1900
|
+
variables: {},
|
|
1901
|
+
};
|
|
1902
|
+
var cacheSnapshot = storeLookup(selector, {
|
|
1903
|
+
config: config,
|
|
1904
|
+
resolve: function () { return buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions); }
|
|
1905
|
+
});
|
|
1906
|
+
return cacheSnapshot;
|
|
1907
|
+
}
|
|
1908
|
+
var getPropertyTypesAdapterFactory = function (luvio) { return function ExperienceType__getPropertyTypes(untrustedConfig, requestContext) {
|
|
1909
|
+
var config = validateAdapterConfig$1(untrustedConfig, getPropertyTypes_ConfigPropertyNames);
|
|
1910
|
+
// Invalid or incomplete config
|
|
1911
|
+
if (config === null) {
|
|
1912
|
+
return null;
|
|
1913
|
+
}
|
|
1914
|
+
return luvio.applyCachePolicy((requestContext || {}), { config: config, luvio: luvio }, // BuildSnapshotContext
|
|
1915
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1916
|
+
}; };
|
|
1917
|
+
|
|
1918
|
+
var TTL = 3600000;
|
|
1919
|
+
var VERSION = "56f77a37a5711b32738bafbcb3eed520";
|
|
1920
|
+
function validate(obj, path) {
|
|
1921
|
+
if (path === void 0) { path = 'ExperienceModelPropertyTypeDetailRepresentation'; }
|
|
1922
|
+
var v_error = (function () {
|
|
1923
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1924
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1925
|
+
}
|
|
1926
|
+
if (obj.description !== undefined) {
|
|
1927
|
+
var obj_description = obj.description;
|
|
1928
|
+
var path_description = path + '.description';
|
|
1929
|
+
if (typeof obj_description !== 'string') {
|
|
1930
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
if (obj.designConfig !== undefined) {
|
|
1934
|
+
var obj_designConfig = obj.designConfig;
|
|
1935
|
+
var path_designConfig = path + '.designConfig';
|
|
1936
|
+
if (obj_designConfig === undefined) {
|
|
1937
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_designConfig + '" (at "' + path_designConfig + '")');
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
var obj_developerName = obj.developerName;
|
|
1941
|
+
var path_developerName = path + '.developerName';
|
|
1942
|
+
if (typeof obj_developerName !== 'string') {
|
|
1943
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
1944
|
+
}
|
|
1945
|
+
if (obj.id !== undefined) {
|
|
1946
|
+
var obj_id = obj.id;
|
|
1947
|
+
var path_id = path + '.id';
|
|
1948
|
+
if (typeof obj_id !== 'string') {
|
|
1949
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
var obj_namespacePrefix = obj.namespacePrefix;
|
|
1953
|
+
var path_namespacePrefix = path + '.namespacePrefix';
|
|
1954
|
+
if (typeof obj_namespacePrefix !== 'string') {
|
|
1955
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespacePrefix + '" (at "' + path_namespacePrefix + '")');
|
|
1956
|
+
}
|
|
1957
|
+
if (obj.renditionConfig !== undefined) {
|
|
1958
|
+
var obj_renditionConfig = obj.renditionConfig;
|
|
1959
|
+
var path_renditionConfig = path + '.renditionConfig';
|
|
1960
|
+
if (obj_renditionConfig === undefined) {
|
|
1961
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_renditionConfig + '" (at "' + path_renditionConfig + '")');
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
var obj_schema = obj.schema;
|
|
1965
|
+
var path_schema = path + '.schema';
|
|
1966
|
+
if (typeof obj_schema !== 'object' || ArrayIsArray(obj_schema) || obj_schema === null) {
|
|
1967
|
+
return new TypeError('Expected "object" but received "' + typeof obj_schema + '" (at "' + path_schema + '")');
|
|
1968
|
+
}
|
|
1969
|
+
var obj_schema_keys = ObjectKeys(obj_schema);
|
|
1970
|
+
for (var i = 0; i < obj_schema_keys.length; i++) {
|
|
1971
|
+
var key = obj_schema_keys[i];
|
|
1972
|
+
var obj_schema_prop = obj_schema[key];
|
|
1973
|
+
var path_schema_prop = path_schema + '["' + key + '"]';
|
|
1974
|
+
if (obj_schema_prop === undefined) {
|
|
1975
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_schema_prop + '" (at "' + path_schema_prop + '")');
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
if (obj.title !== undefined) {
|
|
1979
|
+
var obj_title = obj.title;
|
|
1980
|
+
var path_title = path + '.title';
|
|
1981
|
+
if (typeof obj_title !== 'string') {
|
|
1982
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
})();
|
|
1986
|
+
return v_error === undefined ? null : v_error;
|
|
1987
|
+
}
|
|
1988
|
+
var RepresentationType = 'ExperienceModelPropertyTypeDetailRepresentation';
|
|
1989
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1990
|
+
return input;
|
|
1991
|
+
}
|
|
1992
|
+
var select$1 = function ExperienceModelPropertyTypeDetailRepresentationSelect() {
|
|
1993
|
+
return {
|
|
1994
|
+
kind: 'Fragment',
|
|
1995
|
+
version: VERSION,
|
|
1996
|
+
private: [],
|
|
1997
|
+
opaque: true
|
|
1998
|
+
};
|
|
1999
|
+
};
|
|
2000
|
+
function equals(existing, incoming) {
|
|
2001
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2002
|
+
return false;
|
|
2003
|
+
}
|
|
2004
|
+
return true;
|
|
2005
|
+
}
|
|
2006
|
+
function deepFreeze(input) {
|
|
2007
|
+
var input_designConfig = input.designConfig;
|
|
2008
|
+
if (input_designConfig !== undefined) {
|
|
2009
|
+
deepFreeze$9(input_designConfig);
|
|
2010
|
+
}
|
|
2011
|
+
var input_renditionConfig = input.renditionConfig;
|
|
2012
|
+
if (input_renditionConfig !== undefined) {
|
|
2013
|
+
deepFreeze$9(input_renditionConfig);
|
|
2014
|
+
}
|
|
2015
|
+
var input_schema = input.schema;
|
|
2016
|
+
var input_schema_keys = Object.keys(input_schema);
|
|
2017
|
+
var input_schema_length = input_schema_keys.length;
|
|
2018
|
+
for (var i = 0; i < input_schema_length; i++) {
|
|
2019
|
+
var key = input_schema_keys[i];
|
|
2020
|
+
var input_schema_prop = input_schema[key];
|
|
2021
|
+
deepFreeze$9(input_schema_prop);
|
|
2022
|
+
}
|
|
2023
|
+
ObjectFreeze(input_schema);
|
|
2024
|
+
ObjectFreeze(input);
|
|
2025
|
+
}
|
|
2026
|
+
var ingest = function ExperienceModelPropertyTypeDetailRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2027
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2028
|
+
var validateError = validate(input);
|
|
2029
|
+
if (validateError !== null) {
|
|
2030
|
+
throw validateError;
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
var key = path.fullPath;
|
|
2034
|
+
var existingRecord = store.readEntry(key);
|
|
2035
|
+
var ttlToUse = TTL;
|
|
2036
|
+
var incomingRecord = normalize(input, store.readEntry(key), {
|
|
2037
|
+
fullPath: key,
|
|
2038
|
+
parent: path.parent,
|
|
2039
|
+
propertyName: path.propertyName,
|
|
2040
|
+
ttl: ttlToUse
|
|
2041
|
+
});
|
|
2042
|
+
deepFreeze(input);
|
|
2043
|
+
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
2044
|
+
luvio.storePublish(key, incomingRecord);
|
|
2045
|
+
}
|
|
2046
|
+
{
|
|
2047
|
+
var storeMetadataParams = {
|
|
2048
|
+
ttl: ttlToUse,
|
|
2049
|
+
namespace: "ExperienceType",
|
|
2050
|
+
version: VERSION,
|
|
2051
|
+
representationName: RepresentationType,
|
|
2052
|
+
};
|
|
2053
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
2054
|
+
}
|
|
2055
|
+
return createLink(key);
|
|
2056
|
+
};
|
|
2057
|
+
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
2058
|
+
var rootKeySet = new engine.StoreKeyMap();
|
|
2059
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2060
|
+
var rootKey = fullPathFactory();
|
|
2061
|
+
rootKeySet.set(rootKey, {
|
|
2062
|
+
namespace: keyPrefix,
|
|
2063
|
+
representationName: RepresentationType,
|
|
2064
|
+
mergeable: false
|
|
2065
|
+
});
|
|
2066
|
+
return rootKeySet;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
function select(luvio, params) {
|
|
2070
|
+
return select$1();
|
|
2071
|
+
}
|
|
2072
|
+
function keyBuilder$1(luvio, params) {
|
|
2073
|
+
return keyPrefix + '::ExperienceModelPropertyTypeDetailRepresentation:(' + 'designConfigTarget:' + params.queryParams.designConfigTarget + ',' + 'includeSubSchemaDefinitions:' + params.queryParams.includeSubSchemaDefinitions + ',' + 'language:' + params.queryParams.language + ',' + 'renditionConfigTarget:' + params.queryParams.renditionConfigTarget + ',' + 'fullyQualifiedName:' + params.urlParams.fullyQualifiedName + ')';
|
|
2074
|
+
}
|
|
2075
|
+
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
2076
|
+
return getTypeCacheKeys(luvio, response, function () { return keyBuilder$1(luvio, resourceParams); });
|
|
2077
|
+
}
|
|
2078
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
2079
|
+
var body = response.body;
|
|
2080
|
+
var key = keyBuilder$1(luvio, resourceParams);
|
|
2081
|
+
luvio.storeIngest(key, ingest, body);
|
|
2082
|
+
var snapshot = luvio.storeLookup({
|
|
2083
|
+
recordId: key,
|
|
2084
|
+
node: select(),
|
|
2085
|
+
variables: {},
|
|
2086
|
+
}, snapshotRefresh);
|
|
2087
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2088
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2089
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
return snapshot;
|
|
2093
|
+
}
|
|
2094
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
2095
|
+
var key = keyBuilder$1(luvio, params);
|
|
2096
|
+
var errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2097
|
+
var storeMetadataParams = {
|
|
2098
|
+
ttl: TTL,
|
|
2099
|
+
namespace: keyPrefix,
|
|
2100
|
+
version: VERSION,
|
|
2101
|
+
representationName: RepresentationType
|
|
2102
|
+
};
|
|
2103
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2104
|
+
return errorSnapshot;
|
|
2105
|
+
}
|
|
2106
|
+
function createResourceRequest(config) {
|
|
2107
|
+
var headers = {};
|
|
2108
|
+
return {
|
|
2109
|
+
baseUri: '/services/data/v58.0',
|
|
2110
|
+
basePath: '/connect/experience-model/property-types/' + config.urlParams.fullyQualifiedName + '',
|
|
2111
|
+
method: 'get',
|
|
2112
|
+
body: null,
|
|
2113
|
+
urlParams: config.urlParams,
|
|
2114
|
+
queryParams: config.queryParams,
|
|
2115
|
+
headers: headers,
|
|
2116
|
+
priority: 'normal',
|
|
2117
|
+
};
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
var getPropertyType_ConfigPropertyNames = {
|
|
2121
|
+
displayName: 'getPropertyType',
|
|
2122
|
+
parameters: {
|
|
2123
|
+
required: ['fullyQualifiedName'],
|
|
2124
|
+
optional: ['designConfigTarget', 'includeSubSchemaDefinitions', 'language', 'renditionConfigTarget']
|
|
2125
|
+
}
|
|
2126
|
+
};
|
|
2127
|
+
function createResourceParams(config) {
|
|
2128
|
+
var resourceParams = {
|
|
2129
|
+
urlParams: {
|
|
2130
|
+
fullyQualifiedName: config.fullyQualifiedName
|
|
2131
|
+
},
|
|
2132
|
+
queryParams: {
|
|
2133
|
+
designConfigTarget: config.designConfigTarget, includeSubSchemaDefinitions: config.includeSubSchemaDefinitions, language: config.language, renditionConfigTarget: config.renditionConfigTarget
|
|
2134
|
+
}
|
|
2135
|
+
};
|
|
2136
|
+
return resourceParams;
|
|
2137
|
+
}
|
|
2138
|
+
function keyBuilder(luvio, config) {
|
|
2139
|
+
var resourceParams = createResourceParams(config);
|
|
2140
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
2141
|
+
}
|
|
2142
|
+
function typeCheckConfig(untrustedConfig) {
|
|
2143
|
+
var config = {};
|
|
2144
|
+
var untrustedConfig_fullyQualifiedName = untrustedConfig.fullyQualifiedName;
|
|
2145
|
+
if (typeof untrustedConfig_fullyQualifiedName === 'string') {
|
|
2146
|
+
config.fullyQualifiedName = untrustedConfig_fullyQualifiedName;
|
|
2147
|
+
}
|
|
2148
|
+
var untrustedConfig_designConfigTarget = untrustedConfig.designConfigTarget;
|
|
2149
|
+
if (typeof untrustedConfig_designConfigTarget === 'string') {
|
|
2150
|
+
config.designConfigTarget = untrustedConfig_designConfigTarget;
|
|
2151
|
+
}
|
|
2152
|
+
var untrustedConfig_includeSubSchemaDefinitions = untrustedConfig.includeSubSchemaDefinitions;
|
|
2153
|
+
if (typeof untrustedConfig_includeSubSchemaDefinitions === 'boolean') {
|
|
2154
|
+
config.includeSubSchemaDefinitions = untrustedConfig_includeSubSchemaDefinitions;
|
|
2155
|
+
}
|
|
2156
|
+
var untrustedConfig_language = untrustedConfig.language;
|
|
2157
|
+
if (typeof untrustedConfig_language === 'string') {
|
|
2158
|
+
config.language = untrustedConfig_language;
|
|
2159
|
+
}
|
|
2160
|
+
var untrustedConfig_renditionConfigTarget = untrustedConfig.renditionConfigTarget;
|
|
2161
|
+
if (typeof untrustedConfig_renditionConfigTarget === 'string') {
|
|
2162
|
+
config.renditionConfigTarget = untrustedConfig_renditionConfigTarget;
|
|
2163
|
+
}
|
|
2164
|
+
return config;
|
|
2165
|
+
}
|
|
2166
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
2167
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2168
|
+
return null;
|
|
2169
|
+
}
|
|
2170
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2171
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2172
|
+
}
|
|
2173
|
+
var config = typeCheckConfig(untrustedConfig);
|
|
2174
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2175
|
+
return null;
|
|
2176
|
+
}
|
|
2177
|
+
return config;
|
|
2178
|
+
}
|
|
2179
|
+
function adapterFragment(luvio, config) {
|
|
2180
|
+
createResourceParams(config);
|
|
2181
|
+
return select();
|
|
2182
|
+
}
|
|
2183
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
2184
|
+
var snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
2185
|
+
config: config,
|
|
2186
|
+
resolve: function () { return buildNetworkSnapshot(luvio, config, snapshotRefreshOptions); }
|
|
2187
|
+
});
|
|
2188
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
2189
|
+
}
|
|
2190
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
2191
|
+
var snapshot = ingestError(luvio, resourceParams, response, {
|
|
2192
|
+
config: config,
|
|
2193
|
+
resolve: function () { return buildNetworkSnapshot(luvio, config, snapshotRefreshOptions); }
|
|
2194
|
+
});
|
|
2195
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
2196
|
+
}
|
|
2197
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
2198
|
+
var resourceParams = createResourceParams(config);
|
|
2199
|
+
var request = createResourceRequest(resourceParams);
|
|
2200
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2201
|
+
.then(function (response) {
|
|
2202
|
+
return luvio.handleSuccessResponse(function () { return onFetchResponseSuccess(luvio, config, resourceParams, response); }, function () { return getResponseCacheKeys(luvio, resourceParams, response.body); });
|
|
2203
|
+
}, function (response) {
|
|
2204
|
+
return luvio.handleErrorResponse(function () { return onFetchResponseError(luvio, config, resourceParams, response); });
|
|
2205
|
+
});
|
|
2206
|
+
}
|
|
2207
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
2208
|
+
var luvio = context.luvio, config = context.config;
|
|
2209
|
+
var networkPriority = coercedAdapterRequestContext.networkPriority, requestCorrelator = coercedAdapterRequestContext.requestCorrelator, eventObservers = coercedAdapterRequestContext.eventObservers;
|
|
2210
|
+
var dispatchOptions = {
|
|
2211
|
+
resourceRequestContext: {
|
|
2212
|
+
requestCorrelator: requestCorrelator,
|
|
2213
|
+
luvioRequestMethod: undefined,
|
|
2214
|
+
},
|
|
2215
|
+
eventObservers: eventObservers
|
|
2216
|
+
};
|
|
2217
|
+
if (networkPriority !== 'normal') {
|
|
2218
|
+
dispatchOptions.overrides = {
|
|
2219
|
+
priority: networkPriority
|
|
2220
|
+
};
|
|
2221
|
+
}
|
|
2222
|
+
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
2223
|
+
}
|
|
2224
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
2225
|
+
var luvio = context.luvio, config = context.config;
|
|
2226
|
+
var selector = {
|
|
2227
|
+
recordId: keyBuilder(luvio, config),
|
|
2228
|
+
node: adapterFragment(luvio, config),
|
|
2229
|
+
variables: {},
|
|
2230
|
+
};
|
|
2231
|
+
var cacheSnapshot = storeLookup(selector, {
|
|
2232
|
+
config: config,
|
|
2233
|
+
resolve: function () { return buildNetworkSnapshot(luvio, config, snapshotRefreshOptions); }
|
|
2234
|
+
});
|
|
2235
|
+
return cacheSnapshot;
|
|
2236
|
+
}
|
|
2237
|
+
var getPropertyTypeAdapterFactory = function (luvio) { return function ExperienceType__getPropertyType(untrustedConfig, requestContext) {
|
|
2238
|
+
var config = validateAdapterConfig(untrustedConfig, getPropertyType_ConfigPropertyNames);
|
|
2239
|
+
// Invalid or incomplete config
|
|
2240
|
+
if (config === null) {
|
|
2241
|
+
return null;
|
|
2242
|
+
}
|
|
2243
|
+
return luvio.applyCachePolicy((requestContext || {}), { config: config, luvio: luvio }, // BuildSnapshotContext
|
|
2244
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
2245
|
+
}; };
|
|
2246
|
+
|
|
2247
|
+
exports.getBlockTypeAdapterFactory = getBlockTypeAdapterFactory;
|
|
2248
|
+
exports.getBlockTypesAdapterFactory = getBlockTypesAdapterFactory;
|
|
2249
|
+
exports.getContentTypeAdapterFactory = getContentTypeAdapterFactory;
|
|
2250
|
+
exports.getContentTypesAdapterFactory = getContentTypesAdapterFactory;
|
|
2251
|
+
exports.getPropertyTypeAdapterFactory = getPropertyTypeAdapterFactory;
|
|
2252
|
+
exports.getPropertyTypesAdapterFactory = getPropertyTypesAdapterFactory;
|
|
2253
|
+
|
|
2254
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2255
|
+
|
|
2256
|
+
}));
|