@contentful/experience-delivery 1.0.0-dev.7 → 1.0.0-dev.8

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 (352) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +15 -10
  4. package/dist/cjs/api/resources/destination/client/Client.d.ts +96 -0
  5. package/dist/cjs/api/resources/destination/client/Client.js +401 -0
  6. package/dist/cjs/api/resources/destination/client/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/destination/client/index.js +17 -0
  8. package/dist/cjs/api/resources/destination/client/requests/DestinationExperiencesByNodeRequest.d.ts +8 -0
  9. package/dist/cjs/api/resources/destination/client/requests/DestinationExperiencesByNodeRequest.js +3 -0
  10. package/dist/cjs/api/resources/destination/client/requests/DestinationExperiencesByPathRequest.d.ts +12 -0
  11. package/dist/cjs/api/resources/destination/client/requests/DestinationExperiencesByPathRequest.js +3 -0
  12. package/dist/cjs/api/resources/destination/client/requests/SitemapDestinationRequest.d.ts +16 -0
  13. package/dist/cjs/api/resources/destination/client/requests/SitemapDestinationRequest.js +3 -0
  14. package/dist/cjs/api/resources/destination/client/requests/index.d.ts +3 -0
  15. package/dist/cjs/api/resources/destination/client/requests/index.js +2 -0
  16. package/dist/cjs/api/resources/destination/exports.d.ts +2 -0
  17. package/dist/cjs/api/resources/destination/exports.js +21 -0
  18. package/dist/cjs/api/resources/destination/index.d.ts +1 -0
  19. package/dist/cjs/api/resources/destination/index.js +17 -0
  20. package/dist/cjs/api/resources/index.d.ts +2 -0
  21. package/dist/cjs/api/resources/index.js +3 -1
  22. package/dist/cjs/api/types/ChildPath.d.ts +6 -0
  23. package/dist/cjs/api/types/ChildPath.js +3 -0
  24. package/dist/cjs/api/types/DestinationExperienceResolutionResponse.d.ts +5 -0
  25. package/dist/cjs/api/types/DestinationExperienceResolutionResponse.js +3 -0
  26. package/dist/cjs/api/types/DestinationExperiencesExtensions.d.ts +4 -0
  27. package/dist/cjs/api/types/DestinationExperiencesExtensions.js +3 -0
  28. package/dist/cjs/api/types/DestinationExperiencesExtensionsPersonalization.d.ts +5 -0
  29. package/dist/cjs/api/types/DestinationExperiencesExtensionsPersonalization.js +3 -0
  30. package/dist/cjs/api/types/DestinationExperiencesResponse.d.ts +4 -0
  31. package/dist/cjs/api/types/DestinationExperiencesResponse.js +3 -0
  32. package/dist/cjs/api/types/DestinationRedirectResponse.d.ts +4 -0
  33. package/dist/cjs/api/types/DestinationRedirectResponse.js +3 -0
  34. package/dist/cjs/api/types/DestinationRedirectResponseRedirect.d.ts +4 -0
  35. package/dist/cjs/api/types/DestinationRedirectResponseRedirect.js +3 -0
  36. package/dist/cjs/api/types/DestinationSitemap.d.ts +7 -0
  37. package/dist/cjs/api/types/DestinationSitemap.js +3 -0
  38. package/dist/cjs/api/types/DestinationSitemapPaths.d.ts +11 -0
  39. package/dist/cjs/api/types/DestinationSitemapPaths.js +3 -0
  40. package/dist/cjs/api/types/DestinationSitemapPathsPages.d.ts +7 -0
  41. package/dist/cjs/api/types/DestinationSitemapPathsPages.js +3 -0
  42. package/dist/cjs/api/types/DestinationSitemapPathsSys.d.ts +3 -0
  43. package/dist/cjs/api/types/DestinationSitemapPathsSys.js +3 -0
  44. package/dist/cjs/api/types/DestinationSitemapProperty.d.ts +7 -0
  45. package/dist/cjs/api/types/DestinationSitemapProperty.js +3 -0
  46. package/dist/cjs/api/types/DestinationSitemapPropertySys.d.ts +3 -0
  47. package/dist/cjs/api/types/DestinationSitemapPropertySys.js +3 -0
  48. package/dist/cjs/api/types/ErrorI18NContext.d.ts +5 -0
  49. package/dist/cjs/api/types/ErrorI18NContext.js +3 -0
  50. package/dist/cjs/api/types/ErrorSys.d.ts +5 -0
  51. package/dist/cjs/api/types/ErrorSys.js +3 -0
  52. package/dist/cjs/api/types/Error_.d.ts +12 -0
  53. package/dist/cjs/api/types/Error_.js +3 -0
  54. package/dist/cjs/api/types/HydratedExperience.d.ts +11 -0
  55. package/dist/cjs/api/types/HydratedExperience.js +3 -0
  56. package/dist/cjs/api/types/PersonalizationComponentEvent.d.ts +22 -0
  57. package/dist/cjs/api/types/PersonalizationComponentEvent.js +3 -0
  58. package/dist/cjs/api/types/PersonalizationEvent.d.ts +5 -0
  59. package/dist/cjs/api/types/PersonalizationEvent.js +3 -0
  60. package/dist/cjs/api/types/PersonalizationEventBase.d.ts +25 -0
  61. package/dist/cjs/api/types/PersonalizationEventBase.js +3 -0
  62. package/dist/cjs/api/types/PersonalizationEventBaseChannel.d.ts +7 -0
  63. package/dist/cjs/api/types/PersonalizationEventBaseChannel.js +10 -0
  64. package/dist/cjs/api/types/PersonalizationEventBaseComponentType.d.ts +5 -0
  65. package/dist/cjs/api/types/PersonalizationEventBaseComponentType.js +8 -0
  66. package/dist/cjs/api/types/PersonalizationEventBaseContext.d.ts +9 -0
  67. package/dist/cjs/api/types/PersonalizationEventBaseContext.js +3 -0
  68. package/dist/cjs/api/types/PersonalizationEventBaseContextLibrary.d.ts +4 -0
  69. package/dist/cjs/api/types/PersonalizationEventBaseContextLibrary.js +3 -0
  70. package/dist/cjs/api/types/PersonalizationEventBaseType.d.ts +8 -0
  71. package/dist/cjs/api/types/PersonalizationEventBaseType.js +11 -0
  72. package/dist/cjs/api/types/PersonalizationIdentifyEvent.d.ts +22 -0
  73. package/dist/cjs/api/types/PersonalizationIdentifyEvent.js +3 -0
  74. package/dist/cjs/api/types/PersonalizationPageEvent.d.ts +22 -0
  75. package/dist/cjs/api/types/PersonalizationPageEvent.js +3 -0
  76. package/dist/cjs/api/types/PersonalizationPageEventProperties.d.ts +9 -0
  77. package/dist/cjs/api/types/PersonalizationPageEventProperties.js +3 -0
  78. package/dist/cjs/api/types/PersonalizationScreenEvent.d.ts +22 -0
  79. package/dist/cjs/api/types/PersonalizationScreenEvent.js +3 -0
  80. package/dist/cjs/api/types/PersonalizationScreenEventProperties.d.ts +5 -0
  81. package/dist/cjs/api/types/PersonalizationScreenEventProperties.js +3 -0
  82. package/dist/cjs/api/types/PersonalizationTrackEvent.d.ts +22 -0
  83. package/dist/cjs/api/types/PersonalizationTrackEvent.js +3 -0
  84. package/dist/cjs/api/types/ResolvedDestinationExperience.d.ts +8 -0
  85. package/dist/cjs/api/types/ResolvedDestinationExperience.js +3 -0
  86. package/dist/cjs/api/types/SitemapPath.d.ts +11 -0
  87. package/dist/cjs/api/types/SitemapPath.js +3 -0
  88. package/dist/cjs/api/types/SitemapPathSys.d.ts +4 -0
  89. package/dist/cjs/api/types/SitemapPathSys.js +3 -0
  90. package/dist/cjs/api/types/index.d.ts +34 -0
  91. package/dist/cjs/api/types/index.js +34 -0
  92. package/dist/cjs/serialization/resources/destination/client/index.d.ts +1 -0
  93. package/dist/cjs/serialization/resources/destination/client/index.js +17 -0
  94. package/dist/cjs/serialization/resources/destination/client/requests/DestinationExperiencesByNodeRequest.d.ts +10 -0
  95. package/dist/cjs/serialization/resources/destination/client/requests/DestinationExperiencesByNodeRequest.js +42 -0
  96. package/dist/cjs/serialization/resources/destination/client/requests/DestinationExperiencesByPathRequest.d.ts +11 -0
  97. package/dist/cjs/serialization/resources/destination/client/requests/DestinationExperiencesByPathRequest.js +43 -0
  98. package/dist/cjs/serialization/resources/destination/client/requests/index.d.ts +2 -0
  99. package/dist/cjs/serialization/resources/destination/client/requests/index.js +7 -0
  100. package/dist/cjs/serialization/resources/destination/index.d.ts +1 -0
  101. package/dist/cjs/serialization/resources/destination/index.js +17 -0
  102. package/dist/cjs/serialization/resources/index.d.ts +2 -0
  103. package/dist/cjs/serialization/resources/index.js +3 -1
  104. package/dist/cjs/serialization/types/ChildPath.d.ts +9 -0
  105. package/dist/cjs/serialization/types/ChildPath.js +41 -0
  106. package/dist/cjs/serialization/types/DestinationExperienceResolutionResponse.d.ts +9 -0
  107. package/dist/cjs/serialization/types/DestinationExperienceResolutionResponse.js +41 -0
  108. package/dist/cjs/serialization/types/DestinationExperiencesExtensions.d.ts +10 -0
  109. package/dist/cjs/serialization/types/DestinationExperiencesExtensions.js +42 -0
  110. package/dist/cjs/serialization/types/DestinationExperiencesExtensionsPersonalization.d.ts +11 -0
  111. package/dist/cjs/serialization/types/DestinationExperiencesExtensionsPersonalization.js +43 -0
  112. package/dist/cjs/serialization/types/DestinationExperiencesResponse.d.ts +10 -0
  113. package/dist/cjs/serialization/types/DestinationExperiencesResponse.js +42 -0
  114. package/dist/cjs/serialization/types/DestinationRedirectResponse.d.ts +10 -0
  115. package/dist/cjs/serialization/types/DestinationRedirectResponse.js +42 -0
  116. package/dist/cjs/serialization/types/DestinationRedirectResponseRedirect.d.ts +9 -0
  117. package/dist/cjs/serialization/types/DestinationRedirectResponseRedirect.js +41 -0
  118. package/dist/cjs/serialization/types/DestinationSitemap.d.ts +12 -0
  119. package/dist/cjs/serialization/types/DestinationSitemap.js +44 -0
  120. package/dist/cjs/serialization/types/DestinationSitemapPaths.d.ts +15 -0
  121. package/dist/cjs/serialization/types/DestinationSitemapPaths.js +47 -0
  122. package/dist/cjs/serialization/types/DestinationSitemapPathsPages.d.ts +10 -0
  123. package/dist/cjs/serialization/types/DestinationSitemapPathsPages.js +42 -0
  124. package/dist/cjs/serialization/types/DestinationSitemapPathsSys.d.ts +9 -0
  125. package/dist/cjs/serialization/types/DestinationSitemapPathsSys.js +41 -0
  126. package/dist/cjs/serialization/types/DestinationSitemapProperty.d.ts +10 -0
  127. package/dist/cjs/serialization/types/DestinationSitemapProperty.js +42 -0
  128. package/dist/cjs/serialization/types/DestinationSitemapPropertySys.d.ts +9 -0
  129. package/dist/cjs/serialization/types/DestinationSitemapPropertySys.js +41 -0
  130. package/dist/cjs/serialization/types/ErrorI18NContext.d.ts +11 -0
  131. package/dist/cjs/serialization/types/ErrorI18NContext.js +43 -0
  132. package/dist/cjs/serialization/types/ErrorSys.d.ts +10 -0
  133. package/dist/cjs/serialization/types/ErrorSys.js +42 -0
  134. package/dist/cjs/serialization/types/Error_.d.ts +15 -0
  135. package/dist/cjs/serialization/types/Error_.js +47 -0
  136. package/dist/cjs/serialization/types/HydratedExperience.d.ts +14 -0
  137. package/dist/cjs/serialization/types/HydratedExperience.js +46 -0
  138. package/dist/cjs/serialization/types/PersonalizationComponentEvent.d.ts +29 -0
  139. package/dist/cjs/serialization/types/PersonalizationComponentEvent.js +61 -0
  140. package/dist/cjs/serialization/types/PersonalizationEvent.d.ts +12 -0
  141. package/dist/cjs/serialization/types/PersonalizationEvent.js +50 -0
  142. package/dist/cjs/serialization/types/PersonalizationEventBase.d.ts +30 -0
  143. package/dist/cjs/serialization/types/PersonalizationEventBase.js +62 -0
  144. package/dist/cjs/serialization/types/PersonalizationEventBaseChannel.d.ts +7 -0
  145. package/dist/cjs/serialization/types/PersonalizationEventBaseChannel.js +39 -0
  146. package/dist/cjs/serialization/types/PersonalizationEventBaseComponentType.d.ts +7 -0
  147. package/dist/cjs/serialization/types/PersonalizationEventBaseComponentType.js +39 -0
  148. package/dist/cjs/serialization/types/PersonalizationEventBaseContext.d.ts +11 -0
  149. package/dist/cjs/serialization/types/PersonalizationEventBaseContext.js +44 -0
  150. package/dist/cjs/serialization/types/PersonalizationEventBaseContextLibrary.d.ts +10 -0
  151. package/dist/cjs/serialization/types/PersonalizationEventBaseContextLibrary.js +42 -0
  152. package/dist/cjs/serialization/types/PersonalizationEventBaseType.d.ts +7 -0
  153. package/dist/cjs/serialization/types/PersonalizationEventBaseType.js +39 -0
  154. package/dist/cjs/serialization/types/PersonalizationIdentifyEvent.d.ts +29 -0
  155. package/dist/cjs/serialization/types/PersonalizationIdentifyEvent.js +61 -0
  156. package/dist/cjs/serialization/types/PersonalizationPageEvent.d.ts +30 -0
  157. package/dist/cjs/serialization/types/PersonalizationPageEvent.js +62 -0
  158. package/dist/cjs/serialization/types/PersonalizationPageEventProperties.d.ts +14 -0
  159. package/dist/cjs/serialization/types/PersonalizationPageEventProperties.js +47 -0
  160. package/dist/cjs/serialization/types/PersonalizationScreenEvent.d.ts +30 -0
  161. package/dist/cjs/serialization/types/PersonalizationScreenEvent.js +62 -0
  162. package/dist/cjs/serialization/types/PersonalizationScreenEventProperties.d.ts +10 -0
  163. package/dist/cjs/serialization/types/PersonalizationScreenEventProperties.js +43 -0
  164. package/dist/cjs/serialization/types/PersonalizationTrackEvent.d.ts +29 -0
  165. package/dist/cjs/serialization/types/PersonalizationTrackEvent.js +61 -0
  166. package/dist/cjs/serialization/types/ResolvedDestinationExperience.d.ts +13 -0
  167. package/dist/cjs/serialization/types/ResolvedDestinationExperience.js +45 -0
  168. package/dist/cjs/serialization/types/SitemapPath.d.ts +12 -0
  169. package/dist/cjs/serialization/types/SitemapPath.js +44 -0
  170. package/dist/cjs/serialization/types/SitemapPathSys.d.ts +9 -0
  171. package/dist/cjs/serialization/types/SitemapPathSys.js +41 -0
  172. package/dist/cjs/serialization/types/index.d.ts +34 -0
  173. package/dist/cjs/serialization/types/index.js +34 -0
  174. package/dist/cjs/version.d.ts +1 -1
  175. package/dist/cjs/version.js +1 -1
  176. package/dist/esm/BaseClient.mjs +2 -2
  177. package/dist/esm/Client.d.mts +3 -0
  178. package/dist/esm/Client.mjs +5 -0
  179. package/dist/esm/api/resources/destination/client/Client.d.mts +96 -0
  180. package/dist/esm/api/resources/destination/client/Client.mjs +364 -0
  181. package/dist/esm/api/resources/destination/client/index.d.mts +1 -0
  182. package/dist/esm/api/resources/destination/client/index.mjs +1 -0
  183. package/dist/esm/api/resources/destination/client/requests/DestinationExperiencesByNodeRequest.d.mts +8 -0
  184. package/dist/esm/api/resources/destination/client/requests/DestinationExperiencesByNodeRequest.mjs +2 -0
  185. package/dist/esm/api/resources/destination/client/requests/DestinationExperiencesByPathRequest.d.mts +12 -0
  186. package/dist/esm/api/resources/destination/client/requests/DestinationExperiencesByPathRequest.mjs +2 -0
  187. package/dist/esm/api/resources/destination/client/requests/SitemapDestinationRequest.d.mts +16 -0
  188. package/dist/esm/api/resources/destination/client/requests/SitemapDestinationRequest.mjs +2 -0
  189. package/dist/esm/api/resources/destination/client/requests/index.d.mts +3 -0
  190. package/dist/esm/api/resources/destination/client/requests/index.mjs +1 -0
  191. package/dist/esm/api/resources/destination/exports.d.mts +2 -0
  192. package/dist/esm/api/resources/destination/exports.mjs +3 -0
  193. package/dist/esm/api/resources/destination/index.d.mts +1 -0
  194. package/dist/esm/api/resources/destination/index.mjs +1 -0
  195. package/dist/esm/api/resources/index.d.mts +2 -0
  196. package/dist/esm/api/resources/index.mjs +2 -0
  197. package/dist/esm/api/types/ChildPath.d.mts +6 -0
  198. package/dist/esm/api/types/ChildPath.mjs +2 -0
  199. package/dist/esm/api/types/DestinationExperienceResolutionResponse.d.mts +5 -0
  200. package/dist/esm/api/types/DestinationExperienceResolutionResponse.mjs +2 -0
  201. package/dist/esm/api/types/DestinationExperiencesExtensions.d.mts +4 -0
  202. package/dist/esm/api/types/DestinationExperiencesExtensions.mjs +2 -0
  203. package/dist/esm/api/types/DestinationExperiencesExtensionsPersonalization.d.mts +5 -0
  204. package/dist/esm/api/types/DestinationExperiencesExtensionsPersonalization.mjs +2 -0
  205. package/dist/esm/api/types/DestinationExperiencesResponse.d.mts +4 -0
  206. package/dist/esm/api/types/DestinationExperiencesResponse.mjs +2 -0
  207. package/dist/esm/api/types/DestinationRedirectResponse.d.mts +4 -0
  208. package/dist/esm/api/types/DestinationRedirectResponse.mjs +2 -0
  209. package/dist/esm/api/types/DestinationRedirectResponseRedirect.d.mts +4 -0
  210. package/dist/esm/api/types/DestinationRedirectResponseRedirect.mjs +2 -0
  211. package/dist/esm/api/types/DestinationSitemap.d.mts +7 -0
  212. package/dist/esm/api/types/DestinationSitemap.mjs +2 -0
  213. package/dist/esm/api/types/DestinationSitemapPaths.d.mts +11 -0
  214. package/dist/esm/api/types/DestinationSitemapPaths.mjs +2 -0
  215. package/dist/esm/api/types/DestinationSitemapPathsPages.d.mts +7 -0
  216. package/dist/esm/api/types/DestinationSitemapPathsPages.mjs +2 -0
  217. package/dist/esm/api/types/DestinationSitemapPathsSys.d.mts +3 -0
  218. package/dist/esm/api/types/DestinationSitemapPathsSys.mjs +2 -0
  219. package/dist/esm/api/types/DestinationSitemapProperty.d.mts +7 -0
  220. package/dist/esm/api/types/DestinationSitemapProperty.mjs +2 -0
  221. package/dist/esm/api/types/DestinationSitemapPropertySys.d.mts +3 -0
  222. package/dist/esm/api/types/DestinationSitemapPropertySys.mjs +2 -0
  223. package/dist/esm/api/types/ErrorI18NContext.d.mts +5 -0
  224. package/dist/esm/api/types/ErrorI18NContext.mjs +2 -0
  225. package/dist/esm/api/types/ErrorSys.d.mts +5 -0
  226. package/dist/esm/api/types/ErrorSys.mjs +2 -0
  227. package/dist/esm/api/types/Error_.d.mts +12 -0
  228. package/dist/esm/api/types/Error_.mjs +2 -0
  229. package/dist/esm/api/types/HydratedExperience.d.mts +11 -0
  230. package/dist/esm/api/types/HydratedExperience.mjs +2 -0
  231. package/dist/esm/api/types/PersonalizationComponentEvent.d.mts +22 -0
  232. package/dist/esm/api/types/PersonalizationComponentEvent.mjs +2 -0
  233. package/dist/esm/api/types/PersonalizationEvent.d.mts +5 -0
  234. package/dist/esm/api/types/PersonalizationEvent.mjs +2 -0
  235. package/dist/esm/api/types/PersonalizationEventBase.d.mts +25 -0
  236. package/dist/esm/api/types/PersonalizationEventBase.mjs +2 -0
  237. package/dist/esm/api/types/PersonalizationEventBaseChannel.d.mts +7 -0
  238. package/dist/esm/api/types/PersonalizationEventBaseChannel.mjs +7 -0
  239. package/dist/esm/api/types/PersonalizationEventBaseComponentType.d.mts +5 -0
  240. package/dist/esm/api/types/PersonalizationEventBaseComponentType.mjs +5 -0
  241. package/dist/esm/api/types/PersonalizationEventBaseContext.d.mts +9 -0
  242. package/dist/esm/api/types/PersonalizationEventBaseContext.mjs +2 -0
  243. package/dist/esm/api/types/PersonalizationEventBaseContextLibrary.d.mts +4 -0
  244. package/dist/esm/api/types/PersonalizationEventBaseContextLibrary.mjs +2 -0
  245. package/dist/esm/api/types/PersonalizationEventBaseType.d.mts +8 -0
  246. package/dist/esm/api/types/PersonalizationEventBaseType.mjs +8 -0
  247. package/dist/esm/api/types/PersonalizationIdentifyEvent.d.mts +22 -0
  248. package/dist/esm/api/types/PersonalizationIdentifyEvent.mjs +2 -0
  249. package/dist/esm/api/types/PersonalizationPageEvent.d.mts +22 -0
  250. package/dist/esm/api/types/PersonalizationPageEvent.mjs +2 -0
  251. package/dist/esm/api/types/PersonalizationPageEventProperties.d.mts +9 -0
  252. package/dist/esm/api/types/PersonalizationPageEventProperties.mjs +2 -0
  253. package/dist/esm/api/types/PersonalizationScreenEvent.d.mts +22 -0
  254. package/dist/esm/api/types/PersonalizationScreenEvent.mjs +2 -0
  255. package/dist/esm/api/types/PersonalizationScreenEventProperties.d.mts +5 -0
  256. package/dist/esm/api/types/PersonalizationScreenEventProperties.mjs +2 -0
  257. package/dist/esm/api/types/PersonalizationTrackEvent.d.mts +22 -0
  258. package/dist/esm/api/types/PersonalizationTrackEvent.mjs +2 -0
  259. package/dist/esm/api/types/ResolvedDestinationExperience.d.mts +8 -0
  260. package/dist/esm/api/types/ResolvedDestinationExperience.mjs +2 -0
  261. package/dist/esm/api/types/SitemapPath.d.mts +11 -0
  262. package/dist/esm/api/types/SitemapPath.mjs +2 -0
  263. package/dist/esm/api/types/SitemapPathSys.d.mts +4 -0
  264. package/dist/esm/api/types/SitemapPathSys.mjs +2 -0
  265. package/dist/esm/api/types/index.d.mts +34 -0
  266. package/dist/esm/api/types/index.mjs +34 -0
  267. package/dist/esm/serialization/resources/destination/client/index.d.mts +1 -0
  268. package/dist/esm/serialization/resources/destination/client/index.mjs +1 -0
  269. package/dist/esm/serialization/resources/destination/client/requests/DestinationExperiencesByNodeRequest.d.mts +10 -0
  270. package/dist/esm/serialization/resources/destination/client/requests/DestinationExperiencesByNodeRequest.mjs +6 -0
  271. package/dist/esm/serialization/resources/destination/client/requests/DestinationExperiencesByPathRequest.d.mts +11 -0
  272. package/dist/esm/serialization/resources/destination/client/requests/DestinationExperiencesByPathRequest.mjs +7 -0
  273. package/dist/esm/serialization/resources/destination/client/requests/index.d.mts +2 -0
  274. package/dist/esm/serialization/resources/destination/client/requests/index.mjs +2 -0
  275. package/dist/esm/serialization/resources/destination/index.d.mts +1 -0
  276. package/dist/esm/serialization/resources/destination/index.mjs +1 -0
  277. package/dist/esm/serialization/resources/index.d.mts +2 -0
  278. package/dist/esm/serialization/resources/index.mjs +2 -0
  279. package/dist/esm/serialization/types/ChildPath.d.mts +9 -0
  280. package/dist/esm/serialization/types/ChildPath.mjs +5 -0
  281. package/dist/esm/serialization/types/DestinationExperienceResolutionResponse.d.mts +9 -0
  282. package/dist/esm/serialization/types/DestinationExperienceResolutionResponse.mjs +5 -0
  283. package/dist/esm/serialization/types/DestinationExperiencesExtensions.d.mts +10 -0
  284. package/dist/esm/serialization/types/DestinationExperiencesExtensions.mjs +6 -0
  285. package/dist/esm/serialization/types/DestinationExperiencesExtensionsPersonalization.d.mts +11 -0
  286. package/dist/esm/serialization/types/DestinationExperiencesExtensionsPersonalization.mjs +7 -0
  287. package/dist/esm/serialization/types/DestinationExperiencesResponse.d.mts +10 -0
  288. package/dist/esm/serialization/types/DestinationExperiencesResponse.mjs +6 -0
  289. package/dist/esm/serialization/types/DestinationRedirectResponse.d.mts +10 -0
  290. package/dist/esm/serialization/types/DestinationRedirectResponse.mjs +6 -0
  291. package/dist/esm/serialization/types/DestinationRedirectResponseRedirect.d.mts +9 -0
  292. package/dist/esm/serialization/types/DestinationRedirectResponseRedirect.mjs +5 -0
  293. package/dist/esm/serialization/types/DestinationSitemap.d.mts +12 -0
  294. package/dist/esm/serialization/types/DestinationSitemap.mjs +8 -0
  295. package/dist/esm/serialization/types/DestinationSitemapPaths.d.mts +15 -0
  296. package/dist/esm/serialization/types/DestinationSitemapPaths.mjs +11 -0
  297. package/dist/esm/serialization/types/DestinationSitemapPathsPages.d.mts +10 -0
  298. package/dist/esm/serialization/types/DestinationSitemapPathsPages.mjs +6 -0
  299. package/dist/esm/serialization/types/DestinationSitemapPathsSys.d.mts +9 -0
  300. package/dist/esm/serialization/types/DestinationSitemapPathsSys.mjs +5 -0
  301. package/dist/esm/serialization/types/DestinationSitemapProperty.d.mts +10 -0
  302. package/dist/esm/serialization/types/DestinationSitemapProperty.mjs +6 -0
  303. package/dist/esm/serialization/types/DestinationSitemapPropertySys.d.mts +9 -0
  304. package/dist/esm/serialization/types/DestinationSitemapPropertySys.mjs +5 -0
  305. package/dist/esm/serialization/types/ErrorI18NContext.d.mts +11 -0
  306. package/dist/esm/serialization/types/ErrorI18NContext.mjs +7 -0
  307. package/dist/esm/serialization/types/ErrorSys.d.mts +10 -0
  308. package/dist/esm/serialization/types/ErrorSys.mjs +6 -0
  309. package/dist/esm/serialization/types/Error_.d.mts +15 -0
  310. package/dist/esm/serialization/types/Error_.mjs +11 -0
  311. package/dist/esm/serialization/types/HydratedExperience.d.mts +14 -0
  312. package/dist/esm/serialization/types/HydratedExperience.mjs +10 -0
  313. package/dist/esm/serialization/types/PersonalizationComponentEvent.d.mts +29 -0
  314. package/dist/esm/serialization/types/PersonalizationComponentEvent.mjs +25 -0
  315. package/dist/esm/serialization/types/PersonalizationEvent.d.mts +12 -0
  316. package/dist/esm/serialization/types/PersonalizationEvent.mjs +14 -0
  317. package/dist/esm/serialization/types/PersonalizationEventBase.d.mts +30 -0
  318. package/dist/esm/serialization/types/PersonalizationEventBase.mjs +26 -0
  319. package/dist/esm/serialization/types/PersonalizationEventBaseChannel.d.mts +7 -0
  320. package/dist/esm/serialization/types/PersonalizationEventBaseChannel.mjs +3 -0
  321. package/dist/esm/serialization/types/PersonalizationEventBaseComponentType.d.mts +7 -0
  322. package/dist/esm/serialization/types/PersonalizationEventBaseComponentType.mjs +3 -0
  323. package/dist/esm/serialization/types/PersonalizationEventBaseContext.d.mts +11 -0
  324. package/dist/esm/serialization/types/PersonalizationEventBaseContext.mjs +8 -0
  325. package/dist/esm/serialization/types/PersonalizationEventBaseContextLibrary.d.mts +10 -0
  326. package/dist/esm/serialization/types/PersonalizationEventBaseContextLibrary.mjs +6 -0
  327. package/dist/esm/serialization/types/PersonalizationEventBaseType.d.mts +7 -0
  328. package/dist/esm/serialization/types/PersonalizationEventBaseType.mjs +3 -0
  329. package/dist/esm/serialization/types/PersonalizationIdentifyEvent.d.mts +29 -0
  330. package/dist/esm/serialization/types/PersonalizationIdentifyEvent.mjs +25 -0
  331. package/dist/esm/serialization/types/PersonalizationPageEvent.d.mts +30 -0
  332. package/dist/esm/serialization/types/PersonalizationPageEvent.mjs +26 -0
  333. package/dist/esm/serialization/types/PersonalizationPageEventProperties.d.mts +14 -0
  334. package/dist/esm/serialization/types/PersonalizationPageEventProperties.mjs +11 -0
  335. package/dist/esm/serialization/types/PersonalizationScreenEvent.d.mts +30 -0
  336. package/dist/esm/serialization/types/PersonalizationScreenEvent.mjs +26 -0
  337. package/dist/esm/serialization/types/PersonalizationScreenEventProperties.d.mts +10 -0
  338. package/dist/esm/serialization/types/PersonalizationScreenEventProperties.mjs +7 -0
  339. package/dist/esm/serialization/types/PersonalizationTrackEvent.d.mts +29 -0
  340. package/dist/esm/serialization/types/PersonalizationTrackEvent.mjs +25 -0
  341. package/dist/esm/serialization/types/ResolvedDestinationExperience.d.mts +13 -0
  342. package/dist/esm/serialization/types/ResolvedDestinationExperience.mjs +9 -0
  343. package/dist/esm/serialization/types/SitemapPath.d.mts +12 -0
  344. package/dist/esm/serialization/types/SitemapPath.mjs +8 -0
  345. package/dist/esm/serialization/types/SitemapPathSys.d.mts +9 -0
  346. package/dist/esm/serialization/types/SitemapPathSys.mjs +5 -0
  347. package/dist/esm/serialization/types/index.d.mts +34 -0
  348. package/dist/esm/serialization/types/index.mjs +34 -0
  349. package/dist/esm/version.d.mts +1 -1
  350. package/dist/esm/version.mjs +1 -1
  351. package/package.json +12 -1
  352. package/reference.md +275 -0
