@salesforce/lds-adapters-experience-model 0.1.0-dev1

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