@@ -0,0 +1,364 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
13
+ import * as core from "../../../../core/index.mjs";
14
+ import * as environments from "../../../../environments.mjs";
15
+ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
+ import * as errors from "../../../../errors/index.mjs";
17
+ import * as serializers from "../../../../serialization/index.mjs";
18
+ import * as ContentfulViewDelivery from "../../../index.mjs";
19
+ export class DestinationClient {
20
+ constructor(options) {
21
+ this._options = normalizeClientOptionsWithAuth(options);
22
+ }
23
+ /**
24
+ * @param {string} spaceId - ID of the space.
25
+ * @param {string} destinationId - ID of the published Destination.
26
+ * @param {ContentfulViewDelivery.SitemapDestinationRequest} request
27
+ * @param {DestinationClient.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @throws {@link ContentfulViewDelivery.BadRequestError}
30
+ * @throws {@link ContentfulViewDelivery.UnauthorizedError}
31
+ * @throws {@link ContentfulViewDelivery.ForbiddenError}
32
+ * @throws {@link ContentfulViewDelivery.NotFoundError}
33
+ * @throws {@link ContentfulViewDelivery.ConflictError}
34
+ * @throws {@link ContentfulViewDelivery.UnprocessableEntityError}
35
+ * @throws {@link ContentfulViewDelivery.InternalServerError}
36
+ *
37
+ * @example
38
+ * await client.destination.sitemap("yadj1kx9rmg0", "4RqKkGJqLHpMiomHuILv5N", {
39
+ * limit: 1,
40
+ * pageNext: "pageNext",
41
+ * pagePrev: "pagePrev"
42
+ * })
43
+ */
44
+ sitemap(spaceId, destinationId, request = {}, requestOptions) {
45
+ return core.HttpResponsePromise.fromPromise(this.__sitemap(spaceId, destinationId, request, requestOptions));
46
+ }
47
+ __sitemap(spaceId_1, destinationId_1) {
48
+ return __awaiter(this, arguments, void 0, function* (spaceId, destinationId, request = {}, requestOptions) {
49
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
50
+ const { limit, pageNext, pagePrev } = request;
51
+ const _queryParams = {
52
+ limit,
53
+ pageNext,
54
+ pagePrev,
55
+ };
56
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
57
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
58
+ "x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
59
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
60
+ const _response = yield core.fetcher({
61
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/destinations/${core.url.encodePathParam(destinationId)}/sitemap`),
62
+ method: "GET",
63
+ headers: _headers,
64
+ queryString: core.url
65
+ .queryBuilder()
66
+ .addMany(_queryParams)
67
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
68
+ .build(),
69
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
70
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
71
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
72
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
73
+ logging: this._options.logging,
74
+ });
75
+ if (_response.ok) {
76
+ return {
77
+ data: serializers.DestinationSitemap.parseOrThrow(_response.body, {
78
+ unrecognizedObjectKeys: "passthrough",
79
+ allowUnrecognizedUnionMembers: true,
80
+ allowUnrecognizedEnumValues: true,
81
+ skipValidation: true,
82
+ breadcrumbsPrefix: ["response"],
83
+ }),
84
+ rawResponse: _response.rawResponse,
85
+ };
86
+ }
87
+ if (_response.error.reason === "status-code") {
88
+ switch (_response.error.statusCode) {
89
+ case 400:
90
+ throw new ContentfulViewDelivery.BadRequestError(_response.error.body, _response.rawResponse);
91
+ case 401:
92
+ throw new ContentfulViewDelivery.UnauthorizedError(_response.error.body, _response.rawResponse);
93
+ case 403:
94
+ throw new ContentfulViewDelivery.ForbiddenError(_response.error.body, _response.rawResponse);
95
+ case 404:
96
+ throw new ContentfulViewDelivery.NotFoundError(_response.error.body, _response.rawResponse);
97
+ case 409:
98
+ throw new ContentfulViewDelivery.ConflictError(_response.error.body, _response.rawResponse);
99
+ case 422:
100
+ throw new ContentfulViewDelivery.UnprocessableEntityError(_response.error.body, _response.rawResponse);
101
+ case 500:
102
+ throw new ContentfulViewDelivery.InternalServerError(_response.error.body, _response.rawResponse);
103
+ default:
104
+ throw new errors.ContentfulViewDeliveryError({
105
+ statusCode: _response.error.statusCode,
106
+ body: _response.error.body,
107
+ rawResponse: _response.rawResponse,
108
+ });
109
+ }
110
+ }
111
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/spaces/{spaceId}/destinations/{destinationId}/sitemap");
112
+ });
113
+ }
114
+ /**
115
+ * @param {string} spaceId - ID of the space.
116
+ * @param {string} destinationId - ID of the published Destination.
117
+ * @param {string} nodeId - ID of the Destination Node to resolve.
118
+ * @param {DestinationClient.RequestOptions} requestOptions - Request-specific configuration.
119
+ *
120
+ * @throws {@link ContentfulViewDelivery.BadRequestError}
121
+ * @throws {@link ContentfulViewDelivery.UnauthorizedError}
122
+ * @throws {@link ContentfulViewDelivery.ForbiddenError}
123
+ * @throws {@link ContentfulViewDelivery.NotFoundError}
124
+ * @throws {@link ContentfulViewDelivery.ConflictError}
125
+ * @throws {@link ContentfulViewDelivery.UnprocessableEntityError}
126
+ * @throws {@link ContentfulViewDelivery.InternalServerError}
127
+ *
128
+ * @example
129
+ * await client.destination.resolveByNodeId("yadj1kx9rmg0", "4RqKkGJqLHpMiomHuILv5N", "6BslKh9TdKGOK41VmLDjFZ")
130
+ */
131
+ resolveByNodeId(spaceId, destinationId, nodeId, requestOptions) {
132
+ return core.HttpResponsePromise.fromPromise(this.__resolveByNodeId(spaceId, destinationId, nodeId, requestOptions));
133
+ }
134
+ __resolveByNodeId(spaceId, destinationId, nodeId, requestOptions) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
137
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
138
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
139
+ "x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
140
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
141
+ const _response = yield core.fetcher({
142
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/destinations/${core.url.encodePathParam(destinationId)}/nodes/${core.url.encodePathParam(nodeId)}/experiences`),
143
+ method: "GET",
144
+ headers: _headers,
145
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
146
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
147
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
148
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
149
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
150
+ logging: this._options.logging,
151
+ });
152
+ if (_response.ok) {
153
+ return {
154
+ data: serializers.DestinationExperienceResolutionResponse.parseOrThrow(_response.body, {
155
+ unrecognizedObjectKeys: "passthrough",
156
+ allowUnrecognizedUnionMembers: true,
157
+ allowUnrecognizedEnumValues: true,
158
+ skipValidation: true,
159
+ breadcrumbsPrefix: ["response"],
160
+ }),
161
+ rawResponse: _response.rawResponse,
162
+ };
163
+ }
164
+ if (_response.error.reason === "status-code") {
165
+ switch (_response.error.statusCode) {
166
+ case 400:
167
+ throw new ContentfulViewDelivery.BadRequestError(_response.error.body, _response.rawResponse);
168
+ case 401:
169
+ throw new ContentfulViewDelivery.UnauthorizedError(_response.error.body, _response.rawResponse);
170
+ case 403:
171
+ throw new ContentfulViewDelivery.ForbiddenError(_response.error.body, _response.rawResponse);
172
+ case 404:
173
+ throw new ContentfulViewDelivery.NotFoundError(_response.error.body, _response.rawResponse);
174
+ case 409:
175
+ throw new ContentfulViewDelivery.ConflictError(_response.error.body, _response.rawResponse);
176
+ case 422:
177
+ throw new ContentfulViewDelivery.UnprocessableEntityError(_response.error.body, _response.rawResponse);
178
+ case 500:
179
+ throw new ContentfulViewDelivery.InternalServerError(_response.error.body, _response.rawResponse);
180
+ default:
181
+ throw new errors.ContentfulViewDeliveryError({
182
+ statusCode: _response.error.statusCode,
183
+ body: _response.error.body,
184
+ rawResponse: _response.rawResponse,
185
+ });
186
+ }
187
+ }
188
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/spaces/{spaceId}/destinations/{destinationId}/nodes/{nodeId}/experiences");
189
+ });
190
+ }
191
+ /**
192
+ * @param {string} spaceId - ID of the space.
193
+ * @param {string} destinationId - ID of the published Destination.
194
+ * @param {string} nodeId - ID of the Destination Node to resolve.
195
+ * @param {ContentfulViewDelivery.DestinationExperiencesByNodeRequest} request
196
+ * @param {DestinationClient.RequestOptions} requestOptions - Request-specific configuration.
197
+ *
198
+ * @throws {@link ContentfulViewDelivery.BadRequestError}
199
+ * @throws {@link ContentfulViewDelivery.UnauthorizedError}
200
+ * @throws {@link ContentfulViewDelivery.ForbiddenError}
201
+ * @throws {@link ContentfulViewDelivery.NotFoundError}
202
+ * @throws {@link ContentfulViewDelivery.ConflictError}
203
+ * @throws {@link ContentfulViewDelivery.UnprocessableEntityError}
204
+ * @throws {@link ContentfulViewDelivery.InternalServerError}
205
+ *
206
+ * @example
207
+ * await client.destination.resolveByNodeIdWithOverrides("yadj1kx9rmg0", "4RqKkGJqLHpMiomHuILv5N", "6BslKh9TdKGOK41VmLDjFZ")
208
+ */
209
+ resolveByNodeIdWithOverrides(spaceId, destinationId, nodeId, request = {}, requestOptions) {
210
+ return core.HttpResponsePromise.fromPromise(this.__resolveByNodeIdWithOverrides(spaceId, destinationId, nodeId, request, requestOptions));
211
+ }
212
+ __resolveByNodeIdWithOverrides(spaceId_1, destinationId_1, nodeId_1) {
213
+ return __awaiter(this, arguments, void 0, function* (spaceId, destinationId, nodeId, request = {}, requestOptions) {
214
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
215
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
216
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
217
+ "x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
218
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
219
+ const _response = yield core.fetcher({
220
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/destinations/${core.url.encodePathParam(destinationId)}/nodes/${core.url.encodePathParam(nodeId)}/experiences`),
221
+ method: "POST",
222
+ headers: _headers,
223
+ contentType: "application/json",
224
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
225
+ requestType: "json",
226
+ body: serializers.DestinationExperiencesByNodeRequest.jsonOrThrow(request, {
227
+ unrecognizedObjectKeys: "passthrough",
228
+ allowUnrecognizedUnionMembers: true,
229
+ allowUnrecognizedEnumValues: true,
230
+ omitUndefined: true,
231
+ }),
232
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
233
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
234
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
235
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
236
+ logging: this._options.logging,
237
+ });
238
+ if (_response.ok) {
239
+ return {
240
+ data: serializers.DestinationExperienceResolutionResponse.parseOrThrow(_response.body, {
241
+ unrecognizedObjectKeys: "passthrough",
242
+ allowUnrecognizedUnionMembers: true,
243
+ allowUnrecognizedEnumValues: true,
244
+ skipValidation: true,
245
+ breadcrumbsPrefix: ["response"],
246
+ }),
247
+ rawResponse: _response.rawResponse,
248
+ };
249
+ }
250
+ if (_response.error.reason === "status-code") {
251
+ switch (_response.error.statusCode) {
252
+ case 400:
253
+ throw new ContentfulViewDelivery.BadRequestError(_response.error.body, _response.rawResponse);
254
+ case 401:
255
+ throw new ContentfulViewDelivery.UnauthorizedError(_response.error.body, _response.rawResponse);
256
+ case 403:
257
+ throw new ContentfulViewDelivery.ForbiddenError(_response.error.body, _response.rawResponse);
258
+ case 404:
259
+ throw new ContentfulViewDelivery.NotFoundError(_response.error.body, _response.rawResponse);
260
+ case 409:
261
+ throw new ContentfulViewDelivery.ConflictError(_response.error.body, _response.rawResponse);
262
+ case 422:
263
+ throw new ContentfulViewDelivery.UnprocessableEntityError(_response.error.body, _response.rawResponse);
264
+ case 500:
265
+ throw new ContentfulViewDelivery.InternalServerError(_response.error.body, _response.rawResponse);
266
+ default:
267
+ throw new errors.ContentfulViewDeliveryError({
268
+ statusCode: _response.error.statusCode,
269
+ body: _response.error.body,
270
+ rawResponse: _response.rawResponse,
271
+ });
272
+ }
273
+ }
274
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/spaces/{spaceId}/destinations/{destinationId}/nodes/{nodeId}/experiences");
275
+ });
276
+ }
277
+ /**
278
+ * @param {string} spaceId - ID of the space.
279
+ * @param {string} destinationId - ID of the published Destination.
280
+ * @param {ContentfulViewDelivery.DestinationExperiencesByPathRequest} request
281
+ * @param {DestinationClient.RequestOptions} requestOptions - Request-specific configuration.
282
+ *
283
+ * @throws {@link ContentfulViewDelivery.BadRequestError}
284
+ * @throws {@link ContentfulViewDelivery.UnauthorizedError}
285
+ * @throws {@link ContentfulViewDelivery.ForbiddenError}
286
+ * @throws {@link ContentfulViewDelivery.NotFoundError}
287
+ * @throws {@link ContentfulViewDelivery.ConflictError}
288
+ * @throws {@link ContentfulViewDelivery.UnprocessableEntityError}
289
+ * @throws {@link ContentfulViewDelivery.InternalServerError}
290
+ *
291
+ * @example
292
+ * await client.destination.resolveByPath("yadj1kx9rmg0", "4RqKkGJqLHpMiomHuILv5N", {
293
+ * path: "/products"
294
+ * })
295
+ */
296
+ resolveByPath(spaceId, destinationId, request, requestOptions) {
297
+ return core.HttpResponsePromise.fromPromise(this.__resolveByPath(spaceId, destinationId, request, requestOptions));
298
+ }
299
+ __resolveByPath(spaceId, destinationId, request, requestOptions) {
300
+ return __awaiter(this, void 0, void 0, function* () {
301
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
302
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
303
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
304
+ "x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
305
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
306
+ const _response = yield core.fetcher({
307
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/destinations/${core.url.encodePathParam(destinationId)}/experiences`),
308
+ method: "POST",
309
+ headers: _headers,
310
+ contentType: "application/json",
311
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
312
+ requestType: "json",
313
+ body: serializers.DestinationExperiencesByPathRequest.jsonOrThrow(request, {
314
+ unrecognizedObjectKeys: "passthrough",
315
+ allowUnrecognizedUnionMembers: true,
316
+ allowUnrecognizedEnumValues: true,
317
+ omitUndefined: true,
318
+ }),
319
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
320
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
321
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
322
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
323
+ logging: this._options.logging,
324
+ });
325
+ if (_response.ok) {
326
+ return {
327
+ data: serializers.DestinationExperienceResolutionResponse.parseOrThrow(_response.body, {
328
+ unrecognizedObjectKeys: "passthrough",
329
+ allowUnrecognizedUnionMembers: true,
330
+ allowUnrecognizedEnumValues: true,
331
+ skipValidation: true,
332
+ breadcrumbsPrefix: ["response"],
333
+ }),
334
+ rawResponse: _response.rawResponse,
335
+ };
336
+ }
337
+ if (_response.error.reason === "status-code") {
338
+ switch (_response.error.statusCode) {
339
+ case 400:
340
+ throw new ContentfulViewDelivery.BadRequestError(_response.error.body, _response.rawResponse);
341
+ case 401:
342
+ throw new ContentfulViewDelivery.UnauthorizedError(_response.error.body, _response.rawResponse);
343
+ case 403:
344
+ throw new ContentfulViewDelivery.ForbiddenError(_response.error.body, _response.rawResponse);
345
+ case 404:
346
+ throw new ContentfulViewDelivery.NotFoundError(_response.error.body, _response.rawResponse);
347
+ case 409:
348
+ throw new ContentfulViewDelivery.ConflictError(_response.error.body, _response.rawResponse);
349
+ case 422:
350
+ throw new ContentfulViewDelivery.UnprocessableEntityError(_response.error.body, _response.rawResponse);
351
+ case 500:
352
+ throw new ContentfulViewDelivery.InternalServerError(_response.error.body, _response.rawResponse);
353
+ default:
354
+ throw new errors.ContentfulViewDeliveryError({
355
+ statusCode: _response.error.statusCode,
356
+ body: _response.error.body,
357
+ rawResponse: _response.rawResponse,
358
+ });
359
+ }
360
+ }
361
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/spaces/{spaceId}/destinations/{destinationId}/experiences");
362
+ });
363
+ }
364
+ }
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,8 @@
1
+ import type * as ContentfulViewDelivery from "../../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {}
5
+ */
6
+ export interface DestinationExperiencesByNodeRequest {
7
+ extensions?: ContentfulViewDelivery.DestinationExperiencesExtensions;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,12 @@
1
+ import type * as ContentfulViewDelivery from "../../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {
5
+ * path: "/products"
6
+ * }
7
+ */
8
+ export interface DestinationExperiencesByPathRequest {
9
+ /** Absolute path to resolve. Must start with `/`. */
10
+ path: string;
11
+ extensions?: ContentfulViewDelivery.DestinationExperiencesExtensions;
12
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * limit: 1,
5
+ * pageNext: "pageNext",
6
+ * pagePrev: "pagePrev"
7
+ * }
8
+ */
9
+ export interface SitemapDestinationRequest {
10
+ /** Maximum number of paths to return. Defaults to `100`, maximum `1000`. */
11
+ limit?: number;
12
+ /** Cursor returned as `paths.pages.next` by a previous request. Treat the value as opaque and do not combine it with `pagePrev`. */
13
+ pageNext?: string;
14
+ /** Cursor returned as `paths.pages.prev` by a previous request. Treat the value as opaque and do not combine it with `pageNext`. */
15
+ pagePrev?: string;
16
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export type { DestinationExperiencesByNodeRequest } from "./DestinationExperiencesByNodeRequest.mjs";
2
+ export type { DestinationExperiencesByPathRequest } from "./DestinationExperiencesByPathRequest.mjs";
3
+ export type { SitemapDestinationRequest } from "./SitemapDestinationRequest.mjs";
@@ -0,0 +1,2 @@
1
+ export { DestinationClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export { DestinationClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -1,6 +1,8 @@
1
1
  export * from "./component/client/requests/index.mjs";
2
2
  export * as component from "./component/index.mjs";
3
3
  export * from "./component/types/index.mjs";
4
+ export * from "./destination/client/requests/index.mjs";
5
+ export * as destination from "./destination/index.mjs";
4
6
  export * from "./experience/client/requests/index.mjs";
5
7
  export * as experience from "./experience/index.mjs";
6
8
  export * from "./experience/types/index.mjs";
@@ -1,6 +1,8 @@
1
1
  export * from "./component/client/requests/index.mjs";
2
2
  export * as component from "./component/index.mjs";
3
3
  export * from "./component/types/index.mjs";
4
+ export * from "./destination/client/requests/index.mjs";
5
+ export * as destination from "./destination/index.mjs";
4
6
  export * from "./experience/client/requests/index.mjs";
5
7
  export * as experience from "./experience/index.mjs";
6
8
  export * from "./experience/types/index.mjs";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Child path available at the next depth level.
3
+ */
4
+ export interface ChildPath {
5
+ path: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type * as ContentfulViewDelivery from "../index.mjs";
2
+ /**
3
+ * Resolution returns either hydrated Experiences or a redirect, never both.
4
+ */
5
+ export type DestinationExperienceResolutionResponse = ContentfulViewDelivery.DestinationExperiencesResponse | ContentfulViewDelivery.DestinationRedirectResponse;
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ import type * as ContentfulViewDelivery from "../index.mjs";
2
+ export interface DestinationExperiencesExtensions {
3
+ personalization?: ContentfulViewDelivery.DestinationExperiencesExtensionsPersonalization;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type * as ContentfulViewDelivery from "../index.mjs";
2
+ export interface DestinationExperiencesExtensionsPersonalization {
3
+ profileId?: string;
4
+ events?: ContentfulViewDelivery.PersonalizationEvent[];
5
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ import type * as ContentfulViewDelivery from "../index.mjs";
2
+ export interface DestinationExperiencesResponse {
3
+ experiences: ContentfulViewDelivery.ResolvedDestinationExperience[];
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ import type * as ContentfulViewDelivery from "../index.mjs";
2
+ export interface DestinationRedirectResponse {
3
+ redirect: ContentfulViewDelivery.DestinationRedirectResponseRedirect;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface DestinationRedirectResponseRedirect {
2
+ /** Absolute path of the Destination Experience Node targeted by the redirect. */
3
+ path: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ import type * as ContentfulViewDelivery from "../index.mjs";
2
+ export interface DestinationSitemap {
3
+ /** The Destination the sitemap belongs to. */
4
+ property: ContentfulViewDelivery.DestinationSitemapProperty;
5
+ /** Flattened, paginated list of every routable path in the Destination. */
6
+ paths: ContentfulViewDelivery.DestinationSitemapPaths;
7
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ import type * as ContentfulViewDelivery from "../index.mjs";
2
+ /**
3
+ * Flattened, paginated list of every routable path in the Destination.
4
+ */
5
+ export interface DestinationSitemapPaths {
6
+ sys: ContentfulViewDelivery.DestinationSitemapPathsSys;
7
+ limit: number;
8
+ items: ContentfulViewDelivery.SitemapPath[];
9
+ /** Cursor tokens for paging. Treat the values as opaque. */
10
+ pages: ContentfulViewDelivery.DestinationSitemapPathsPages;
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Cursor tokens for paging. Treat the values as opaque.
3
+ */
4
+ export interface DestinationSitemapPathsPages {
5
+ next?: string;
6
+ prev?: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface DestinationSitemapPathsSys {
2
+ type: "Array";
3
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ import type * as ContentfulViewDelivery from "../index.mjs";
2
+ /**
3
+ * The Destination the sitemap belongs to.
4
+ */
5
+ export interface DestinationSitemapProperty {
6
+ sys: ContentfulViewDelivery.DestinationSitemapPropertySys;
7
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface DestinationSitemapPropertySys {
2
+ type: "Destination";
3
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface ErrorI18NContext {
2
+ code: string;
3
+ pluralCount?: number;
4
+ parameters?: Record<string, unknown>;
5
+ }